Skip to content

Commit c2314e9

Browse files
committed
Fix comparison to be in frozen constraint
1 parent c3692ee commit c2314e9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,8 +1781,7 @@ trait Applications extends Compatibility {
17811781

17821782
overload.println(i"compare($alt1, $alt2)? $tp1 $tp2 $ownerScore $winsType1 $winsType2")
17831783
if winsType1 && winsType2
1784-
&& alt1.widenExpr =:= alt2.widenExpr
1785-
&& alt1.widenExpr.isStable
1784+
&& (alt1.widenExpr frozen_=:= alt2.widenExpr) && alt1.widenExpr.isStable
17861785
then
17871786
// alternatives are the same after following ExprTypes, pick one of them
17881787
// (prefer the one that is not a method, but that's arbitrary).

0 commit comments

Comments
 (0)