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] Main.scala:1:10:Exception occurred while executing macro expansion.
[error] scala.MatchError:Type.of[...] (of classscala.quoted.runtime.impl.TypeImpl)
[error] at Macro$package$.qux0Impl(Macro.scala:11)
[error]
[error] defq0= qux0()
[error] ^^^^^^
If ? inside class Wrapper[T <: Container[?]] gets replaced with Int, then qux0Impl seems to work correctly but qux2Impl stops compiling, producing the error:
[error] Macro.scala:21:20:Type argument Container[x] does not conform to upper bound Container[Int]
[error] case'[Wrapper[Container[x]]] =>'{}
[error] ^
Expectation
All qux cases should compile in both variants (with class Wrapper[T <: Container[?]] or class Wrapper[T <: Container[Int]]), capturing the following types as x:
qux0 -> Container[Int]
qux1 -> Box[Int]
qux2 -> Int
The text was updated successfully, but these errors were encountered:
Compiler version
3.3.0-RC1-bin-20221111-cc4c279-NIGHTLY and earlier
Minimized code
Macro.scala:
Main.scala:
Output
The match in
qux0Impl
fails:If
?
insideclass Wrapper[T <: Container[?]]
gets replaced withInt
, thenqux0Impl
seems to work correctly butqux2Impl
stops compiling, producing the error:Expectation
All
qux
cases should compile in both variants (withclass Wrapper[T <: Container[?]]
orclass Wrapper[T <: Container[Int]]
), capturing the following types asx
:qux0
->Container[Int]
qux1
->Box[Int]
qux2
->Int
The text was updated successfully, but these errors were encountered: