@@ -989,7 +989,7 @@ object Types {
989
989
case tp : TypeRef =>
990
990
if (tp.symbol.isClass) tp
991
991
else tp.info match {
992
- case TypeAlias (tp ) => tp .dealias1(keepAnnots): @ tailrec
992
+ case TypeAlias (alias ) => alias .dealias1(keepAnnots): @ tailrec
993
993
case _ => tp
994
994
}
995
995
case app @ AppliedType (tycon, args) =>
@@ -1967,37 +1967,35 @@ object Types {
1967
1967
def derivedSelect (prefix : Type )(implicit ctx : Context ): Type =
1968
1968
if (prefix eq this .prefix) this
1969
1969
else if (prefix.isBottomType) prefix
1970
- else if (isType) {
1971
- val res =
1972
- if (currentSymbol.is(ClassTypeParam )) argForParam(prefix)
1973
- else prefix.lookupRefined(name)
1974
- if (res.exists) res
1975
- else if (Config .splitProjections)
1976
- prefix match {
1977
- case prefix : AndType =>
1978
- def isMissing (tp : Type ) = tp match {
1979
- case tp : TypeRef => ! tp.info.exists
1980
- case _ => false
1981
- }
1982
- val derived1 = derivedSelect(prefix.tp1)
1983
- val derived2 = derivedSelect(prefix.tp2)
1984
- return (
1985
- if (isMissing(derived1)) derived2
1986
- else if (isMissing(derived2)) derived1
1987
- else prefix.derivedAndType(derived1, derived2))
1988
- case prefix : OrType =>
1989
- val derived1 = derivedSelect(prefix.tp1)
1990
- val derived2 = derivedSelect(prefix.tp2)
1991
- return prefix.derivedOrType(derived1, derived2)
1992
- case _ =>
1993
- withPrefix(prefix)
1994
- }
1970
+ else {
1971
+ if (isType) {
1972
+ val res =
1973
+ if (currentSymbol.is(ClassTypeParam )) argForParam(prefix)
1974
+ else prefix.lookupRefined(name)
1975
+ if (res.exists) return res
1976
+ if (Config .splitProjections)
1977
+ prefix match {
1978
+ case prefix : AndType =>
1979
+ def isMissing (tp : Type ) = tp match {
1980
+ case tp : TypeRef => ! tp.info.exists
1981
+ case _ => false
1982
+ }
1983
+ val derived1 = derivedSelect(prefix.tp1)
1984
+ val derived2 = derivedSelect(prefix.tp2)
1985
+ return (
1986
+ if (isMissing(derived1)) derived2
1987
+ else if (isMissing(derived2)) derived1
1988
+ else prefix.derivedAndType(derived1, derived2))
1989
+ case prefix : OrType =>
1990
+ val derived1 = derivedSelect(prefix.tp1)
1991
+ val derived2 = derivedSelect(prefix.tp2)
1992
+ return prefix.derivedOrType(derived1, derived2)
1993
+ case _ =>
1994
+ }
1995
+ }
1996
+ if (prefix.isInstanceOf [WildcardType ]) WildcardType
1995
1997
else withPrefix(prefix)
1996
1998
}
1997
- else prefix match {
1998
- case _ : WildcardType => WildcardType
1999
- case _ => withPrefix(prefix)
2000
- }
2001
1999
2002
2000
/** A reference like this one, but with the given symbol, if it exists */
2003
2001
final def withSym (sym : Symbol )(implicit ctx : Context ): ThisType =
0 commit comments