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 f5b9572 + 196857f commit c04eb15Copy full SHA for c04eb15
tests/neg/type-projections.scala
@@ -0,0 +1,26 @@
1
+class Test {
2
+ type A
3
+
4
+ class Inner {
5
+ type B
6
+ type Balias = B
7
+ type Aalias = A
8
+ type Intalias = Int
9
+ }
10
11
+ type T <: Inner
12
+ type U = Inner
13
14
+ def x0: T#B = ??? // error
15
+ def x1: T#Balias = ??? // error
16
+ def x2: T#Aalias = ??? // error
17
+ def x3: T#Intalias = ??? // error
18
+ def y0: U#B = ??? // ok
19
+ def y1: U#Balias = ??? // ok
20
+ def y2: U#Aalias = ??? // ok
21
+ def y3: U#Intalias = ??? // ok
22
+ def z0: Inner#B = ??? // ok
23
+ def z1: Inner#Balias = ??? // ok
24
+ def z2: Inner#Aalias = ??? // ok
25
+ def z3: Inner#Intalias = ??? // ok
26
+}
0 commit comments