Skip to content

Commit ccde55e

Browse files
authored
Revert "fix: do not transform Ident to This in PostTyper anymore"
1 parent 7864ebb commit ccde55e

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,11 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase =>
391391
checkNotPackage(tree)
392392
else
393393
registerNeedsInlining(tree)
394-
checkUsableAsValue(tree)
394+
val tree1 = checkUsableAsValue(tree)
395+
tree1.tpe match {
396+
case tpe: ThisType => This(tpe.cls).withSpan(tree.span)
397+
case _ => tree1
398+
}
395399
case tree @ Select(qual, name) =>
396400
registerNeedsInlining(tree)
397401
if name.isTypeName then

tests/run/i23875.check

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/run/i23875.scala

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)