File tree 2 files changed +9
-2
lines changed
compiler/src/dotty/tools/dotc 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -401,7 +401,14 @@ class Definitions {
401
401
List (AnyClass .typeRef), EmptyScope )
402
402
lazy val SingletonType : TypeRef = SingletonClass .typeRef
403
403
404
- lazy val SeqType : TypeRef = ctx.requiredClassRef(" scala.collection.Seq" )
404
+ lazy val SeqType : TypeRef = {
405
+ // We load SeqType from the alias in scala package object
406
+ // - in 2.12: scala.collection.Seq
407
+ // - in 2.13: scala.collection.immutable.Seq
408
+ val alias = ctx.base.staticRef(" scala.Seq" .toTypeName).requiredSymbol(_.isAliasType)
409
+ alias.info.classSymbol.typeRef
410
+ }
411
+
405
412
def SeqClass (implicit ctx : Context ) = SeqType .symbol.asClass
406
413
lazy val Seq_applyR = SeqClass .requiredMethodRef(nme.apply)
407
414
def Seq_apply (implicit ctx : Context ) = Seq_applyR .symbol
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ object Implicits {
71
71
/** The implicit references */
72
72
def refs : List [ImplicitRef ]
73
73
74
- private var SingletonClass : ClassSymbol = null
74
+ private [ this ] var SingletonClass : ClassSymbol = null
75
75
76
76
/** Widen type so that it is neither a singleton type nor a type that inherits from scala.Singleton. */
77
77
private def widenSingleton (tp : Type )(implicit ctx : Context ): Type = {
You can’t perform that action at this time.
0 commit comments