We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1a92a5 commit 282e27bCopy full SHA for 282e27b
tests/pos/i7250.scala
@@ -0,0 +1,11 @@
1
+import compiletime.erasedValue
2
+
3
+sealed trait Foo
4
+trait A extends Foo
5
+trait B[H] extends Foo
6
7
+inline given f[T <: Foo]: T = inline erasedValue[T] match
8
+ case _: A => new A{}.asInstanceOf[T]
9
+ case _: B[a] => summon[a].asInstanceOf[T]
10
11
+@main def Test = println(f[B[Int]])
0 commit comments