diff options
Diffstat (limited to 'sources/scalac/transformer')
5 files changed, 11 insertions, 10 deletions
diff --git a/sources/scalac/transformer/AddInterfacesPhase.java b/sources/scalac/transformer/AddInterfacesPhase.java index 5a3bc5b724..4df0e88744 100644 --- a/sources/scalac/transformer/AddInterfacesPhase.java +++ b/sources/scalac/transformer/AddInterfacesPhase.java @@ -110,7 +110,7 @@ public class AddInterfacesPhase extends Phase { case CompoundType(Type[] parents, Scope members): parents = Type.cloneArray(parents); parents[parents.length - 1] = sym.owner().nextType(); - return Type.compoundType(parents, members, tp.symbol()); + return Type.compoundTypeWithOwner(sym.owner(), parents, members); default: throw Debug.abort("illegal case", tp +" -- "+ Debug.show(sym)); } diff --git a/sources/scalac/transformer/ErasurePhase.java b/sources/scalac/transformer/ErasurePhase.java index 2175d48555..5fbd76f504 100644 --- a/sources/scalac/transformer/ErasurePhase.java +++ b/sources/scalac/transformer/ErasurePhase.java @@ -112,7 +112,7 @@ public class ErasurePhase extends Phase { case MethodType(Symbol[] params, Type result): return Type.MethodType(params, eraseBoxMethodType(result)); case TypeRef(Type prefix, Symbol clasz, Type[] args): - return Type.TypeRef(prefix, clasz, Type.EMPTY_ARRAY); + return Type.typeRef(prefix, clasz, Type.EMPTY_ARRAY); default: throw Debug.abort("illegal case", type); } diff --git a/sources/scalac/transformer/ExpandMixinsPhase.java b/sources/scalac/transformer/ExpandMixinsPhase.java index 575a01c959..83ec681a38 100644 --- a/sources/scalac/transformer/ExpandMixinsPhase.java +++ b/sources/scalac/transformer/ExpandMixinsPhase.java @@ -105,6 +105,7 @@ public class ExpandMixinsPhase extends Phase { if (symbol.isJava()) return type; if (symbol.isPackage()) return type; if (symbol.isInterface()) return type; + if (symbol.isCompoundSym()) return type; // !!! check if (symbol.isClass()) { // !!! System.out.println(Debug.show("!!! ", s, " -> ", symbol, " - ", getTypeExpander(symbol).clasz, " : " + type)); return getTypeExpander(symbol).apply(type); @@ -423,7 +424,7 @@ public class ExpandMixinsPhase extends Phase { symbol = prefix.rebind(symbol); } args = map(args); - return Type.TypeRef(prefix, symbol, args).unalias(); + return Type.typeRef(prefix, symbol, args).unalias(); case SingleType(Type prefix, Symbol symbol): // !!! prefix = apply(prefix); // !!! symbol = prefix.rebind(symbol); @@ -449,7 +450,7 @@ public class ExpandMixinsPhase extends Phase { parents = Type.cloneArray(parents); while (i < parents.length) { if (!parents[i].symbol().isInterface()) - parents[i] = Type.TypeRef(parents[i].prefix(), (Symbol)interfaces.get(parents[i].symbol()), parents[i].typeArgs()); + parents[i] = Type.typeRef(parents[i].prefix(), (Symbol)interfaces.get(parents[i].symbol()), parents[i].typeArgs()); i++; } return Type.compoundType(parents, members, clasz); diff --git a/sources/scalac/transformer/ExplicitOuterClassesPhase.java b/sources/scalac/transformer/ExplicitOuterClassesPhase.java index f9f4bfc651..e2a94dc86a 100644 --- a/sources/scalac/transformer/ExplicitOuterClassesPhase.java +++ b/sources/scalac/transformer/ExplicitOuterClassesPhase.java @@ -92,7 +92,7 @@ public class ExplicitOuterClassesPhase extends Phase { Type prefix = clasz.owner().thisType(); Type[] args = Symbol.type(tparams); // !!! use getNewTypeArgs ? - Type self = Type.TypeRef(prefix, clasz, args); + Type self = Type.typeRef(prefix, clasz, args); Type s = self; self = context.transformer.apply(self); tparams = Type.symbol(self.typeArgs()); @@ -305,14 +305,14 @@ public class ExplicitOuterClassesPhase extends Phase { if (symbol.isClass()) { args = map(getNewArgsOf(context, prefix, symbol, args)); prefix = Type.localThisType; - return Type.TypeRef(prefix, symbol, args); + return Type.typeRef(prefix, symbol, args); } if (symbol.isPackage()) { args = Type.EMPTY_ARRAY; prefix = Type.localThisType; - return Type.TypeRef(prefix, symbol, args); + return Type.typeRef(prefix, symbol, args); } - return Type.TypeRef(apply(prefix), symbol, map(args)); + return Type.typeRef(apply(prefix), symbol, map(args)); case SingleType(Type prefix, Symbol symbol): return Type.singleType(apply(prefix), symbol); case ThisType(Symbol clasz): diff --git a/sources/scalac/transformer/LambdaLiftPhase.java b/sources/scalac/transformer/LambdaLiftPhase.java index 6919c56364..65da6b928b 100644 --- a/sources/scalac/transformer/LambdaLiftPhase.java +++ b/sources/scalac/transformer/LambdaLiftPhase.java @@ -73,7 +73,7 @@ public class LambdaLiftPhase extends Phase implements Kinds, Modifiers { case ThisType(Symbol s): if (s == Symbol.NONE) { pre = sym.owner().enclClass().thisType(); - tp = Type.TypeRef(pre, sym, targs); + tp = Type.typeRef(pre, sym, targs); } } } @@ -95,7 +95,7 @@ public class LambdaLiftPhase extends Phase implements Kinds, Modifiers { targs1[i] = proxy(tparams[i], owner).type(); i++; } - return Type.TypeRef(pre, sym, targs1); + return Type.typeRef(pre, sym, targs1); } } else if (LambdaLift.isLocal(sym, owner)) { assert targs.length == 0; |