File tree 2 files changed +4
-2
lines changed
compiler/src/dotty/tools/dotc
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,9 @@ object TypeEval:
18
18
// final val one = 1
19
19
// type Two = one.type + one.type
20
20
// ```
21
- case tp : TypeProxy if tp.underlying.isStable => tp.underlying.fixForEvaluation
21
+ case tp : TypeProxy =>
22
+ val tp1 = tp.superType
23
+ if tp1.isStable then tp1.fixForEvaluation else tp
22
24
case tp => tp
23
25
24
26
def constValue (tp : Type ): Option [Any ] = tp.fixForEvaluation match
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ trait Deriving {
33
33
case tp : TypeRef if tp.symbol.isClass => tp
34
34
case tp : TypeRef if tp.symbol.isAbstractType => NoType
35
35
case tp : TermRef => NoType
36
- case tp : TypeProxy => underlyingClassRef(tp.underlying )
36
+ case tp : TypeProxy => underlyingClassRef(tp.superType )
37
37
case _ => NoType
38
38
}
39
39
You can’t perform that action at this time.
0 commit comments