-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
itype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore
Description
Compiler version
3.1.0
Minimized code
// in Printer.scala
class Printer:
def print(s: String): Unit = println(s)
// in BadPrinter.scala
class BadPrinter extends Printer:
override def print(s: String): Unit = println("Bad!!!")
and enabled -source future
flag.
Of course, -language.adHocExtensions
flag has been disabled, and it hasn't imported scala.language.adHocExtensions
in these source files.
Output
It compiles successfully and no warning is output.
Expectation
The warning should be output because the open
modifier hasn't been added.
On the other hand, the warning is output successfully in Scala 3.0.2.
Metadata
Metadata
Assignees
Labels
itype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore