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
[error] Test.scala:6:13:Exception occurred while executing macro expansion.
[error] java.lang.ClassCastException:classscala.Tuple$package$EmptyTuple$ cannot be cast to classscala.Tuple1 (scala.Tuple$package$EmptyTuple$ is in unnamed module of loader java.net.URLClassLoader@7291d7ca; scala.Tuple1 is in unnamed module of loader java.net.URLClassLoader@72b7b5a6)
[error] at Macro$package$.isFooImpl(Macro.scala:7)
[error]
[error] defbar= isFoo(foo)
[error] ^^^^^^^^^^
Expectation
The code should compile, matching the first case clause in isFooImpl. The example works correctly if Child is defined as a class rather than an object or foo is prefixed with this in the macro call like def bar = isFoo(this.foo)
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Compiler version
3.0.0 ... 3.1.3-RC1-bin-20220221-3ca087c-NIGHTLY
Minimized code
Output
Expectation
The code should compile, matching the first case clause in
isFooImpl
. The example works correctly ifChild
is defined as a class rather than an object orfoo
is prefixed withthis
in the macro call likedef bar = isFoo(this.foo)
The text was updated successfully, but these errors were encountered: