Skip to content

Commit bfe0c70

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

File tree

5 files changed

+38
-44
lines changed

5 files changed

+38
-44
lines changed

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

-2
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()
+24-25
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
1+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:6:4 -------------------------------------------------------------
2+
6 | Value // error
33
| ^^^^^
44
| Could not transform call to scala.Enumeration.Value.
55
| 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
6+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:10:9 ------------------------------------------------------------
7+
10 | Value(4) // error
88
| ^^^^^^^^
99
| Could not transform call to scala.Enumeration.Value.
1010
| 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
11+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:15:15 -----------------------------------------------------------
12+
15 | val a = Value(null) // error
1313
| ^^^^^^^^^^^
1414
| Passing null as name to scala.Enumeration.Value requires reflection at run-time.
1515
| 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
16+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:16:15 -----------------------------------------------------------
17+
16 | val b = Value(10, null) // error
1818
| ^^^^^^^^^^^^^^^
1919
| Passing null as name to scala.Enumeration.Value requires reflection at run-time.
2020
| 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
21+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:20:10 -----------------------------------------------------------
22+
20 | val a = new Val // error
2323
| ^^^^^^^
2424
| Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time.
2525
| 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
26+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:21:10 -----------------------------------------------------------
27+
21 | val b = new Val(10) // error
2828
| ^^^^^^^^^^^
2929
| Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time.
3030
| 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
31+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:25:10 -----------------------------------------------------------
32+
25 | val a = new Val(null) // error
3333
| ^^^^^^^^^^^^^
3434
| Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time.
3535
| 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
36+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:26:10 -----------------------------------------------------------
37+
26 | val b = new Val(10, null) // error
3838
| ^^^^^^^^^^^^^^^^^
3939
| Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time.
4040
| 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
41+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:30:31 -----------------------------------------------------------
42+
30 | protected class Val1 extends Val // error
4343
| ^^^
4444
| Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time.
4545
| 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
46+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:31:31 -----------------------------------------------------------
47+
31 | protected class Val2 extends Val(1) // error
4848
| ^^^^^^
4949
| Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time.
5050
| 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
51+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:35:31 -----------------------------------------------------------
52+
35 | protected class Val1 extends Val(null) // error
5353
| ^^^^^^^^^
5454
| Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time.
5555
| 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
56+
-- Error: tests/neg-scalajs/enumeration-warnings.scala:36:31 -----------------------------------------------------------
57+
36 | protected class Val2 extends Val(1, null) // error
5858
| ^^^^^^^^^^^^
5959
| Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time.
6060
| The resulting program is unlikely to function properly.
61-
No warnings can be incurred under -Werror.

tests/neg-scalajs/enumeration-warnings.scala

+12-14
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

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

tests/run/getclass.check

+2-2
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)