Skip to content

Commit a7cee09

Browse files
New check files
1 parent cf5b490 commit a7cee09

18 files changed

+441
-266
lines changed

tests/neg-macros/i6432.check

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
[61..64] in Test_2.scala
2-
fgh
3-
[50..53] in Test_2.scala
4-
xyz
5-
[39..42] in Test_2.scala
6-
abc
1+
2+
-- Error: tests/neg-macros/i6432/Test_2.scala:4:6 ----------------------------------------------------------------------
3+
4 | foo"abc${"123"}xyz${"456"}fgh" // error // error // error
4+
| ^^^
5+
| abc
6+
| This location is in code that was inlined at Test_2.scala:4
7+
-- Error: tests/neg-macros/i6432/Test_2.scala:4:17 ---------------------------------------------------------------------
8+
4 | foo"abc${"123"}xyz${"456"}fgh" // error // error // error
9+
| ^^^
10+
| xyz
11+
| This location is in code that was inlined at Test_2.scala:4
12+
-- Error: tests/neg-macros/i6432/Test_2.scala:4:28 ---------------------------------------------------------------------
13+
4 | foo"abc${"123"}xyz${"456"}fgh" // error // error // error
14+
| ^^^
15+
| fgh
16+
| This location is in code that was inlined at Test_2.scala:4

tests/neg-macros/i6432b.check

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
[63..66] in Test_2.scala
2-
fgh
3-
[52..55] in Test_2.scala
4-
xyz
5-
[41..44] in Test_2.scala
6-
abc
1+
2+
-- Error: tests/neg-macros/i6432b/Test_2.scala:4:8 ---------------------------------------------------------------------
3+
4 | foo"""abc${"123"}xyz${"456"}fgh""" // error // error // error
4+
| ^^^
5+
| abc
6+
| This location is in code that was inlined at Test_2.scala:4
7+
-- Error: tests/neg-macros/i6432b/Test_2.scala:4:19 --------------------------------------------------------------------
8+
4 | foo"""abc${"123"}xyz${"456"}fgh""" // error // error // error
9+
| ^^^
10+
| xyz
11+
| This location is in code that was inlined at Test_2.scala:4
12+
-- Error: tests/neg-macros/i6432b/Test_2.scala:4:30 --------------------------------------------------------------------
13+
4 | foo"""abc${"123"}xyz${"456"}fgh""" // error // error // error
14+
| ^^^
15+
| fgh
16+
| This location is in code that was inlined at Test_2.scala:4

tests/neg/classOf.check

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
[181..202] in classOf.scala
2-
Test.C{I = String} is not a class type
3-
[116..117] in classOf.scala
4-
T is not a class type
5-
6-
where: T is a type in method f2 with bounds <: String
7-
[72..73] in classOf.scala
8-
T is not a class type
1+
-- Error: tests/neg/classOf.scala:6:22 ---------------------------------------------------------------------------------
2+
6 | def f1[T] = classOf[T] // error
3+
| ^
4+
| T is not a class type
5+
-- Error: tests/neg/classOf.scala:7:32 ---------------------------------------------------------------------------------
6+
7 | def f2[T <: String] = classOf[T] // error
7+
| ^
8+
| T is not a class type
9+
|
10+
| where: T is a type in method f2 with bounds <: String
11+
-- Error: tests/neg/classOf.scala:9:18 ---------------------------------------------------------------------------------
12+
9 | val y = classOf[C { type I = String }] // error
13+
| ^^^^^^^^^^^^^^^^^^^^^
14+
| Test.C{I = String} is not a class type

tests/neg/doubleDefinition.check

