File tree 2 files changed +8
-1
lines changed
compiler/src/dotty/tools/dotc/core
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,8 @@ object TypeOps:
249
249
mergeRefinedOrApplied(tp1, tp21) & mergeRefinedOrApplied(tp1, tp22)
250
250
case _ =>
251
251
fail
252
- tp1 match {
252
+ if tp1 eq tp2 then tp1
253
+ else tp1 match {
253
254
case tp1 @ RefinedType (parent1, name1, rinfo1) =>
254
255
tp2 match {
255
256
case RefinedType (parent2, `name1`, rinfo2) =>
@@ -273,6 +274,7 @@ object TypeOps:
273
274
}
274
275
case AndType (tp11, tp12) =>
275
276
mergeRefinedOrApplied(tp11, tp2) & mergeRefinedOrApplied(tp12, tp2)
277
+ case tp1 : TypeParamRef if tp1 == tp2 => tp1
276
278
case _ => fail
277
279
}
278
280
}
Original file line number Diff line number Diff line change
1
+ type Kinded [F [_]] = F [Any ] | F [Nothing ]
2
+
3
+ def values [F [_]]: Vector [Kinded [F ]] = ???
4
+
5
+ def mapValues [F [_], T ](f : Kinded [F ] => T ): Vector [T ] = values[F ].map { case x => f(x) }
You can’t perform that action at this time.
0 commit comments