diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-12-05 07:05:17 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-12-06 23:17:27 +0100 |
commit | bb9adfbd76af0a0281912fcef4bcaca409a7c9a3 (patch) | |
tree | b0b1c692ffb66e7c96b5729fc3e2bba0753b3396 /src/compiler/scala/tools/nsc/ast | |
parent | 838cbe623c142b7005446793948097f679219fe3 (diff) | |
download | scala-bb9adfbd76af0a0281912fcef4bcaca409a7c9a3.tar.gz scala-bb9adfbd76af0a0281912fcef4bcaca409a7c9a3.tar.bz2 scala-bb9adfbd76af0a0281912fcef4bcaca409a7c9a3.zip |
more ListOfNil => Nil
Even more trees (together with Apply nodes produced by templateParents
and New nodes produced by New in TreeBuilders) now distinguish nullary
argument list from empty argument list.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/TreeGen.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeGen.scala b/src/compiler/scala/tools/nsc/ast/TreeGen.scala index 53d35791b6..5cb43575b8 100644 --- a/src/compiler/scala/tools/nsc/ast/TreeGen.scala +++ b/src/compiler/scala/tools/nsc/ast/TreeGen.scala @@ -58,7 +58,7 @@ abstract class TreeGen extends scala.reflect.internal.TreeGen with TreeDSL { def mkUnchecked(expr: Tree): Tree = atPos(expr.pos) { // This can't be "Annotated(New(UncheckedClass), expr)" because annotations // are very picky about things and it crashes the compiler with "unexpected new". - Annotated(New(scalaDot(UncheckedClass.name), ListOfNil), expr) + Annotated(New(scalaDot(UncheckedClass.name), Nil), expr) } // if it's a Match, mark the selector unchecked; otherwise nothing. def mkUncheckedMatch(tree: Tree) = tree match { diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index d6be1abdd9..33db4ee2d5 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -2106,7 +2106,7 @@ self => def annotationExpr(): Tree = atPos(in.offset) { val t = exprSimpleType() if (in.token == LPAREN) New(t, multipleArgumentExprs()) - else New(t, ListOfNil) + else New(t, Nil) } /* -------- PARAMETERS ------------------------------------------- */ diff --git a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala index 9e9e81aa27..f94055f666 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala @@ -237,7 +237,7 @@ abstract class TreeBuilder { atPos(npos) { New( Ident(x) setPos npos.focus, - ListOfNil) + Nil) } ) } |