summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala17
1 files changed, 14 insertions, 3 deletions
diff --git a/sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala b/sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala
index afea22df28..fc6b66e559 100644
--- a/sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala
+++ b/sources/scala/tools/scalac/ast/printer/TextTreePrinter.scala
@@ -806,6 +806,8 @@ class TextTreePrinter(global0: scalac_Global, out0: PrintWriter)
/** Print template. */
def printTemplate(clasz: Symbol, template: Tree.Template): Unit = {
val local = template.symbol();
+ val constructors = if (clasz == null) null else clasz.allConstructors();
+ val primary = if (clasz == null) null else clasz.primaryConstructor();
val parents = template.parents;
val body = template.body;
val types = new ArrayList();
@@ -828,11 +830,20 @@ class TextTreePrinter(global0: scalac_Global, out0: PrintWriter)
printArray(parents, None, None, TXT_WITH_SP);
}
// print local
- if (global.uniqid && local != null) {
+ if (global.uniqid && (local != null || constructors != null)) {
print(Space);
printString("/*");
- printString("local");
- printUniqueIdOf(local);
+ if (constructors != null) {
+ printString("constructors");
+ printUniqueIdOf(constructors);
+ printString(",primary");
+ printUniqueIdOf(primary);
+ }
+ if (local != null) {
+ if (constructors != null) printString(",");
+ printString("local");
+ printUniqueIdOf(local);
+ }
printString("*/");
}
// print body