We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7091cd commit 244257bCopy full SHA for 244257b
compiler/src/dotty/tools/dotc/core/TypeOps.scala
@@ -518,8 +518,11 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
518
def dynamicsEnabled =
519
featureEnabled(defn.LanguageModuleClass, nme.dynamics)
520
521
- def testScala2Mode(msg: => String, pos: Position) = {
522
- if (scala2Mode) migrationWarning(msg, pos)
+ def testScala2Mode(msg: => String, pos: Position, rewrite: => Unit = ()) = {
+ if (scala2Mode) {
523
+ migrationWarning(msg, pos)
524
+ rewrite
525
+ }
526
scala2Mode
527
}
528
0 commit comments