We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd2a03e commit 991a3ccCopy full SHA for 991a3cc
compiler/src/dotty/tools/dotc/core/TypeOps.scala
@@ -271,6 +271,13 @@ object TypeOps:
271
tp1.derivedSelect(pre1 | pre2)
272
case _ => fallback
273
}
274
+ case tp1: TypeParamRef =>
275
+ tp2 match {
276
+ case tp2: TypeParamRef
277
+ if (tp1.binder eq tp2.binder) && (tp1.paramNum == tp2.paramNum) =>
278
+ tp1
279
+ case _ => fallback
280
+ }
281
case AndType(tp11, tp12) =>
282
mergeRefinedOrApplied(tp11, tp2) & mergeRefinedOrApplied(tp12, tp2)
283
case _ => fail
tests/pos/i19789.scala
@@ -0,0 +1,5 @@
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) }
0 commit comments