aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/core/Definitions.scala4
-rw-r--r--src/dotty/tools/dotc/core/TypeOps.scala6
-rw-r--r--tests/pos/intersection.scala1
3 files changed, 4 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala
index 75b75d3d5..b1c2bc535 100644
--- a/src/dotty/tools/dotc/core/Definitions.scala
+++ b/src/dotty/tools/dotc/core/Definitions.scala
@@ -430,10 +430,8 @@ class Definitions {
def Product_productArity(implicit ctx: Context) = Product_productArityR.symbol
lazy val Product_productPrefixR = ProductClass.requiredMethodRef(nme.productPrefix)
def Product_productPrefix(implicit ctx: Context) = Product_productPrefixR.symbol
- lazy val LanguageModuleRef = ctx.requiredModule("dotty.language")
+ lazy val LanguageModuleRef = ctx.requiredModule("scala.language")
def LanguageModuleClass(implicit ctx: Context) = LanguageModuleRef.symbol.moduleClass.asClass
- lazy val Scala2LanguageModuleRef = ctx.requiredModule("scala.language")
- def Scala2LanguageModuleClass(implicit ctx: Context) = Scala2LanguageModuleRef.symbol.moduleClass.asClass
lazy val NonLocalReturnControlType: TypeRef = ctx.requiredClassRef("scala.runtime.NonLocalReturnControl")
lazy val ClassTagType = ctx.requiredClassRef("scala.reflect.ClassTag")
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala
index 5edd61c70..d480a792b 100644
--- a/src/dotty/tools/dotc/core/TypeOps.scala
+++ b/src/dotty/tools/dotc/core/TypeOps.scala
@@ -517,7 +517,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
*/
def featureEnabled(owner: ClassSymbol, feature: TermName): Boolean = {
def toPrefix(sym: Symbol): String =
- if (!sym.exists || (sym eq defn.LanguageModuleClass) || (sym eq defn.Scala2LanguageModuleClass)) ""
+ if (!sym.exists || (sym eq defn.LanguageModuleClass)) ""
else toPrefix(sym.owner) + sym.name + "."
def featureName = toPrefix(owner) + feature
def hasImport(implicit ctx: Context): Boolean = {
@@ -536,13 +536,13 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
/** Is auto-tupling enabled? */
def canAutoTuple =
- !featureEnabled(defn.Scala2LanguageModuleClass, nme.noAutoTupling)
+ !featureEnabled(defn.LanguageModuleClass, nme.noAutoTupling)
def scala2Mode =
featureEnabled(defn.LanguageModuleClass, nme.Scala2)
def dynamicsEnabled =
- featureEnabled(defn.Scala2LanguageModuleClass, nme.dynamics)
+ featureEnabled(defn.LanguageModuleClass, nme.dynamics)
def testScala2Mode(msg: String, pos: Position) = {
if (scala2Mode) migrationWarning(msg, pos)
diff --git a/tests/pos/intersection.scala b/tests/pos/intersection.scala
index a4c19b5af..48551920c 100644
--- a/tests/pos/intersection.scala
+++ b/tests/pos/intersection.scala
@@ -1,4 +1,3 @@
-import dotty.language.keepUnions
object intersection {
class A