Skip to content

Commit 039744e

Browse files
committed
Fix tests after rebase
1 parent 59b0b69 commit 039744e

File tree

5 files changed

+74
-80
lines changed

5 files changed

+74
-80
lines changed

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ class CompilationTests {
216216
@Test def checkInitGlobal: Unit = {
217217
implicit val testGroup: TestGroup = TestGroup("checkInitGlobal")
218218
val options = defaultOptions.and("-Ysafe-init-global", "-Xfatal-warnings")
219-
compileFilesInDir("tests/init-global/neg", options).checkExpectedErrors()
220-
compileFilesInDir("tests/init-global/pos", options).checkCompile()
221219
compileFilesInDir("tests/init-global/neg", options, FileFilter.exclude(TestSources.negInitGlobalScala2LibraryTastyBlacklisted)).checkExpectedErrors()
222220
compileFilesInDir("tests/init-global/warn", defaultOptions.and("-Ysafe-init-global"), FileFilter.exclude(TestSources.negInitGlobalScala2LibraryTastyBlacklisted)).checkWarnings()
223221
compileFilesInDir("tests/init-global/pos", options, FileFilter.exclude(TestSources.posInitGlobalScala2LibraryTastyBlacklisted)).checkCompile()
Lines changed: 60 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,60 @@
1-
-- Warning: tests/neg-scalajs/enumeration-warnings.scala:6:4 -----------------------------------------------------------
2-
6 | Value // warn
3-
| ^^^^^
4-
| Could not transform call to scala.Enumeration.Value.
5-
| The resulting program is unlikely to function properly as this operation requires reflection.
6-
-- Warning: tests/neg-scalajs/enumeration-warnings.scala:10:9 ----------------------------------------------------------
7-
10 | Value(4) // warn
8-
| ^^^^^^^^
9-
| Could not transform call to scala.Enumeration.Value.
10-
| The resulting program is unlikely to function properly as this operation requires reflection.
11-
-- Warning: tests/neg-scalajs/enumeration-warnings.scala:15:15 ---------------------------------------------------------
12-
15 | val a = Value(null) // warn
13-
| ^^^^^^^^^^^
14-
| Passing null as name to scala.Enumeration.Value requires reflection at run-time.
15-
| The resulting program is unlikely to function properly.
16-
-- Warning: tests/neg-scalajs/enumeration-warnings.scala:16:15 ---------------------------------------------------------
17-
16 | val b = Value(10, null) // warn
18-
| ^^^^^^^^^^^^^^^
19-
| Passing null as name to scala.Enumeration.Value requires reflection at run-time.
20-
| The resulting program is unlikely to function properly.
21-
-- Warning: tests/neg-scalajs/enumeration-warnings.scala:20:10 ---------------------------------------------------------
22-
20 | val a = new Val // warn
23-
| ^^^^^^^
24-
| Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time.
25-
| The resulting program is unlikely to function properly.
26-
-- Warning: tests/neg-scalajs/enumeration-warnings.scala:21:10 ---------------------------------------------------------
27-
21 | val b = new Val(10) // warn
28-
| ^^^^^^^^^^^
29-
| Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time.
30-
| The resulting program is unlikely to function properly.
31-
-- Warning: tests/neg-scalajs/enumeration-warnings.scala:25:10 ---------------------------------------------------------
32-
25 | val a = new Val(null) // warn
33-
| ^^^^^^^^^^^^^
34-
| Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time.
35-
| The resulting program is unlikely to function properly.
36-
-- Warning: tests/neg-scalajs/enumeration-warnings.scala:26:10 ---------------------------------------------------------
37-
26 | val b = new Val(10, null) // warn
38-
| ^^^^^^^^^^^^^^^^^
39-
| Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time.
40-
| The resulting program is unlikely to function properly.
41-
-- Warning: tests/neg-scalajs/enumeration-warnings.scala:30:31 ---------------------------------------------------------
42-
30 | protected class Val1 extends Val // warn
43-
| ^^^
44-
| Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time.
45-
| The resulting program is unlikely to function properly.
46-
-- Warning: tests/neg-scalajs/enumeration-warnings.scala:31:31 ---------------------------------------------------------
47-
31 | protected class Val2 extends Val(1) // warn
48-
| ^^^^^^
49-
| Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time.
50-
| The resulting program is unlikely to function properly.
51-
-- Warning: tests/neg-scalajs/enumeration-warnings.scala:35:31 ---------------------------------------------------------
52-
35 | protected class Val1 extends Val(null) // warn
53-
| ^^^^^^^^^
54-
| Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time.
55-
| The resulting program is unlikely to function properly.
56-
-- Warning: tests/neg-scalajs/enumeration-warnings.scala:36:31 ---------------------------------------------------------
57-
36 | protected class Val2 extends Val(1, null) // warn
58-
| ^^^^^^^^^^^^
59-
| Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time.
60-
| The resulting program is unlikely to function properly.
61-
No warnings can be incurred under -Werror.
1+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:6:4 -------------------------------------------------------------
2+
6 | Value // error
3+
^^^^^
4+
Could not transform call to scala.Enumeration.Value.
5+
The resulting program is unlikely to function properly as this operation requires reflection.
6+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:10:9 ------------------------------------------------------------
7+
10 | Value(4) // error
8+
^^^^^^^^
9+
Could not transform call to scala.Enumeration.Value.
10+
The resulting program is unlikely to function properly as this operation requires reflection.
11+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:15:15 -----------------------------------------------------------
12+
15 | val a = Value(null) // error
13+
^^^^^^^^^^^
14+
Passing null as name to scala.Enumeration.Value requires reflection at run-time.
15+
The resulting program is unlikely to function properly.
16+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:16:15 -----------------------------------------------------------
17+
16 | val b = Value(10, null) // error
18+
^^^^^^^^^^^^^^^
19+
Passing null as name to scala.Enumeration.Value requires reflection at run-time.
20+
The resulting program is unlikely to function properly.
21+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:20:10 -----------------------------------------------------------
22+
20 | val a = new Val // error
23+
^^^^^^^
24+
Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time.
25+
The resulting program is unlikely to function properly.
26+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:21:10 -----------------------------------------------------------
27+
21 | val b = new Val(10) // error
28+
^^^^^^^^^^^
29+
Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time.
30+
The resulting program is unlikely to function properly.
31+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:25:10 -----------------------------------------------------------
32+
25 | val a = new Val(null) // error
33+
^^^^^^^^^^^^^
34+
Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time.
35+
The resulting program is unlikely to function properly.
36+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:26:10 -----------------------------------------------------------
37+
26 | val b = new Val(10, null) // error
38+
^^^^^^^^^^^^^^^^^
39+
Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time.
40+
The resulting program is unlikely to function properly.
41+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:30:31 -----------------------------------------------------------
42+
30 | protected class Val1 extends Val // error
43+
^^^
44+
Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time.
45+
The resulting program is unlikely to function properly.
46+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:31:31 -----------------------------------------------------------
47+
31 | protected class Val2 extends Val(1) // error
48+
^^^^^^
49+
Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time.
50+
The resulting program is unlikely to function properly.
51+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:35:31 -----------------------------------------------------------
52+
35 | protected class Val1 extends Val(null) // error
53+
^^^^^^^^^
54+
Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time.
55+
The resulting program is unlikely to function properly.
56+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:36:31 -----------------------------------------------------------
57+
36 | protected class Val2 extends Val(1, null) // error
58+
^^^^^^^^^^^^
59+
Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time.
60+
The resulting program is unlikely to function properly.

tests/neg-scalajs/enumeration-warnings.scala

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,35 @@
33
class UnableToTransformValue extends Enumeration {
44
val a = {
55
println("oh, oh!")
6-
Value // warn
6+
Value // error
77
}
88
val b = {
99
println("oh, oh!")
10-
Value(4) // warn
10+
Value(4) // error
1111
}
1212
}
1313

1414
class ValueWithNullName extends Enumeration {
15-
val a = Value(null) // warn
16-
val b = Value(10, null) // warn
15+
val a = Value(null) // error
16+
val b = Value(10, null) // error
1717
}
1818

1919
class NewValWithNoName extends Enumeration {
20-
val a = new Val // warn
21-
val b = new Val(10) // warn
20+
val a = new Val // error
21+
val b = new Val(10) // error
2222
}
2323

2424
class NewValWithNullName extends Enumeration {
25-
val a = new Val(null) // warn
26-
val b = new Val(10, null) // warn
25+
val a = new Val(null) // error
26+
val b = new Val(10, null) // error
2727
}
2828

2929
class ExtendsValWithNoName extends Enumeration {
30-
protected class Val1 extends Val // warn
31-
protected class Val2 extends Val(1) // warn
30+
protected class Val1 extends Val // error
31+
protected class Val2 extends Val(1) // error
3232
}
3333

3434
class ExtendsValWithNullName extends Enumeration {
35-
protected class Val1 extends Val(null) // warn
36-
protected class Val2 extends Val(1, null) // warn
35+
protected class Val1 extends Val(null) // error
36+
protected class Val2 extends Val(1, null) // error
3737
}
38-
39-
// nopos-error: No warnings can be incurred under -Werror.

tests/patmat/i14407.dupe.check

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
6: Match case Unreachable
2-
0: No Kind

tests/run/getclass.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ class [D
2222
class [Lscala.collection.immutable.List;
2323

2424
Functions:
25-
class Test$$$Lambda/
26-
class Test$$$Lambda/
25+
class Test$$$Lambda$
26+
class Test$$$Lambda$

0 commit comments

Comments
 (0)