File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -396,6 +396,7 @@ class Definitions {
396396 List (AnyClass .typeRef), EmptyScope )
397397 @ tu lazy val SingletonType : TypeRef = SingletonClass .typeRef
398398
399+ @ tu lazy val CollectionSeqType : TypeRef = ctx.requiredClassRef(" scala.collection.Seq" )
399400 @ tu lazy val SeqType : TypeRef = ctx.requiredClassRef(" scala.collection.immutable.Seq" )
400401 def SeqClass given Context : ClassSymbol = SeqType .symbol.asClass
401402 @ tu lazy val Seq_apply : Symbol = SeqClass .requiredMethod(nme.apply)
Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ object Applications {
7878 * {
7979 * def lengthCompare(len: Int): Int // or, def length: Int
8080 * def apply(i: Int): T = a(i)
81- * def drop(n: Int): scala.Seq[T]
82- * def toSeq: scala.Seq[T]
81+ * def drop(n: Int): scala.collection. Seq[T]
82+ * def toSeq: scala.collection. Seq[T]
8383 * }
8484 * ```
8585 * returns `T`, otherwise NoType.
@@ -88,8 +88,8 @@ object Applications {
8888 def lengthTp = ExprType (defn.IntType )
8989 def lengthCompareTp = MethodType (List (defn.IntType ), defn.IntType )
9090 def applyTp (elemTp : Type ) = MethodType (List (defn.IntType ), elemTp)
91- def dropTp (elemTp : Type ) = MethodType (List (defn.IntType ), defn.SeqType .appliedTo(elemTp))
92- def toSeqTp (elemTp : Type ) = ExprType (defn.SeqType .appliedTo(elemTp))
91+ def dropTp (elemTp : Type ) = MethodType (List (defn.IntType ), defn.CollectionSeqType .appliedTo(elemTp))
92+ def toSeqTp (elemTp : Type ) = ExprType (defn.CollectionSeqType .appliedTo(elemTp))
9393
9494 // the result type of `def apply(i: Int): T`
9595 val elemTp = getTp.member(nme.apply).suchThat(_.info <:< applyTp(WildcardType )).info.resultType
You can’t perform that action at this time.
0 commit comments