I think we can all agree that the error message is very confusing and unhelpful.
What’s happening is that the implicit search finds a macro inherited from SchemaCompanionMacros, calls it, and it fails with a completely bogus error message. Needless to say, the codebase I encountered this error in wasn’t quite as nice and tidy as my example above, and I spent a considerable amount of time pulling my own hair trying to find the cause.
I think we can do better. At the very least, I would like to know what macro was being called that led to this error. And ideally I would like to see the complete expression that the compiler generates during implicit search.
It very much is a compiler issue that the compiler doesn’t tell me which macro produced the error and why it’s even being called.
And actually I have spelled out quite clearly that it’s a macro that generated this error. Please read more carefully next time before responding, thanks.