Skip to content

Commit

Permalink
stripLazyRef for underlyingNormalizable
Browse files Browse the repository at this point in the history
[Cherry-picked 4fbba66]
  • Loading branch information
EugeneFlesselle authored and WojciechMazur committed Aug 27, 2024
1 parent 74451b7 commit 40dbcc2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ object Types extends TypeUtils {
/** Does this application expand to a match type? */
def isMatchAlias(using Context): Boolean = underlyingNormalizable.isMatch

def underlyingNormalizable(using Context): Type = stripped match
def underlyingNormalizable(using Context): Type = stripped.stripLazyRef match
case tp: MatchType => tp
case tp: AppliedType => tp.underlyingNormalizable
case _ => NoType
Expand Down Expand Up @@ -3258,8 +3258,6 @@ object Types extends TypeUtils {
private var myRef: Type | Null = null
private var computed = false

override def tryNormalize(using Context): Type = ref.tryNormalize

def ref(using Context): Type =
if computed then
if myRef == null then
Expand Down

0 comments on commit 40dbcc2

Please sign in to comment.