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 {
396
396
List (AnyClass .typeRef), EmptyScope )
397
397
@ tu lazy val SingletonType : TypeRef = SingletonClass .typeRef
398
398
399
+ @ tu lazy val CollectionSeqType : TypeRef = ctx.requiredClassRef(" scala.collection.Seq" )
399
400
@ tu lazy val SeqType : TypeRef = ctx.requiredClassRef(" scala.collection.immutable.Seq" )
400
401
def SeqClass given Context : ClassSymbol = SeqType .symbol.asClass
401
402
@ 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 {
78
78
* {
79
79
* def lengthCompare(len: Int): Int // or, def length: Int
80
80
* 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]
83
83
* }
84
84
* ```
85
85
* returns `T`, otherwise NoType.
@@ -88,8 +88,8 @@ object Applications {
88
88
def lengthTp = ExprType (defn.IntType )
89
89
def lengthCompareTp = MethodType (List (defn.IntType ), defn.IntType )
90
90
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))
93
93
94
94
// the result type of `def apply(i: Int): T`
95
95
val elemTp = getTp.member(nme.apply).suchThat(_.info <:< applyTp(WildcardType )).info.resultType
You can’t perform that action at this time.
0 commit comments