aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/TypeOps.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeOps.scala')
-rw-r--r--src/dotty/tools/dotc/core/TypeOps.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala
index 77c6805f0..aa643256c 100644
--- a/src/dotty/tools/dotc/core/TypeOps.scala
+++ b/src/dotty/tools/dotc/core/TypeOps.scala
@@ -5,6 +5,7 @@ package core
import Contexts._, Types._, Symbols._, Names._, Flags._, Scopes._
import SymDenotations._, Denotations.Denotation
import config.Printers._
+import util.Positions._
import Decorators._
import StdNames._
import util.SimpleMap
@@ -572,6 +573,15 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
/** Is auto-tupling enabled? */
def canAutoTuple =
!featureEnabled(defn.LanguageModuleClass, nme.noAutoTupling)
+
+ def scala2Mode =
+ featureEnabled(defn.LanguageModuleClass, nme.Scala2)
+
+ def testScala2Mode(msg: String, pos: Position) = {
+ if (scala2Mode) migrationWarning(msg, pos)
+ scala2Mode
+ }
+
}
object TypeOps {