You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No given instance of type Bar was found for parameter x of method summon in object Predef.
I found:
given_Bar(using )
But given instance given_Bar does not match type Bar.
Expectation
Minimized code should compile
Alternatively, compiler should prevent (or at least warn) user from giving context parameters default values inside given definition.
The text was updated successfully, but these errors were encountered:
While the reporting would be improved by the fix of #19414, the core issue is different; it's related to the designing of with when there are default arguments:
Actually, the name clash is not a problem. The issue is that the lookup for default argument fails: the default parameters getters are associated to the constructor, not to the generated implicit wrapper, and are not found.
Compiler version
3.4.0
Minimized code
Output
Expectation
Minimized code should compile
Alternatively, compiler should prevent (or at least warn) user from giving context parameters default values inside given definition.
The text was updated successfully, but these errors were encountered: