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
typeToInt[X] =Int@main defexample=valxs= (???, ???)
xs.map[ToInt]([C] => (x1: C) => x1 match {
casex2: ([V] => () =>Int) =>
x2[Int]()
case _ =>42
})
Output
x2[Int]()
^Type argument Int does not conform to upper bound _
Expectation
When trying to find a workaround to #13918, I stumbled across this weird error.
It seems like the _ should not be there, and if it should, I don't find the documentation on it.
The text was updated successfully, but these errors were encountered:
Note that the error here is different now as of 3.3.1-RC1-bin-20230514-b0ccf40-NIGHTLY.
[warn] ./example.scala:12:16
[warn] the type test for [V] => () => Int cannot be checked at runtime because it's a refinement type
[warn] case x2: ([V] => () => Int) =>
[warn] ^
Compiled project (Scala 3.3.1-RC1-bin-20230514-b0ccf40-NIGHTLY, JVM)
Compiler version
3.1.2-RC1-bin-20211025-968dd1b-NIGHTLY
Minimized code
Output
Expectation
When trying to find a workaround to #13918, I stumbled across this weird error.
It seems like the
_
should not be there, and if it should, I don't find the documentation on it.The text was updated successfully, but these errors were encountered: