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 9614fb9 commit 1edc413Copy full SHA for 1edc413
compiler/src/dotty/tools/dotc/core/TypeOps.scala
@@ -345,7 +345,7 @@ object TypeOps:
345
}
346
347
// Step 3: Intersect base classes of both sides
348
- val commonBaseClasses = tp.mapReduceOr(_.baseClasses)(intersect)
+ val commonBaseClasses = tp.mapReduceOr(_.dealias.baseClasses)(intersect)
349
val doms = dominators(commonBaseClasses, Nil)
350
def baseTp(cls: ClassSymbol): Type =
351
tp.baseType(cls).mapReduceOr(identity)(mergeRefinedOrApplied)
tests/pos/i15405.scala
@@ -0,0 +1,4 @@
1
+type Validated[A] = A
2
+class Foo:
3
+ def >(x: Int) = true
4
+def foo(v: Foo|Validated[Foo]): Unit = v > 10
0 commit comments