Skip to content

Commit 16b8e07

Browse files
Fix #15405: Dealias Or type constituents when finding its dominator
1 parent 944f540 commit 16b8e07

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ object Types {
594594
try
595595
this match
596596
case tp: TypeProxy =>
597-
tp.underlying.baseClasses
597+
tp.superType.baseClasses
598598
case tp: ClassInfo =>
599599
tp.cls.classDenot.baseClasses
600600
case _ => Nil

tests/pos/i15405.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)