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 @@ -255,7 +255,8 @@ object TypeOps:
255
255
mergeRefinedOrApplied(tp1, tp21) & mergeRefinedOrApplied(tp1, tp22)
256
256
case _ =>
257
257
fail
258
- tp1 match {
258
+ if tp1 eq tp2 then tp1
259
+ else tp1 match {
259
260
case tp1 @ RefinedType (parent1, name1, rinfo1) =>
260
261
tp2 match {
261
262
case RefinedType (parent2, `name1`, rinfo2) =>
@@ -279,6 +280,7 @@ object TypeOps:
279
280
}
280
281
case AndType (tp11, tp12) =>
281
282
mergeRefinedOrApplied(tp11, tp2) & mergeRefinedOrApplied(tp12, tp2)
283
+ case tp1 : TypeParamRef if tp1 == tp2 => tp1
282
284
case _ => fail
283
285
}
284
286
}
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