Skip to content

Commit 4acb823

Browse files
committed
Fix Erasure's transformDenot for SingleDenotations
They wold transform the pre-existing type of the denotation instead of the symbol's type. This is clearly the wrong behavior for erasure. It was not detected before because we changed all types from name-based to symbolic during erasure, which meant we computed the denotation after erasure by a loadDenot. So we never exercised the `d.current` code on a derived denotation.
1 parent 57e761a commit 4acb823

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/Erasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class Erasure extends Phase with DenotTransformer {
8686
}
8787
}
8888
case ref =>
89-
ref.derivedSingleDenotation(ref.symbol, transformInfo(ref.symbol, ref.info))
89+
ref.derivedSingleDenotation(ref.symbol, transformInfo(ref.symbol, ref.symbol.info))
9090
}
9191

9292
val eraser = new Erasure.Typer

0 commit comments

Comments
 (0)