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 9b087ce commit 87f1d9cCopy full SHA for 87f1d9c
tests/neg/i5083c.scala
@@ -0,0 +1,25 @@
1
+class A(a: Int) {
2
+ trait X {
3
+ def f: Int
4
+ val x = a + f // NPE: the outer for `Y` is not yet set
5
+ }
6
+
7
+ trait Y {
8
+ val y = a
9
+ def f: Int = A.this.a // NPE: the outer for `Y` is not yet set
10
11
12
+ class Z(o: A) extends m.Y { // error
13
+ val m = o
14
15
16
+ class B extends Z(new A(4))
17
+}
18
19
20
+object Test {
21
+ def main(args: Array[String]): Unit = {
22
+ val a = new A(3)
23
+ new a.B
24
25
0 commit comments