-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
backlogNo work planned on this by the core team for the time being.No work planned on this by the core team for the time being.itype:language enhancement
Description
The following is rejected,
import scala.compiletime._
object Test {
type Foo[T] = T match {
case f[Int] => f[String]
}
val ls: Foo[List[Int]] = ???
}
object Test2 {
inline def summon[T] = implicit match {
case t: T => t
}
inline def foo[T] = inline erasedValue[T] match {
case _: f[Int] => summon[f[String]]
}
}
with,
-- [E006] Unbound Identifier Error: tests/pos/match-bugs.scala:5:9 -------------
5 | case f[Int] => f[String]
| ^
| Not found: type f
longer explanation available when compiling with `-explain`
-- [E006] Unbound Identifier Error: tests/pos/match-bugs.scala:5:19 ------------
5 | case f[Int] => f[String]
| ^
| Not found: type f
longer explanation available when compiling with `-explain`
-- [E006] Unbound Identifier Error: tests/pos/match-bugs.scala:17:12 -----------
17 | case _: f[Int] => summon[f[String]]
| ^
| Not found: type f
longer explanation available when compiling with `-explain`
-- [E006] Unbound Identifier Error: tests/pos/match-bugs.scala:17:29 -----------
17 | case _: f[Int] => summon[f[String]]
| ^
| Not found: type f
Metadata
Metadata
Assignees
Labels
backlogNo work planned on this by the core team for the time being.No work planned on this by the core team for the time being.itype:language enhancement