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.
2 parents 776bb11 + f7986c1 commit 67f11ffCopy full SHA for 67f11ff
tests/init/neg/promotion-segment.scala
@@ -0,0 +1,12 @@
1
+class Outer:
2
+ trait A:
3
+ def foo() = println(m)
4
+
5
+ trait B extends A
6
7
+ class C extends B
8
9
+ def bar(c: C) = c.foo()
10
11
+ bar(new C) // error
12
+ val m = 10
tests/init/neg/promotion-segment2.scala
+trait A(o: Outer):
+ def foo() = println(o.m)
+ class C extends B with A(this)
0 commit comments