Lines changed: 138 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,138 @@
1-
<2471..2471> in doubleDefinition.scala
2-
Double definition:
3-
def foo: [T <: Int](x: T): T in class Test20 at line 143 and
4-
def foo: [S <: Int, T <: Int](x: S): T in class Test20 at line 144
5-
have the same type after erasure.
6-
<2338..2338> in doubleDefinition.scala
7-
Double definition:
8-
def foo: [T <: Int](x: T): T in class Test19 at line 137 and
9-
def foo(x: Int): Int in class Test19 at line 138
10-
have the same type after erasure.
11-
<2016..2016> in doubleDefinition.scala
12-
Double definition:
13-
var foo: Int in class Test16 at line 115 and
14-
def foo: => Int in class Test16 at line 116
15-
<1949..1949> in doubleDefinition.scala
16-
Double definition:
17-
var foo: Int in class Test15 at line 111 and
18-
def foo: => String in class Test15 at line 112
19-
<1885..1885> in doubleDefinition.scala
20-
Double definition:
21-
var foo: Int in class Test14 at line 107 and
22-
def foo: => Int in class Test14 at line 108
23-
<1827..1827> in doubleDefinition.scala
24-
Double definition:
25-
var foo: Int in class Test13 at line 103 and
26-
def foo: => String in class Test13 at line 104
27-
<1772..1772> in doubleDefinition.scala
28-
Double definition:
29-
val foo: Int in class Test12 at line 99 and
30-
def foo: => Int in class Test12 at line 100
31-
<1705..1705> in doubleDefinition.scala
32-
Double definition:
33-
val foo: Int in class Test11 at line 95 and
34-
def foo: => String in class Test11 at line 96
35-
<1641..1641> in doubleDefinition.scala
36-
Double definition:
37-
val foo: Int in class Test10 at line 91 and
38-
def foo: => Int in class Test10 at line 92
39-
<1583..1583> in doubleDefinition.scala
40-
Double definition:
41-
val foo: Int in class Test9 at line 87 and
42-
def foo: => String in class Test9 at line 88
43-
<1481..1481> in doubleDefinition.scala
44-
Double definition:
45-
var foo: Int in class Test8d at line 81 and
46-
def foo: => Int in class Test8d at line 82
47-
<1428..1428> in doubleDefinition.scala
48-
Double definition:
49-
def foo: => Int in class Test8c at line 76 and
50-
var foo: Int in class Test8c at line 77
51-
<1375..1375> in doubleDefinition.scala
52-
Double definition:
53-
def foo: => Int in class Test8b at line 71 and
54-
val foo: Int in class Test8b at line 72
55-
<1322..1322> in doubleDefinition.scala
56-
Double definition:
57-
val foo: Int in class Test8 at line 66 and
58-
def foo: => Int in class Test8 at line 67
59-
<1236..1236> in doubleDefinition.scala
60-
Double definition:
61-
def foo(x: List[A]): A => A in trait Test7 at line 61 and
62-
def foo(x: List[A]): (B, B) => B in trait Test7 at line 62
63-
have matching parameter types.
64-
<984..984> in doubleDefinition.scala
65-
Double definition:
66-
def foo(x: List[A]): A => A in trait Test6 at line 54 and
67-
def foo(x: List[B]): B => B in trait Test6 at line 55
68-
have the same type after erasure.
69-
<739..739> in doubleDefinition.scala
70-
Double definition:
71-
var foo: Int in class Test4d at line 40 and
72-
def foo: => Int in class Test4d at line 41
73-
<686..686> in doubleDefinition.scala
74-
Double definition:
75-
def foo: => Int in class Test4c at line 35 and
76-
var foo: Int in class Test4c at line 36
77-
<633..633> in doubleDefinition.scala
78-
Double definition:
79-
def foo: => Int in class Test4b at line 30 and
80-
val foo: Int in class Test4b at line 31
81-
<580..580> in doubleDefinition.scala
82-
Double definition:
83-
val foo: Int in class Test4 at line 25 and
84-
def foo: => Int in class Test4 at line 26
85-
<494..494> in doubleDefinition.scala
86-
Double definition:
87-
def foo(x: List[A]): A => A in class Test3 at line 20 and
88-
def foo(x: List[A]): (B, B) => B in class Test3 at line 21
89-
have matching parameter types.
90-
<242..242> in doubleDefinition.scala
91-
Double definition:
92-
def foo(x: List[A]): A => A in class Test2 at line 13 and
93-
def foo(x: List[B]): B => B in class Test2 at line 14
94-
have the same type after erasure.
1+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:14:4 ------------------------------------------------
2+
14 | def foo(x: List[B]): Function1[B, B] = ??? // error: same jvm signature
3+
| ^
4+
| Double definition:
5+
| def foo(x: List[A]): A => A in class Test2 at line 13 and
6+
| def foo(x: List[B]): B => B in class Test2 at line 14
7+
| have the same type after erasure.
8+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:21:4 ------------------------------------------------
9+
21 | def foo(x: List[A]): Function2[B, B, B] = ??? // error
10+
| ^
11+
| Double definition:
12+
| def foo(x: List[A]): A => A in class Test3 at line 20 and
13+
| def foo(x: List[A]): (B, B) => B in class Test3 at line 21
14+
| have matching parameter types.
15+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:26:4 ------------------------------------------------
16+
26 | def foo = 2 // error
17+
| ^
18+
| Double definition:
19+
| val foo: Int in class Test4 at line 25 and
20+
| def foo: => Int in class Test4 at line 26
21+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:31:4 ------------------------------------------------
22+
31 | val foo = 1 // error
23+
| ^
24+
| Double definition:
25+
| def foo: => Int in class Test4b at line 30 and
26+
| val foo: Int in class Test4b at line 31
27+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:36:4 ------------------------------------------------
28+
36 | var foo = 1 // error
29+
| ^
30+
| Double definition:
31+
| def foo: => Int in class Test4c at line 35 and
32+
| var foo: Int in class Test4c at line 36
33+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:41:4 ------------------------------------------------
34+
41 | def foo = 2 // error
35+
| ^
36+
| Double definition:
37+
| var foo: Int in class Test4d at line 40 and
38+
| def foo: => Int in class Test4d at line 41
39+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:55:4 ------------------------------------------------
40+
55 | def foo(x: List[B]): Function1[B, B] = ??? // error: same jvm signature
41+
| ^
42+
| Double definition:
43+
| def foo(x: List[A]): A => A in trait Test6 at line 54 and
44+
| def foo(x: List[B]): B => B in trait Test6 at line 55
45+
| have the same type after erasure.
46+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:62:4 ------------------------------------------------
47+
62 | def foo(x: List[A]): Function2[B, B, B] = ??? // error
48+
| ^
49+
| Double definition:
50+
| def foo(x: List[A]): A => A in trait Test7 at line 61 and
51+
| def foo(x: List[A]): (B, B) => B in trait Test7 at line 62
52+
| have matching parameter types.
53+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:67:4 ------------------------------------------------
54+
67 | def foo = 2 // error
55+
| ^
56+
| Double definition:
57+
| val foo: Int in class Test8 at line 66 and
58+
| def foo: => Int in class Test8 at line 67
59+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:72:4 ------------------------------------------------
60+
72 | val foo = 1 // error
61+
| ^
62+
| Double definition:
63+
| def foo: => Int in class Test8b at line 71 and
64+
| val foo: Int in class Test8b at line 72
65+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:77:4 ------------------------------------------------
66+
77 | var foo = 1 // error
67+
| ^
68+
| Double definition:
69+
| def foo: => Int in class Test8c at line 76 and
70+
| var foo: Int in class Test8c at line 77
71+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:82:4 ------------------------------------------------
72+
82 | def foo = 2 // error
73+
| ^
74+
| Double definition:
75+
| var foo: Int in class Test8d at line 81 and
76+
| def foo: => Int in class Test8d at line 82
77+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:88:4 ------------------------------------------------
78+
88 | def foo: String // error
79+
| ^
80+
| Double definition:
81+
| val foo: Int in class Test9 at line 87 and
82+
| def foo: => String in class Test9 at line 88
83+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:92:4 ------------------------------------------------
84+
92 | def foo: Int // error
85+
| ^
86+
| Double definition:
87+
| val foo: Int in class Test10 at line 91 and
88+
| def foo: => Int in class Test10 at line 92
89+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:96:4 ------------------------------------------------
90+
96 | def foo: String // error
91+
| ^
92+
| Double definition:
93+
| val foo: Int in class Test11 at line 95 and
94+
| def foo: => String in class Test11 at line 96
95+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:100:4 -----------------------------------------------
96+
100 | def foo: Int // error
97+
| ^
98+
| Double definition:
99+
| val foo: Int in class Test12 at line 99 and
100+
| def foo: => Int in class Test12 at line 100
101+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:104:4 -----------------------------------------------
102+
104 | def foo: String // error
103+
| ^
104+
| Double definition:
105+
| var foo: Int in class Test13 at line 103 and
106+
| def foo: => String in class Test13 at line 104
107+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:108:4 -----------------------------------------------
108+
108 | def foo: Int // error
109+
| ^
110+
| Double definition:
111+
| var foo: Int in class Test14 at line 107 and
112+
| def foo: => Int in class Test14 at line 108
113+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:112:4 -----------------------------------------------
114+
112 | def foo: String // error
115+
| ^
116+
| Double definition:
117+
| var foo: Int in class Test15 at line 111 and
118+
| def foo: => String in class Test15 at line 112
119+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:116:4 -----------------------------------------------
120+
116 | def foo: Int // error
121+
| ^
122+
| Double definition:
123+
| var foo: Int in class Test16 at line 115 and
124+
| def foo: => Int in class Test16 at line 116
125+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:138:6 -----------------------------------------------
126+
138 | def foo(x: Int): Int = x // error
127+
| ^
128+
| Double definition:
129+
| def foo: [T <: Int](x: T): T in class Test19 at line 137 and
130+
| def foo(x: Int): Int in class Test19 at line 138
131+
| have the same type after erasure.
132+
-- [E120] Duplicate Symbol Error: tests/neg/doubleDefinition.scala:144:6 -----------------------------------------------
133+
144 | def foo[S <: Int, T <: Int](x: S): T = ??? // error
134+
| ^
135+
| Double definition:
136+
| def foo: [T <: Int](x: T): T in class Test20 at line 143 and
137+
| def foo: [S <: Int, T <: Int](x: S): T in class Test20 at line 144
138+
| have the same type after erasure.

