-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
The following compiles under dotty but fails in scalac.
class Foo {
def foo[T]: Int = 9
Option(9) match {
case Some(foo[Int]) =>
}
}
foo[Int]
is taken as a value.
Which is translated as
matchResult1[Unit]:
{
case val x1: Option[Int] = Option.apply[Int](9)
if
x1.$isInstanceOf$[Some[Int]].&&(
this.foo[Int].==(x1.$asInstanceOf$[Some[Int]].value)
)
then
return[matchResult1]
{
()
}
else ()
throw new MatchError(x1)
}