Skip to content

Commit 2de8ea1

Browse files
committed
Compare types as capture sets in mergeRefinedOrApplied
Fixes a problem introduced in 4b711f5 and closes scala#23032.
1 parent 05b102a commit 2de8ea1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/core/TypeOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ object TypeOps:
278278
}
279279
case AndType(tp11, tp12) =>
280280
mergeRefinedOrApplied(tp11, tp2) & mergeRefinedOrApplied(tp12, tp2)
281-
case tp1: TypeParamRef if tp1 == tp2 => tp1
281+
case tp1: TypeParamRef if tp1 =:= tp2 => tp1
282282
case _ => fail
283283
}
284284
}

tests/pos/i23032.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def f[F[_], T]: F[Unit] | F[T] = ???
2+
def x[F[_]] = f.toString

0 commit comments

Comments
 (0)