tests/neg/exports.check

Lines changed: 49 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,49 @@
1-
<1150..1150> in exports.scala
2-
Cyclic reference involving value bar
3-
[1091..1094] in exports.scala
4-
no eligible member foo at this.foo
5-
this.foo.foo cannot be exported because it is already a member of class Foo
6-
[991..997] in exports.scala
7-
no eligible member concat at this
8-
this.concat cannot be exported because it is already a member of trait IterableOps
9-
<647..647> in exports.scala
10-
Double definition:
11-
final def status: => List[String] in class Copier at line 23 and
12-
final def status: => List[String] in class Copier at line 24
13-
have the same type after erasure.
14-
<596..596> in exports.scala
15-
Double definition:
16-
def status: => List[String] in class Copier at line 28 and
17-
final def status: => List[String] in class Copier at line 23
18-
have the same type after erasure.
19-
[785..791] in exports.scala
20-
no eligible member status at this.printUnit
21-
this.printUnit.status cannot be exported because it is not implied
22-
[712..718] in exports.scala
23-
no eligible member bitmap at this.printUnit
24-
this.printUnit.bitmap cannot be exported because it is implied
25-
[518..525] in exports.scala
26-
no eligible member scanAll at this.scanUnit
27-
this.scanUnit.scanAll cannot be exported because it is not accessible
28-
[452..458] in exports.scala
29-
no eligible member scanIt at this.scanUnit
1+
-- Error: tests/neg/exports.scala:21:20 --------------------------------------------------------------------------------
2+
21 | export scanUnit.scanIt // error: no eligible member
3+
| ^^^^^^
4+
| no eligible member scanIt at this.scanUnit
5+
-- Error: tests/neg/exports.scala:22:21 --------------------------------------------------------------------------------
6+
22 | export scanUnit.{scanAll => foo} // error: no eligible member
7+
| ^^^^^^^
8+
| no eligible member scanAll at this.scanUnit
9+
| this.scanUnit.scanAll cannot be exported because it is not accessible
10+
-- Error: tests/neg/exports.scala:25:21 --------------------------------------------------------------------------------
11+
25 | export printUnit.bitmap // error: no eligible member
12+
| ^^^^^^
13+
| no eligible member bitmap at this.printUnit
14+
| this.printUnit.bitmap cannot be exported because it is implied
15+
-- Error: tests/neg/exports.scala:26:29 --------------------------------------------------------------------------------
16+
26 | export implied printUnit.status // error: no eligible member
17+
| ^^^^^^
18+
| no eligible member status at this.printUnit
19+
| this.printUnit.status cannot be exported because it is not implied
20+
-- [E120] Duplicate Symbol Error: tests/neg/exports.scala:23:33 --------------------------------------------------------
21+
23 | export printUnit.{stat => _, _} // error: double definition
22+
| ^
23+
| Double definition:
24+
| def status: => List[String] in class Copier at line 28 and
25+
| final def status: => List[String] in class Copier at line 23
26+
| have the same type after erasure.
27+
-- [E120] Duplicate Symbol Error: tests/neg/exports.scala:24:20 --------------------------------------------------------
28+
24 | export scanUnit._ // error: double definition
29+
| ^
30+
| Double definition:
31+
| final def status: => List[String] in class Copier at line 23 and
32+
| final def status: => List[String] in class Copier at line 24
33+
| have the same type after erasure.
34+
-- Error: tests/neg/exports.scala:35:15 --------------------------------------------------------------------------------
35+
35 | export this.{concat => ++} // error: no eligible member
36+
| ^^^^^^
37+
| no eligible member concat at this
38+
| this.concat cannot be exported because it is already a member of trait IterableOps
39+
-- Error: tests/neg/exports.scala:41:13 --------------------------------------------------------------------------------
40+
41 | export foo.foo // error: no eligible member
41+
| ^^^
42+
| no eligible member foo at this.foo
43+
| this.foo.foo cannot be exported because it is already a member of class Foo
44+
-- [E046] Cyclic Error: tests/neg/exports.scala:45:11 ------------------------------------------------------------------
45+
45 | val bar: Bar = new Bar // error: cyclic reference
46+
| ^
47+
| Cyclic reference involving value bar
48+
49+
longer explanation available when compiling with `-explain`

0 commit comments

Comments
 (0)