File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -391,11 +391,7 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase =>
391391 checkNotPackage(tree)
392392 else
393393 registerNeedsInlining(tree)
394- val tree1 = checkUsableAsValue(tree)
395- tree1.tpe match {
396- case tpe : ThisType => This (tpe.cls).withSpan(tree.span)
397- case _ => tree1
398- }
394+ checkUsableAsValue(tree)
399395 case tree @ Select (qual, name) =>
400396 registerNeedsInlining(tree)
401397 if name.isTypeName then
Original file line number Diff line number Diff line change 1+ true
2+ false
3+ false
Original file line number Diff line number Diff line change 1+ object Foo {
2+ override def equals (that : Any ) = that match {
3+ case _ : this .type => true
4+ case _ => false
5+ }
6+ }
7+
8+ @ main def Test =
9+ println(Foo .equals(Foo ))
10+ println(Foo .equals(new AnyRef {}))
11+ println(Foo .equals(0 ))
You can’t perform that action at this time.
0 commit comments