Skip to content

Commit 1d3a945

Browse files
committed
use toSeq type as element type and check type
1 parent 1efdbe7 commit 1d3a945

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ object Applications {
112112
RefinedType.make(defn.AnyType, names, tps)
113113
}
114114
getTp <:< superType(WildcardType) && {
115-
val seqArg = getTp.member(nme.toSeq).info.elemType.hiBound
115+
val seqArg = extractorMemberType(getTp, nme.toSeq).elemType.hiBound
116116
getTp <:< superType(seqArg)
117117
}
118118
}
119119

120120
if (unapplyName == nme.unapplySeq) {
121121
if (unapplyResult derivesFrom defn.SeqClass) seqSelector :: Nil
122122
else if (isGetMatch(unapplyResult, pos) && vaidUnapplySeqType(getTp)) {
123-
val seqArg = getTp.member(nme.apply).info.finalResultType
123+
val seqArg = extractorMemberType(getTp, nme.toSeq).elemType.hiBound
124124
if (seqArg.exists) args.map(Function.const(seqArg))
125125
else fail
126126
}

0 commit comments

Comments
 (0)