@@ -1127,11 +1127,6 @@ object Types {
1127
1127
loop(this )
1128
1128
}
1129
1129
1130
- private def isReferencedSymbolically (sym : Symbol )(implicit ctx : Context ) =
1131
- sym.isFresh ||
1132
- sym.isClass && sym.is(Scala2x ) && ! sym.owner.is(Package ) ||
1133
- ctx.phase.symbolicRefs
1134
-
1135
1130
/** The type <this . name> , reduced if possible */
1136
1131
def select (name : Name )(implicit ctx : Context ): Type = name match {
1137
1132
case name : TermName => TermRef (this , name)
@@ -2071,7 +2066,7 @@ object Types {
2071
2066
* signature, if denotation is not yet completed.
2072
2067
*/
2073
2068
def apply (prefix : Type , designator : TermName , denot : Denotation )(implicit ctx : Context ): TermRef = {
2074
- if ((prefix eq NoPrefix ) || denot.symbol.isFresh || symbolicRefs)
2069
+ if ((prefix eq NoPrefix ) || denot.symbol.isReferencedSymbolically || symbolicRefs)
2075
2070
withSym(prefix, denot.symbol.asTerm)
2076
2071
else denot match {
2077
2072
case denot : SymDenotation if denot.isCompleted => withSig(prefix, designator, denot.signature)
@@ -2087,7 +2082,7 @@ object Types {
2087
2082
* (2) The name in the term ref need not be the same as the name of the Symbol.
2088
2083
*/
2089
2084
def withSymAndName (prefix : Type , sym : TermSymbol , name : TermName )(implicit ctx : Context ): TermRef =
2090
- if ((prefix eq NoPrefix ) || sym.isFresh || symbolicRefs)
2085
+ if ((prefix eq NoPrefix ) || sym.isReferencedSymbolically || symbolicRefs)
2091
2086
apply(prefix, sym)
2092
2087
else if (sym.defRunId != NoRunId && sym.isCompleted)
2093
2088
withSig(prefix, name, sym.signature).withSym(sym)
@@ -2102,7 +2097,7 @@ object Types {
2102
2097
* (which must be completed).
2103
2098
*/
2104
2099
def withSig (prefix : Type , sym : TermSymbol )(implicit ctx : Context ): TermRef =
2105
- if ((prefix eq NoPrefix ) || sym.isFresh || symbolicRefs) apply(prefix, sym)
2100
+ if ((prefix eq NoPrefix ) || sym.isReferencedSymbolically || symbolicRefs) apply(prefix, sym)
2106
2101
else withSig(prefix, sym.name, sym.signature).withSym(sym)
2107
2102
2108
2103
/** Create a term ref with given prefix, name and signature */
@@ -2111,7 +2106,7 @@ object Types {
2111
2106
2112
2107
/** Create a term ref with given prefix, name, signature, and initial denotation */
2113
2108
def withSigAndDenot (prefix : Type , name : TermName , sig : Signature , denot : Denotation )(implicit ctx : Context ): TermRef = {
2114
- if ((prefix eq NoPrefix ) || denot.symbol.isFresh || symbolicRefs)
2109
+ if ((prefix eq NoPrefix ) || denot.symbol.isReferencedSymbolically || symbolicRefs)
2115
2110
apply(prefix, denot.symbol.asTerm)
2116
2111
else
2117
2112
withSig(prefix, name, sig)
@@ -2134,12 +2129,12 @@ object Types {
2134
2129
* (2) The name in the type ref need not be the same as the name of the Symbol.
2135
2130
*/
2136
2131
def withSymAndName (prefix : Type , sym : TypeSymbol , name : TypeName )(implicit ctx : Context ): TypeRef =
2137
- if ((prefix eq NoPrefix ) || sym.isFresh ) apply(prefix, sym)
2132
+ if ((prefix eq NoPrefix ) || sym.isReferencedSymbolically ) apply(prefix, sym)
2138
2133
else apply(prefix, name).withSym(sym)
2139
2134
2140
2135
/** Create a type ref with given name and initial denotation */
2141
2136
def apply (prefix : Type , name : TypeName , denot : Denotation )(implicit ctx : Context ): TypeRef = {
2142
- if ((prefix eq NoPrefix ) || denot.symbol.isFresh ) withSym(prefix, denot.symbol.asType)
2137
+ if ((prefix eq NoPrefix ) || denot.symbol.isReferencedSymbolically ) withSym(prefix, denot.symbol.asType)
2143
2138
else apply(prefix, name)
2144
2139
} withDenot denot
2145
2140
}
0 commit comments