Skip to content

Commit

Permalink
Fix tests after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
szymon-rd committed Jan 24, 2024
1 parent 59b0b69 commit 93bb0c2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 20 deletions.
2 changes: 0 additions & 2 deletions compiler/test/dotty/tools/dotc/CompilationTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ class CompilationTests {
@Test def checkInitGlobal: Unit = {
implicit val testGroup: TestGroup = TestGroup("checkInitGlobal")
val options = defaultOptions.and("-Ysafe-init-global", "-Xfatal-warnings")
compileFilesInDir("tests/init-global/neg", options).checkExpectedErrors()
compileFilesInDir("tests/init-global/pos", options).checkCompile()
compileFilesInDir("tests/init-global/neg", options, FileFilter.exclude(TestSources.negInitGlobalScala2LibraryTastyBlacklisted)).checkExpectedErrors()
compileFilesInDir("tests/init-global/warn", defaultOptions.and("-Ysafe-init-global"), FileFilter.exclude(TestSources.negInitGlobalScala2LibraryTastyBlacklisted)).checkWarnings()
compileFilesInDir("tests/init-global/pos", options, FileFilter.exclude(TestSources.posInitGlobalScala2LibraryTastyBlacklisted)).checkCompile()
Expand Down
28 changes: 13 additions & 15 deletions tests/neg-scalajs/enumeration-warnings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,35 @@
class UnableToTransformValue extends Enumeration {
val a = {
println("oh, oh!")
Value // warn
Value // error
}
val b = {
println("oh, oh!")
Value(4) // warn
Value(4) // error
}
}

class ValueWithNullName extends Enumeration {
val a = Value(null) // warn
val b = Value(10, null) // warn
val a = Value(null) // error
val b = Value(10, null) // error
}

class NewValWithNoName extends Enumeration {
val a = new Val // warn
val b = new Val(10) // warn
val a = new Val // error
val b = new Val(10) // error
}

class NewValWithNullName extends Enumeration {
val a = new Val(null) // warn
val b = new Val(10, null) // warn
val a = new Val(null) // error
val b = new Val(10, null) // error
}

class ExtendsValWithNoName extends Enumeration {
protected class Val1 extends Val // warn
protected class Val2 extends Val(1) // warn
protected class Val1 extends Val // error
protected class Val2 extends Val(1) // error
}

class ExtendsValWithNullName extends Enumeration {
protected class Val1 extends Val(null) // warn
protected class Val2 extends Val(1, null) // warn
}

// nopos-error: No warnings can be incurred under -Werror.
protected class Val1 extends Val(null) // error
protected class Val2 extends Val(1, null) // error
}
1 change: 0 additions & 1 deletion tests/patmat/i14407.dupe.check
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
6: Match case Unreachable
0: No Kind
4 changes: 2 additions & 2 deletions tests/run/getclass.check
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ class [D
class [Lscala.collection.immutable.List;

Functions:
class Test$$$Lambda/
class Test$$$Lambda/
class Test$$$Lambda$
class Test$$$Lambda$

0 comments on commit 93bb0c2

Please sign in to comment.