You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/files/neg/t11921-alias.check
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,27 +3,35 @@ it is both defined in the enclosing object O and inherited in the enclosing clas
3
3
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
4
4
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.TT`.
5
5
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
6
+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
7
+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=t2.O.D.n.x
6
8
def n(x: TT) = x // ambiguous
7
9
^
8
10
t11921-alias.scala:38: error: reference to c is ambiguous;
9
11
it is both defined in the enclosing class B and inherited in the enclosing anonymous class as value c (defined in class A)
10
12
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
11
13
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.c`.
12
14
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
15
+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
16
+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=t4.B.a.$anon.n
13
17
def n = c // ambiguous
14
18
^
15
19
t11921-alias.scala:57: error: reference to name is ambiguous;
16
20
it is both defined in the enclosing method m and inherited in the enclosing anonymous class as value name (defined in class C)
17
21
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
18
22
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.name`.
19
23
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
24
+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
25
+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=t6.Test.m.$anon.<local $anon>
20
26
println(name)
21
27
^
22
28
t11921-alias.scala:67: error: reference to name is ambiguous;
23
29
it is both defined in the enclosing method m and inherited in the enclosing anonymous class as value name (defined in class A, inherited through parent class C)
24
30
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
25
31
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.name`.
26
32
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
33
+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
34
+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=t7.Test.m.$anon.<local $anon>
Copy file name to clipboardExpand all lines: test/files/neg/t11921b.check
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,55 +6,71 @@ it is both defined in the enclosing object Test and inherited in the enclosing c
6
6
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
7
7
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.x`.
8
8
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
9
+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
10
+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=test1.Test.D.<local D>
9
11
println(x) // error
10
12
^
11
13
t11921b.scala:15: error: reference to x is ambiguous;
12
14
it is both defined in the enclosing object Test and inherited in the enclosing anonymous class as value x (defined in class C)
13
15
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
14
16
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.x`.
15
17
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
18
+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
19
+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=test1.Test.f.$anon.<local $anon>
16
20
println(x) // error
17
21
^
18
22
t11921b.scala:26: error: reference to y is ambiguous;
19
23
it is both defined in the enclosing method c and inherited in the enclosing anonymous class as value y (defined in class D)
20
24
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
21
25
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.y`.
22
26
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
27
+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
28
+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=test2.c.$anon.<local $anon>
23
29
println(y) // error
24
30
^
25
31
t11921b.scala:38: error: reference to y is ambiguous;
26
32
it is both defined in the enclosing method c and inherited in the enclosing class E as value y (defined in class D)
27
33
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
28
34
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `E.this.y`.
29
35
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
36
+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
37
+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=test3.c.E.F.<local F>
30
38
println(y) // error
31
39
^
32
40
t11921b.scala:65: error: reference to global is ambiguous;
33
41
it is both defined in the enclosing package <empty> and inherited in the enclosing object D as value global (defined in class C)
34
42
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
35
43
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.global`.
36
44
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
45
+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
46
+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=D.<local D>
37
47
println(global) // error
38
48
^
39
49
t11921b.scala:75: error: reference to x is ambiguous;
40
50
it is both defined in the enclosing object Uhu and inherited in the enclosing class C as value x (defined in class A, inherited through parent class B)
41
51
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
42
52
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `C.this.x`.
43
53
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
54
+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
55
+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=test5.Uhu.C.Inner.t
44
56
def t = x // ambiguous, message mentions parent B
45
57
^
46
58
t11921b.scala:89: error: reference to a is ambiguous;
47
59
it is both defined in the enclosing class C and inherited in the enclosing trait J as method a (defined in trait I)
48
60
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
49
61
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.a`.
50
62
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
63
+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
64
+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=test6.C.J.t
51
65
val t = a // error
52
66
^
53
67
t11921b.scala:136: error: reference to lo is ambiguous;
54
68
it is both defined in the enclosing object test10 and inherited in the enclosing class C as value lo (defined in class P)
55
69
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
56
70
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.lo`.
57
71
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
72
+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
73
+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=test10.C.v
0 commit comments