Skip to content

Commit 54dd50c

Browse files
committed
Drop defn.SingletonType
Risk of confusing with Types.SingletonType is too high.
1 parent 0aeb02c commit 54dd50c

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,6 @@ class Definitions {
357357
enterCompleteClassSymbol(
358358
ScalaPackageClass, tpnme.Singleton, PureInterfaceCreationFlags | Final,
359359
List(AnyClass.typeRef), EmptyScope)
360-
def SingletonType = SingletonClass.typeRef
361360

362361
lazy val SeqType: TypeRef = ctx.requiredClassRef("scala.collection.Seq")
363362
def SeqClass(implicit ctx: Context) = SeqType.symbol.asClass

compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ object ProtoTypes {
404404
/** Create a new TypeVar that represents a dependent method parameter singleton */
405405
def newDepTypeVar(tp: Type)(implicit ctx: Context): TypeVar = {
406406
val poly = PolyType(DepParamName.fresh().toTypeName :: Nil)(
407-
pt => TypeBounds.upper(AndType(tp, defn.SingletonType)) :: Nil,
407+
pt => TypeBounds.upper(AndType(tp, defn.SingletonClass.typeRef)) :: Nil,
408408
pt => defn.AnyType)
409409
constrained(poly, untpd.EmptyTree, alwaysAddTypeVars = true)
410410
._2.head.tpe.asInstanceOf[TypeVar]

0 commit comments

Comments
 (0)