aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-31 18:32:02 +0200
committerMartin Odersky <odersky@gmail.com>2017-04-11 09:33:12 +0200
commitb4f21c6da6b6bc1797908f1400631573b6445e31 (patch)
tree19efe5c588230059b04ef046114c30d3fd64b1f9 /compiler/src/dotty/tools/dotc/typer/Applications.scala
parent7a927ce233a8ea4b8ddc285b8a36c61ca3fdd405 (diff)
downloaddotty-b4f21c6da6b6bc1797908f1400631573b6445e31.tar.gz
dotty-b4f21c6da6b6bc1797908f1400631573b6445e31.tar.bz2
dotty-b4f21c6da6b6bc1797908f1400631573b6445e31.zip
Names are no longer Seqs
Drop Seq implementation of name. This implementation was always problematic because it entailed potentially very costly conversions to toSimpleName. We now have better control over when we convert a name to a simple name.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Applications.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Applications.scala b/compiler/src/dotty/tools/dotc/typer/Applications.scala
index db1e0bcfb..2f2af9868 100644
--- a/compiler/src/dotty/tools/dotc/typer/Applications.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Applications.scala
@@ -403,7 +403,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
def missingArg(n: Int): Unit = {
val pname = methodType.paramNames(n)
fail(
- if (pname contains '$') s"not enough arguments for $methString"
+ if (pname.firstPart contains '$') s"not enough arguments for $methString"
else s"missing argument for parameter $pname of $methString")
}
@@ -719,7 +719,8 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
val lhs1 = typedExpr(lhs)
val liftedDefs = new mutable.ListBuffer[Tree]
val lhs2 = untpd.TypedSplice(liftAssigned(liftedDefs, lhs1))
- val assign = untpd.Assign(lhs2, untpd.Apply(untpd.Select(lhs2, name.init), rhss))
+ val assign = untpd.Assign(lhs2,
+ untpd.Apply(untpd.Select(lhs2, name.asSimpleName.dropRight(1)), rhss))
wrapDefs(liftedDefs, typed(assign))
}