Skip to content

Commit 2352c95

Browse files
committed
Don't allow Fresh to subsume TypeParamRefs
1 parent b4fff3a commit 2352c95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/cc/CaptureRef.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ trait CaptureRef extends TypeProxy, ValueType:
267267
vs.ifNotSeen(this)(hidden.elems.exists(_.subsumes(y)))
268268
|| !y.stripReadOnly.isCap
269269
&& !yIsExistential
270-
&& !y.isInstanceOf[TermParamRef]
270+
&& !y.isInstanceOf[ParamRef]
271271
&& canAddHidden
272272
&& vs.addHidden(hidden, y)
273273
case x @ root.Result(binder) =>

0 commit comments

Comments
 (0)