aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-12-13 11:59:35 +0100
committerMartin Odersky <odersky@gmail.com>2014-12-13 11:59:35 +0100
commita4c11eb0004736fd10fa500d7ef0edc7044e5444 (patch)
tree5db916423a27eda964186415ebbb157e669d8341 /src
parent179b9cc31552408c01928e1fca0e0af2a7453843 (diff)
downloaddotty-a4c11eb0004736fd10fa500d7ef0edc7044e5444.tar.gz
dotty-a4c11eb0004736fd10fa500d7ef0edc7044e5444.tar.bz2
dotty-a4c11eb0004736fd10fa500d7ef0edc7044e5444.zip
Drop NotNull class and associated code.
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/TypeErasure.scala2
-rw-r--r--src/dotty/tools/dotc/config/ScalaSettings.scala1
-rw-r--r--src/dotty/tools/dotc/core/Definitions.scala3
-rw-r--r--src/dotty/tools/dotc/core/TypeComparer.scala3
4 files changed, 2 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/TypeErasure.scala b/src/dotty/tools/dotc/TypeErasure.scala
index 162c869b4..2407b9e2a 100644
--- a/src/dotty/tools/dotc/TypeErasure.scala
+++ b/src/dotty/tools/dotc/TypeErasure.scala
@@ -374,7 +374,7 @@ class TypeErasure(isJava: Boolean, isSemi: Boolean, isConstructor: Boolean, wild
private def normalizeClass(cls: ClassSymbol)(implicit ctx: Context): ClassSymbol = {
if (cls.owner == defn.ScalaPackageClass) {
- if (cls == defn.AnyClass || cls == defn.AnyValClass || cls == defn.SingletonClass || cls == defn.NotNullClass)
+ if (cls == defn.AnyClass || cls == defn.AnyValClass || cls == defn.SingletonClass)
return defn.ObjectClass
if (cls == defn.UnitClass)
return defn.BoxedUnitClass
diff --git a/src/dotty/tools/dotc/config/ScalaSettings.scala b/src/dotty/tools/dotc/config/ScalaSettings.scala
index 05b936136..9afe96c96 100644
--- a/src/dotty/tools/dotc/config/ScalaSettings.scala
+++ b/src/dotty/tools/dotc/config/ScalaSettings.scala
@@ -140,7 +140,6 @@ class ScalaSettings extends Settings.SettingGroup {
val Ybuilderdebug = ChoiceSetting("-Ybuilder-debug", "manager", "Compile using the specified build manager.", List("none", "refined", "simple"), "none")
val Yreifycopypaste = BooleanSetting("-Yreify-copypaste", "Dump the reified trees in copypasteable representation.")
val Yreplsync = BooleanSetting("-Yrepl-sync", "Do not use asynchronous code for repl startup")
- val Ynotnull = BooleanSetting("-Ynotnull", "Enable (experimental and incomplete) scala.NotNull.")
val YmethodInfer = BooleanSetting("-Yinfer-argument-types", "Infer types for arguments of overriden methods.")
val etaExpandKeepsStar = BooleanSetting("-Yeta-expand-keeps-star", "Eta-expand varargs methods to T* rather than Seq[T]. This is a temporary option to ease transition.")
val Yinvalidate = StringSetting("-Yinvalidate", "classpath-entry", "Invalidate classpath entry before run", "")
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala
index 311b27717..19d175088 100644
--- a/src/dotty/tools/dotc/core/Definitions.scala
+++ b/src/dotty/tools/dotc/core/Definitions.scala
@@ -177,8 +177,6 @@ class Definitions {
RootClass, nme.dummyApply, 1,
pt => MethodType(List(FunctionType(Nil, PolyParam(pt, 0))), PolyParam(pt, 0)))
- lazy val NotNullClass = ctx.requiredClass("scala.NotNull")
-
lazy val NothingClass: ClassSymbol = newCompleteClassSymbol(
ScalaPackageClass, tpnme.Nothing, AbstractFinal, List(AnyClass.typeRef))
lazy val NullClass: ClassSymbol = newCompleteClassSymbol(
@@ -348,7 +346,6 @@ class Definitions {
def AnyValType: Type = AnyValClass.typeRef
def ObjectType: Type = ObjectClass.typeRef
def AnyRefType: Type = AnyRefAlias.typeRef
- def NotNullType: Type = NotNullClass.typeRef
def NothingType: Type = NothingClass.typeRef
def NullType: Type = NullClass.typeRef
def SeqType: Type = SeqClass.typeRef
diff --git a/src/dotty/tools/dotc/core/TypeComparer.scala b/src/dotty/tools/dotc/core/TypeComparer.scala
index eddf0b3e9..a7f50c369 100644
--- a/src/dotty/tools/dotc/core/TypeComparer.scala
+++ b/src/dotty/tools/dotc/core/TypeComparer.scala
@@ -648,8 +648,7 @@ class TypeComparer(initctx: Context) extends DotClass {
if (cls2.isClass) {
val base = tp1.baseTypeRef(cls2)
if (base.exists && (base ne tp1)) return isSubType(base, tp2)
- if ( cls2 == defn.SingletonClass && tp1.isStable
- || cls2 == defn.NotNullClass && tp1.isNotNull) return true
+ if (cls2 == defn.SingletonClass && tp1.isStable) return true
}
tryRebase3rd
}