@@ -1542,6 +1542,8 @@ object Types {
1542
1542
1543
1543
object TermRef {
1544
1544
1545
+ private def symbolicRefs (implicit ctx : Context ) = ctx.phase.symbolicRefs
1546
+
1545
1547
/** Create term ref with given name, without specifying a signature.
1546
1548
* Its meaning is the (potentially multi-) denotation of the member(s)
1547
1549
* of prefix with given name.
@@ -1562,7 +1564,7 @@ object Types {
1562
1564
* signature, if denotation is not yet completed.
1563
1565
*/
1564
1566
def apply (prefix : Type , name : TermName , denot : Denotation )(implicit ctx : Context ): TermRef = {
1565
- if ((prefix eq NoPrefix ) || denot.symbol.isFresh || ctx.erasedTypes )
1567
+ if ((prefix eq NoPrefix ) || denot.symbol.isFresh || symbolicRefs )
1566
1568
apply(prefix, denot.symbol.asTerm)
1567
1569
else denot match {
1568
1570
case denot : SymDenotation if denot.isCompleted => withSig(prefix, name, denot.signature)
@@ -1584,7 +1586,7 @@ object Types {
1584
1586
* (2) The name in the term ref need not be the same as the name of the Symbol.
1585
1587
*/
1586
1588
def withSymAndName (prefix : Type , sym : TermSymbol , name : TermName )(implicit ctx : Context ): TermRef =
1587
- if ((prefix eq NoPrefix ) || sym.isFresh || ctx.erasedTypes )
1589
+ if ((prefix eq NoPrefix ) || sym.isFresh || symbolicRefs )
1588
1590
withFixedSym(prefix, name, sym)
1589
1591
else if (sym.defRunId != NoRunId && sym.isCompleted)
1590
1592
withSig(prefix, name, sym.signature) withSym (sym, sym.signature)
@@ -1595,7 +1597,7 @@ object Types {
1595
1597
* (which must be completed).
1596
1598
*/
1597
1599
def withSig (prefix : Type , sym : TermSymbol )(implicit ctx : Context ): TermRef =
1598
- if ((prefix eq NoPrefix ) || sym.isFresh || ctx.erasedTypes ) withFixedSym(prefix, sym.name, sym)
1600
+ if ((prefix eq NoPrefix ) || sym.isFresh || symbolicRefs ) withFixedSym(prefix, sym.name, sym)
1599
1601
else withSig(prefix, sym.name, sym.signature).withSym(sym, sym.signature)
1600
1602
1601
1603
/** Create a term ref with given prefix, name and signature */
@@ -1604,7 +1606,7 @@ object Types {
1604
1606
1605
1607
/** Create a term ref with given prefix, name, signature, and initial denotation */
1606
1608
def withSigAndDenot (prefix : Type , name : TermName , sig : Signature , denot : Denotation )(implicit ctx : Context ): TermRef = {
1607
- if ((prefix eq NoPrefix ) || denot.symbol.isFresh || ctx.erasedTypes )
1609
+ if ((prefix eq NoPrefix ) || denot.symbol.isFresh || symbolicRefs )
1608
1610
withFixedSym(prefix, denot.symbol.asTerm.name, denot.symbol.asTerm)
1609
1611
else
1610
1612
withSig(prefix, name, sig)
0 commit comments