Skip to content

Commit 9c712df

Browse files
oderskymichelou
authored andcommitted
Add missing case to couldInstantiateTypeVar
Fixes scala#11778
1 parent a4ef09a commit 9c712df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ object Inferencing {
102102
case AppliedType(tycon, args) =>
103103
// The argument in `args` that may potentially appear directly as result
104104
// and thereby influence the members of this type
105-
def argsInResult: List[Type] = tycon match
105+
def argsInResult: List[Type] = tycon.stripTypeVar match
106106
case tycon: TypeRef =>
107107
tycon.info match
108108
case MatchAlias(_) => args
@@ -114,6 +114,7 @@ object Inferencing {
114114
}.toList
115115
case _ => Nil
116116
case _ => Nil
117+
case _ => Nil
117118
couldInstantiateTypeVar(tycon)
118119
|| argsInResult.exists(couldInstantiateTypeVar)
119120
case RefinedType(parent, _, _) =>

0 commit comments

Comments
 (0)