diff options
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scalac/atree/AFunction.java | 2 | ||||
-rw-r--r-- | sources/scalac/atree/ATreePrinter.java | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/sources/scalac/atree/AFunction.java b/sources/scalac/atree/AFunction.java index ed5a4c5fba..2970222a2c 100644 --- a/sources/scalac/atree/AFunction.java +++ b/sources/scalac/atree/AFunction.java @@ -8,6 +8,7 @@ package scalac.atree; +import scalac.symtab.Type; import scalac.symtab.Symbol; /** This class represents an attributed function reference. */ @@ -18,6 +19,7 @@ public class AFunction { public case Method(ACode object, Symbol method, AInvokeStyle style); public case Primitive(APrimitive primitive); + public case NewArray(Type element); //######################################################################## // Public Methods diff --git a/sources/scalac/atree/ATreePrinter.java b/sources/scalac/atree/ATreePrinter.java index 783af97c8d..7caa05952b 100644 --- a/sources/scalac/atree/ATreePrinter.java +++ b/sources/scalac/atree/ATreePrinter.java @@ -443,19 +443,21 @@ public class ATreePrinter { /** Prints the function. */ public ATreePrinter printFunction(AFunction function) { switch (function) { - case Method(Void, Symbol method, InvokeStyle.New): + case Method(Void, Symbol method, AInvokeStyle.New): return print("new").space().printSymbol(method); - case Method(Void, Symbol method, InvokeStyle.Static): + case Method(Void, Symbol method, AInvokeStyle.Static): return printSymbol(method.owner()).print('.').printSymbol(method); - case Method(This(Symbol clasz), Symbol method, InvokeStyle.Static): + case Method(This(Symbol clasz), Symbol method, AInvokeStyle.Static): printSymbol(clasz).print('.').print("super").print('.'); return printSymbol(method); - case Method(ACode object, Symbol method, InvokeStyle style): + case Method(ACode object, Symbol method, AInvokeStyle style): printCode(object).print('.'); - if (style != InvokeStyle.Dynamic) print("<" + style + ">").space(); + if (style != AInvokeStyle.Dynamic) print("<" +style+ ">").space(); return printSymbol(method); case Primitive(APrimitive primitive): return printPrimitive(primitive); + case NewArray(Type element): + return print("new").space().printType(element).print("[]"); default: throw Debug.abort("unknown case", function); } |