summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala10
-rw-r--r--test/files/run/stringInterpolation.check2
-rw-r--r--test/files/run/stringInterpolation.scala4
3 files changed, 8 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
index 94d3e3e640..bf305ffc97 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
@@ -120,11 +120,6 @@ abstract class TreeBuilder {
private def getVariables(tree: Tree): List[(Name, Tree, Position)] =
new GetVarTraverser apply tree
- private def makeTuple(trees: List[Tree], isType: Boolean): Tree = {
- val tupString = "Tuple" + trees.length
- Apply(scalaDot(if (isType) newTypeName(tupString) else newTermName(tupString)), trees)
- }
-
def byNameApplication(tpe: Tree): Tree =
AppliedTypeTree(rootScalaDot(tpnme.BYNAME_PARAM_CLASS_NAME), List(tpe))
def repeatedApplication(tpe: Tree): Tree =
@@ -133,6 +128,11 @@ abstract class TreeBuilder {
def makeImportSelector(name: Name, nameOffset: Int): ImportSelector =
ImportSelector(name, nameOffset, name, nameOffset)
+ private def makeTuple(trees: List[Tree], isType: Boolean): Tree = {
+ val tupString = "Tuple" + trees.length
+ Apply(scalaDot(if (isType) newTypeName(tupString) else newTermName(tupString)), trees)
+ }
+
def makeTupleTerm(trees: List[Tree], flattenUnary: Boolean): Tree = trees match {
case Nil => Literal(Constant())
case List(tree) if flattenUnary => tree
diff --git a/test/files/run/stringInterpolation.check b/test/files/run/stringInterpolation.check
new file mode 100644
index 0000000000..b5b63343a8
--- /dev/null
+++ b/test/files/run/stringInterpolation.check
@@ -0,0 +1,2 @@
+1 plus 1 is 2
+We have a 1.10% chance of success
diff --git a/test/files/run/stringInterpolation.scala b/test/files/run/stringInterpolation.scala
index 9c6c5963ae..d88f5f6889 100644
--- a/test/files/run/stringInterpolation.scala
+++ b/test/files/run/stringInterpolation.scala
@@ -1,6 +1,4 @@
-package test
-
-object stringInterpolation {
+object Test {
def main(args : Array[String]) : Unit = {
println("\{1} plus \{1} is \{1 + 1}")
val x = 1.1