@@ -1123,11 +1123,6 @@ object Types {
1123
1123
loop(this )
1124
1124
}
1125
1125
1126
- private def isReferencedSymbolically (sym : Symbol )(implicit ctx : Context ) =
1127
- sym.isFresh ||
1128
- sym.isClass && sym.is(Scala2x ) && ! sym.owner.is(Package ) ||
1129
- ctx.phase.symbolicRefs
1130
-
1131
1126
/** The type <this . name> , reduced if possible */
1132
1127
def select (name : Name )(implicit ctx : Context ): Type = name match {
1133
1128
case name : TermName => TermRef (this , name)
@@ -2066,7 +2061,7 @@ object Types {
2066
2061
* signature, if denotation is not yet completed.
2067
2062
*/
2068
2063
def apply (prefix : Type , designator : TermName , denot : Denotation )(implicit ctx : Context ): TermRef = {
2069
- if ((prefix eq NoPrefix ) || denot.symbol.isFresh || symbolicRefs)
2064
+ if ((prefix eq NoPrefix ) || denot.symbol.isReferencedSymbolically || symbolicRefs)
2070
2065
withSym(prefix, denot.symbol.asTerm)
2071
2066
else denot match {
2072
2067
case denot : SymDenotation if denot.isCompleted => withSig(prefix, designator, denot.signature)
@@ -2082,7 +2077,7 @@ object Types {
2082
2077
* (2) The name in the term ref need not be the same as the name of the Symbol.
2083
2078
*/
2084
2079
def withSymAndName (prefix : Type , sym : TermSymbol , name : TermName )(implicit ctx : Context ): TermRef =
2085
- if ((prefix eq NoPrefix ) || sym.isFresh || symbolicRefs)
2080
+ if ((prefix eq NoPrefix ) || sym.isReferencedSymbolically || symbolicRefs)
2086
2081
apply(prefix, sym)
2087
2082
else if (sym.defRunId != NoRunId && sym.isCompleted)
2088
2083
withSig(prefix, name, sym.signature).withSym(sym)
@@ -2097,7 +2092,7 @@ object Types {
2097
2092
* (which must be completed).
2098
2093
*/
2099
2094
def withSig (prefix : Type , sym : TermSymbol )(implicit ctx : Context ): TermRef =
2100
- if ((prefix eq NoPrefix ) || sym.isFresh || symbolicRefs) apply(prefix, sym)
2095
+ if ((prefix eq NoPrefix ) || sym.isReferencedSymbolically || symbolicRefs) apply(prefix, sym)
2101
2096
else withSig(prefix, sym.name, sym.signature).withSym(sym)
2102
2097
2103
2098
/** Create a term ref with given prefix, name and signature */
@@ -2106,7 +2101,7 @@ object Types {
2106
2101
2107
2102
/** Create a term ref with given prefix, name, signature, and initial denotation */
2108
2103
def withSigAndDenot (prefix : Type , name : TermName , sig : Signature , denot : Denotation )(implicit ctx : Context ): TermRef = {
2109
- if ((prefix eq NoPrefix ) || denot.symbol.isFresh || symbolicRefs)
2104
+ if ((prefix eq NoPrefix ) || denot.symbol.isReferencedSymbolically || symbolicRefs)
2110
2105
apply(prefix, denot.symbol.asTerm)
2111
2106
else
2112
2107
withSig(prefix, name, sig)
@@ -2129,12 +2124,12 @@ object Types {
2129
2124
* (2) The name in the type ref need not be the same as the name of the Symbol.
2130
2125
*/
2131
2126
def withSymAndName (prefix : Type , sym : TypeSymbol , name : TypeName )(implicit ctx : Context ): TypeRef =
2132
- if ((prefix eq NoPrefix ) || sym.isFresh ) apply(prefix, sym)
2127
+ if ((prefix eq NoPrefix ) || sym.isReferencedSymbolically ) apply(prefix, sym)
2133
2128
else apply(prefix, name).withSym(sym)
2134
2129
2135
2130
/** Create a type ref with given name and initial denotation */
2136
2131
def apply (prefix : Type , name : TypeName , denot : Denotation )(implicit ctx : Context ): TypeRef = {
2137
- if ((prefix eq NoPrefix ) || denot.symbol.isFresh ) withSym(prefix, denot.symbol.asType)
2132
+ if ((prefix eq NoPrefix ) || denot.symbol.isReferencedSymbolically ) withSym(prefix, denot.symbol.asType)
2138
2133
else apply(prefix, name)
2139
2134
} withDenot denot
2140
2135
}
0 commit comments