Skip to content

Commit 613e531

Browse files
New check files
1 parent eeda1d8 commit 613e531

18 files changed

+569
-266
lines changed

tests/neg-macros/i6432.check

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,42 @@
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+
checking tests/neg-macros/i6432/Macro_1.scala after phase frontend
2+
checking tests/neg-macros/i6432/Macro_1.scala after phase inlinedPositions
3+
checking tests/neg-macros/i6432/Macro_1.scala after phase staging
4+
checking tests/neg-macros/i6432/Macro_1.scala after phase posttyper
5+
checking tests/neg-macros/i6432/Macro_1.scala after phase pickler
6+
checking tests/neg-macros/i6432/Macro_1.scala after phase reifyQuotes
7+
checking tests/neg-macros/i6432/Macro_1.scala after phase MegaPhase{firstTransform, checkReentrant, elimPackagePrefixes, cookComments}
8+
checking tests/neg-macros/i6432/Macro_1.scala after phase MegaPhase{checkStatic, elimRepeated, expandSAMs, protectedAccessors, extmethods, shortcutImplicits, byNameClosures, hoistSuperArgs, classOf, refchecks}
9+
-- [E029] Pattern Match Exhaustivity Warning: tests/neg-macros/i6432/Macro_1.scala:11:4 --------------------------------
10+
11 | sc match {
11+
| ^^
12+
| match may not be exhaustive.
13+
|
14+
| It would fail on pattern case: _: Expr[StringContext]
15+
16+
longer explanation available when compiling with `-explain`
17+
checking tests/neg-macros/i6432/Macro_1.scala after phase MegaPhase{elimOpaque, tryCatchPatterns, patternMatcher, explicitOuter, explicitSelf, stringInterpolatorOpt, crossCast}
18+
checking tests/neg-macros/i6432/Macro_1.scala after phase MegaPhase{pruneErasedDefs, vcInlineMethods, seqLiterals, intercepted, getters, elimByName, collectNullableFields, elimOuterSelect, augmentScala2Traits, resolveSuper, functionXXLForwarders, arrayConstructors}
19+
checking tests/neg-macros/i6432/Macro_1.scala after phase erasure
20+
checking tests/neg-macros/i6432/Macro_1.scala after phase MegaPhase{elimErasedValueType, vcElideAllocations, tailrec, mixin, lazyVals, memoize, nonLocalReturns, capturedVars}
21+
checking tests/neg-macros/i6432/Macro_1.scala after phase MegaPhase{constructors, functionalInterfaces, getClass, liftTry}
22+
checking tests/neg-macros/i6432/Macro_1.scala after phase MegaPhase{linkScala2Impls, lambdaLift, elimStaticThis}
23+
checking tests/neg-macros/i6432/Macro_1.scala after phase MegaPhase{flatten, renameLifted, transformWildcards, moveStatic, expandPrivate, restoreScopes, selectStatic, collectEntryPoints, collectSuperCalls}
24+
checking tests/neg-macros/i6432/Macro_1.scala after phase genSJSIR
25+
checking tests/neg-macros/i6432/Macro_1.scala after phase genBCode
26+
one warning found
27+
-- Error: tests/neg-macros/i6432/Test_2.scala:4:6 ----------------------------------------------------------------------
28+
4 | foo"abc${"123"}xyz${"456"}fgh" // error // error // error
29+
| ^^^
30+
| abc
31+
| This location is in code that was inlined at Test_2.scala:4
32+
-- Error: tests/neg-macros/i6432/Test_2.scala:4:17 ---------------------------------------------------------------------
33+
4 | foo"abc${"123"}xyz${"456"}fgh" // error // error // error
34+
| ^^^
35+
| xyz
36+
| This location is in code that was inlined at Test_2.scala:4
37+
-- Error: tests/neg-macros/i6432/Test_2.scala:4:28 ---------------------------------------------------------------------
38+
4 | foo"abc${"123"}xyz${"456"}fgh" // error // error // error
39+
| ^^^
40+
| fgh
41+
| This location is in code that was inlined at Test_2.scala:4
42+
three errors found

tests/neg-macros/i6432b.check

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,42 @@
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+
checking tests/neg-macros/i6432b/Macro_1.scala after phase frontend
2+
checking tests/neg-macros/i6432b/Macro_1.scala after phase inlinedPositions
3+
checking tests/neg-macros/i6432b/Macro_1.scala after phase staging
4+
checking tests/neg-macros/i6432b/Macro_1.scala after phase posttyper
5+
checking tests/neg-macros/i6432b/Macro_1.scala after phase pickler
6+
checking tests/neg-macros/i6432b/Macro_1.scala after phase reifyQuotes
7+
checking tests/neg-macros/i6432b/Macro_1.scala after phase MegaPhase{firstTransform, checkReentrant, elimPackagePrefixes, cookComments}
8+
checking tests/neg-macros/i6432b/Macro_1.scala after phase MegaPhase{checkStatic, elimRepeated, expandSAMs, protectedAccessors, extmethods, shortcutImplicits, byNameClosures, hoistSuperArgs, classOf, refchecks}
9+
-- [E029] Pattern Match Exhaustivity Warning: tests/neg-macros/i6432b/Macro_1.scala:11:4 -------------------------------
10+
11 | sc match {
11+
| ^^
12+
| match may not be exhaustive.
13+
|
14+
| It would fail on pattern case: _: Expr[StringContext]
15+
16+
longer explanation available when compiling with `-explain`
17+
checking tests/neg-macros/i6432b/Macro_1.scala after phase MegaPhase{elimOpaque, tryCatchPatterns, patternMatcher, explicitOuter, explicitSelf, stringInterpolatorOpt, crossCast}
18+
checking tests/neg-macros/i6432b/Macro_1.scala after phase MegaPhase{pruneErasedDefs, vcInlineMethods, seqLiterals, intercepted, getters, elimByName, collectNullableFields, elimOuterSelect, augmentScala2Traits, resolveSuper, functionXXLForwarders, arrayConstructors}
19+
checking tests/neg-macros/i6432b/Macro_1.scala after phase erasure
20+
checking tests/neg-macros/i6432b/Macro_1.scala after phase MegaPhase{elimErasedValueType, vcElideAllocations, tailrec, mixin, lazyVals, memoize, nonLocalReturns, capturedVars}
21+
checking tests/neg-macros/i6432b/Macro_1.scala after phase MegaPhase{constructors, functionalInterfaces, getClass, liftTry}
22+
checking tests/neg-macros/i6432b/Macro_1.scala after phase MegaPhase{linkScala2Impls, lambdaLift, elimStaticThis}
23+
checking tests/neg-macros/i6432b/Macro_1.scala after phase MegaPhase{flatten, renameLifted, transformWildcards, moveStatic, expandPrivate, restoreScopes, selectStatic, collectEntryPoints, collectSuperCalls}
24+
checking tests/neg-macros/i6432b/Macro_1.scala after phase genSJSIR
25+
checking tests/neg-macros/i6432b/Macro_1.scala after phase genBCode
26+
one warning found
27+
-- Error: tests/neg-macros/i6432b/Test_2.scala:4:8 ---------------------------------------------------------------------
28+
4 | foo"""abc${"123"}xyz${"456"}fgh""" // error // error // error
29+
| ^^^
30+
| abc
31+
| This location is in code that was inlined at Test_2.scala:4
32+
-- Error: tests/neg-macros/i6432b/Test_2.scala:4:19 --------------------------------------------------------------------
33+
4 | foo"""abc${"123"}xyz${"456"}fgh""" // error // error // error
34+
| ^^^
35+
| xyz
36+
| This location is in code that was inlined at Test_2.scala:4
37+
-- Error: tests/neg-macros/i6432b/Test_2.scala:4:30 --------------------------------------------------------------------
38+
4 | foo"""abc${"123"}xyz${"456"}fgh""" // error // error // error
39+
| ^^^
40+
| fgh
41+
| This location is in code that was inlined at Test_2.scala:4
42+
three errors found

tests/neg/classOf.check

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
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
15+
three errors found

tests/neg/doubleDefinition.check

Lines changed: 139 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,139 @@
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.
139+
22 errors found

0 commit comments

Comments
 (0)