Skip to content

Commit ad1939a

Browse files
authored
Merge pull request #15416 from dotty-staging/fix-15405
Fix #15405: Dealias Or type constituents when finding its dominator
2 parents 9b648dc + 16b8e07 commit ad1939a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ object Types {
595595
try
596596
this match
597597
case tp: TypeProxy =>
598-
tp.underlying.baseClasses
598+
tp.superType.baseClasses
599599
case tp: ClassInfo =>
600600
tp.cls.classDenot.baseClasses
601601
case _ => Nil

tests/pos/i15405.scala

+4
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)