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
importscala.compiletime.*objectmodule:opaquetypeX[x] = x
objectX:givenX[Int] =5inlinedefget[x] = summonInline[X[x]]
endX//summon[X[Int]] // doesn't compile and this is probably okendmoduleimportmodule.X
summon[X[Int]]
X.get[Int] // doesn't compile and this is a bug
Compiler version
3.3.4, 3.6.2
Minimized code
https://scastie.scala-lang.org/road21/RKS79oblTUG87DzuRlPkAg/23
Output
Compiler error:
No given instance of type module$_this.X[Int] was found
Expectation
No compiler error
I expect that inlining happens in-place and given should be found. If I move the
get
method to separate object It compiles (shown in scastie link).The text was updated successfully, but these errors were encountered: