Skip to content

Commit 68862b1

Browse files
committed
Add test
1 parent c619dd7 commit 68862b1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/pos/i6909.scala

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import scala.compiletime.memo
2+
trait Foo[A]
3+
4+
5+
trait Qux {
6+
private[this] var x: Int | Null = null
7+
def f = {
8+
if (x == null) x = 22
9+
x.asInstanceOf[Int]
10+
}
11+
def g = memo(new Foo[Int] {})
12+
//
13+
//given as Foo[Int] = new Foo[Int] {}
14+
}

0 commit comments

Comments
 (0)