@@ -1526,6 +1526,8 @@ object Types {
1526
1526
1527
1527
object TermRef {
1528
1528
1529
+ private def symbolicRefs (implicit ctx : Context ) = ctx.phase.symbolicRefs
1530
+
1529
1531
/** Create term ref with given name, without specifying a signature.
1530
1532
* Its meaning is the (potentially multi-) denotation of the member(s)
1531
1533
* of prefix with given name.
@@ -1546,7 +1548,7 @@ object Types {
1546
1548
* signature, if denotation is not yet completed.
1547
1549
*/
1548
1550
def apply (prefix : Type , name : TermName , denot : Denotation )(implicit ctx : Context ): TermRef = {
1549
- if ((prefix eq NoPrefix ) || denot.symbol.isFresh || ctx.erasedTypes )
1551
+ if ((prefix eq NoPrefix ) || denot.symbol.isFresh || symbolicRefs )
1550
1552
apply(prefix, denot.symbol.asTerm)
1551
1553
else denot match {
1552
1554
case denot : SymDenotation if denot.isCompleted => withSig(prefix, name, denot.signature)
@@ -1568,7 +1570,7 @@ object Types {
1568
1570
* (2) The name in the term ref need not be the same as the name of the Symbol.
1569
1571
*/
1570
1572
def withSymAndName (prefix : Type , sym : TermSymbol , name : TermName )(implicit ctx : Context ): TermRef =
1571
- if ((prefix eq NoPrefix ) || sym.isFresh || ctx.erasedTypes )
1573
+ if ((prefix eq NoPrefix ) || sym.isFresh || symbolicRefs )
1572
1574
withFixedSym(prefix, name, sym)
1573
1575
else if (sym.defRunId != NoRunId && sym.isCompleted)
1574
1576
withSig(prefix, name, sym.signature) withSym (sym, sym.signature)
@@ -1579,7 +1581,7 @@ object Types {
1579
1581
* (which must be completed).
1580
1582
*/
1581
1583
def withSig (prefix : Type , sym : TermSymbol )(implicit ctx : Context ): TermRef =
1582
- if ((prefix eq NoPrefix ) || sym.isFresh || ctx.erasedTypes ) withFixedSym(prefix, sym.name, sym)
1584
+ if ((prefix eq NoPrefix ) || sym.isFresh || symbolicRefs ) withFixedSym(prefix, sym.name, sym)
1583
1585
else withSig(prefix, sym.name, sym.signature).withSym(sym, sym.signature)
1584
1586
1585
1587
/** Create a term ref with given prefix, name and signature */
@@ -1588,7 +1590,7 @@ object Types {
1588
1590
1589
1591
/** Create a term ref with given prefix, name, signature, and initial denotation */
1590
1592
def withSigAndDenot (prefix : Type , name : TermName , sig : Signature , denot : Denotation )(implicit ctx : Context ): TermRef = {
1591
- if ((prefix eq NoPrefix ) || denot.symbol.isFresh || ctx.erasedTypes )
1593
+ if ((prefix eq NoPrefix ) || denot.symbol.isFresh || symbolicRefs )
1592
1594
withFixedSym(prefix, denot.symbol.asTerm.name, denot.symbol.asTerm)
1593
1595
else
1594
1596
withSig(prefix, name, sig)
0 commit comments