Skip to content

Commit 5731a5f

Browse files
authored
Merge pull request #14079 from dotty-staging/fix-13946
Test for non-open classes warning
2 parents d6fe4b4 + 9bd5995 commit 5731a5f

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ class CompilationTests {
140140
compileFilesInDir("tests/neg-custom-args/explicit-nulls", defaultOptions.and("-Yexplicit-nulls")),
141141
compileFilesInDir("tests/neg-custom-args/no-experimental", defaultOptions.and("-Yno-experimental")),
142142
compileDir("tests/neg-custom-args/impl-conv", defaultOptions.and("-Xfatal-warnings", "-feature")),
143+
compileDir("tests/neg-custom-args/i13946", defaultOptions.and("-Xfatal-warnings", "-feature")),
143144
compileFile("tests/neg-custom-args/implicit-conversions.scala", defaultOptions.and("-Xfatal-warnings", "-feature")),
144145
compileFile("tests/neg-custom-args/implicit-conversions-old.scala", defaultOptions.and("-Xfatal-warnings", "-feature")),
145146
compileFile("tests/neg-custom-args/i3246.scala", scala2CompatMode),
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// in BadPrinter.scala
2+
import language.future
3+
class BadPrinter extends Printer: // error
4+
override def print(s: String): Unit = println("Bad!!!")
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// in Printer.scala
2+
class Printer:
3+
def print(s: String): Unit = println(s)

0 commit comments

Comments
 (0)