Skip to content

Commit 344d99b

Browse files
authored
Merge pull request scala#10478 from SethTisue/fix-migration-semantic-merge-conflict
2 parents 045009a + df6c93b commit 344d99b

File tree

7 files changed

+38
-0
lines changed

7 files changed

+38
-0
lines changed

test/files/neg/t11921-alias.check

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,35 @@ it is both defined in the enclosing object O and inherited in the enclosing clas
33
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
44
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.TT`.
55
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
68
def n(x: TT) = x // ambiguous
79
^
810
t11921-alias.scala:38: error: reference to c is ambiguous;
911
it is both defined in the enclosing class B and inherited in the enclosing anonymous class as value c (defined in class A)
1012
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
1113
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.c`.
1214
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
1317
def n = c // ambiguous
1418
^
1519
t11921-alias.scala:57: error: reference to name is ambiguous;
1620
it is both defined in the enclosing method m and inherited in the enclosing anonymous class as value name (defined in class C)
1721
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
1822
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.name`.
1923
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>
2026
println(name)
2127
^
2228
t11921-alias.scala:67: error: reference to name is ambiguous;
2329
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)
2430
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
2531
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.name`.
2632
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>
2735
println(name)
2836
^
2937
4 errors

test/files/neg/t11921.check

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ it is both defined in the enclosing method lazyMap and inherited in the enclosin
88
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
99
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.coll`.
1010
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
11+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
12+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=C.lazyMap.$anon.iterator
1113
def iterator = coll.iterator.map(f) // coll is ambiguous
1214
^
1315
2 errors

test/files/neg/t11921b.check

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,55 +6,71 @@ it is both defined in the enclosing object Test and inherited in the enclosing c
66
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
77
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.x`.
88
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>
911
println(x) // error
1012
^
1113
t11921b.scala:15: error: reference to x is ambiguous;
1214
it is both defined in the enclosing object Test and inherited in the enclosing anonymous class as value x (defined in class C)
1315
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
1416
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.x`.
1517
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>
1620
println(x) // error
1721
^
1822
t11921b.scala:26: error: reference to y is ambiguous;
1923
it is both defined in the enclosing method c and inherited in the enclosing anonymous class as value y (defined in class D)
2024
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
2125
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.y`.
2226
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>
2329
println(y) // error
2430
^
2531
t11921b.scala:38: error: reference to y is ambiguous;
2632
it is both defined in the enclosing method c and inherited in the enclosing class E as value y (defined in class D)
2733
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
2834
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `E.this.y`.
2935
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>
3038
println(y) // error
3139
^
3240
t11921b.scala:65: error: reference to global is ambiguous;
3341
it is both defined in the enclosing package <empty> and inherited in the enclosing object D as value global (defined in class C)
3442
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
3543
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.global`.
3644
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>
3747
println(global) // error
3848
^
3949
t11921b.scala:75: error: reference to x is ambiguous;
4050
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)
4151
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
4252
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `C.this.x`.
4353
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
4456
def t = x // ambiguous, message mentions parent B
4557
^
4658
t11921b.scala:89: error: reference to a is ambiguous;
4759
it is both defined in the enclosing class C and inherited in the enclosing trait J as method a (defined in trait I)
4860
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
4961
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.a`.
5062
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
5165
val t = a // error
5266
^
5367
t11921b.scala:136: error: reference to lo is ambiguous;
5468
it is both defined in the enclosing object test10 and inherited in the enclosing class C as value lo (defined in class P)
5569
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
5670
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.lo`.
5771
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
5874
def v = t(lo) // error
5975
^
6076
9 errors

test/files/neg/t12816.check

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ it is both defined in the enclosing package p and inherited in the enclosing tra
99
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
1010
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.c`.
1111
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
12+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
13+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=p.RR.m3
1214
def m3 = c // warn
1315
^
1416
t12816.scala:33: error: reference to Z is ambiguous;
1517
it is both defined in the enclosing package p and inherited in the enclosing trait RR as trait Z (defined in trait T)
1618
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
1719
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.Z`.
1820
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
21+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
22+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=p.RR.n3
1923
def n3: Z // warn
2024
^
2125
3 errors

test/files/neg/t12816b.check

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ it is both defined in the enclosing package p and inherited in the enclosing tra
99
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
1010
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.c`.
1111
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
12+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
13+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=p.RR.m3
1214
def m3 = c // warn
1315
^
1416
B.scala:23: error: reference to Z is ambiguous;
1517
it is both defined in the enclosing package p and inherited in the enclosing trait RR as trait Z (defined in trait T)
1618
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
1719
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.Z`.
1820
Or use `-Wconf:msg=legacy-binding:s` to silence this warning.
21+
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
22+
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=p.RR.n3
1923
def n3: Z // warn
2024
^
2125
3 errors

test/files/neg/using-source3.check

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ it is both defined in the enclosing class D and inherited in the enclosing class
33
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
44
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.f`.
55
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=D.E.g
68
def g = f
79
^
810
1 error

test/files/neg/using-source3b.check

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ it is both defined in the enclosing class D and inherited in the enclosing class
33
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
44
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.f`.
55
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=D.E.g
68
def g = f
79
^
810
1 error

0 commit comments

Comments
 (0)