@@ -520,26 +520,13 @@ trait TypeAssigner {
520
520
tree.withType(proto)
521
521
522
522
def assignType (tree : untpd.ValDef , sym : Symbol )(implicit ctx : Context ) =
523
- tree.withType(if (sym.exists) assertExists(symbolicIfNeeded( sym).orElse(sym. termRef) ) else NoType )
523
+ tree.withType(if (sym.exists) assertExists(sym. termRef) else NoType )
524
524
525
525
def assignType (tree : untpd.DefDef , sym : Symbol )(implicit ctx : Context ) =
526
- tree.withType(symbolicIfNeeded( sym).orElse(sym. termRef) )
526
+ tree.withType(sym. termRef)
527
527
528
528
def assignType (tree : untpd.TypeDef , sym : Symbol )(implicit ctx : Context ) =
529
- tree.withType(symbolicIfNeeded(sym).orElse(sym.typeRef))
530
-
531
- private def symbolicIfNeeded (sym : Symbol )(implicit ctx : Context ) = { // ??? can we drop this?
532
- val owner = sym.owner
533
- if (owner.isClass && owner.isCompleted && owner.asClass.givenSelfType.exists)
534
- // In that case a simple typeRef/termWithWithSig could return a member of
535
- // the self type, not the symbol itself. To avoid this, we make the reference
536
- // symbolic. In general it seems to be faster to keep the non-symbolic
537
- // reference, since there is less pressure on the uniqueness tables that way
538
- // and less work to update all the different references. That's why symbolic references
539
- // are only used if necessary.
540
- NamedType (owner.thisType, sym)
541
- else NoType
542
- }
529
+ tree.withType(sym.typeRef)
543
530
544
531
def assertExists (tp : Type ) = { assert(tp != NoType ); tp }
545
532
0 commit comments