File tree 1 file changed +4
-6
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1902,9 +1902,8 @@ object Types {
1902
1902
*/
1903
1903
protected def computeSignature (implicit ctx : Context ): Signature =
1904
1904
val lastd = lastDenotation
1905
- val isErased = ctx.erasedTypes
1906
- if lastd != null && ! isErased then lastd.signature
1907
- else if isErased then computeSignature(using ctx.withPhase(ctx.erasurePhase))
1905
+ if lastd != null && lastd.validFor.firstPhaseId <= ctx.erasurePhase.id then lastd.signature
1906
+ else if ctx.erasedTypes then computeSignature(using ctx.withPhase(ctx.erasurePhase))
1908
1907
else symbol.asSeenFrom(prefix).signature
1909
1908
1910
1909
/** The signature of the current denotation if it is known without forcing.
@@ -1915,9 +1914,8 @@ object Types {
1915
1914
if ctx.runId == mySignatureRunId then mySignature
1916
1915
else
1917
1916
val lastd = lastDenotation
1918
- val isErased = ctx.erasedTypes
1919
- if lastd != null && ! isErased then lastd.signature
1920
- else if isErased then currentSignature(using ctx.withPhase(ctx.erasurePhase))
1917
+ if lastd != null && lastd.validFor.firstPhaseId <= ctx.erasurePhase.id then lastd.signature
1918
+ else if ctx.erasedTypes then currentSignature(using ctx.withPhase(ctx.erasurePhase))
1921
1919
else
1922
1920
val sym = currentSymbol
1923
1921
if sym.exists then sym.asSeenFrom(prefix).signature
You can’t perform that action at this time.
0 commit comments