aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/parsing/Parsers.scala
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2017-04-11 11:49:40 +0200
committerGitHub <noreply@github.com>2017-04-11 11:49:40 +0200
commit579571e05a08120133173933e7eaf2555846d1d7 (patch)
tree7b0c89291126e89a901a8ab1230f874e26e25515 /compiler/src/dotty/tools/dotc/parsing/Parsers.scala
parent4ff656138a2e4e127b763adeee3f0f72d515f6b6 (diff)
parent87608bded1fb23519a829fa7f6ee14d4b6a515dc (diff)
downloaddotty-579571e05a08120133173933e7eaf2555846d1d7.tar.gz
dotty-579571e05a08120133173933e7eaf2555846d1d7.tar.bz2
dotty-579571e05a08120133173933e7eaf2555846d1d7.zip
Merge pull request #2128 from dotty-staging/add-semantic-names
Delay name mangling
Diffstat (limited to 'compiler/src/dotty/tools/dotc/parsing/Parsers.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/parsing/Parsers.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala
index 3e3673e5e..3112be659 100644
--- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala
+++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -12,6 +12,7 @@ import core._
import Flags._
import Contexts._
import Names._
+import NameKinds.WildcardParamName
import ast.{Positioned, Trees, untpd}
import ast.Trees._
import Decorators._
@@ -20,7 +21,6 @@ import util.Positions._
import Constants._
import ScriptParsers._
import Comments._
-
import scala.annotation.{tailrec, switch}
import util.DotClass
import rewrite.Rewrites.patch
@@ -1168,7 +1168,7 @@ object Parsers {
def bindingName(): TermName =
if (in.token == USCORE) {
in.nextToken()
- ctx.freshName(nme.USCORE_PARAM_PREFIX).toTermName
+ WildcardParamName.fresh()
}
else ident()
@@ -1224,7 +1224,7 @@ object Parsers {
path(thisOK = true)
case USCORE =>
val start = in.skipToken()
- val pname = ctx.freshName(nme.USCORE_PARAM_PREFIX).toTermName
+ val pname = WildcardParamName.fresh()
val param = ValDef(pname, TypeTree(), EmptyTree).withFlags(SyntheticTermParam)
.withPos(Position(start))
placeholderParams = param :: placeholderParams
@@ -1705,7 +1705,7 @@ object Parsers {
if (isConcreteOwner || in.token != USCORE) ident().toTypeName
else {
in.nextToken()
- ctx.freshName(nme.USCORE_PARAM_PREFIX).toTypeName
+ WildcardParamName.fresh().toTypeName
}
val hkparams = typeParamClauseOpt(ParamOwner.TypeParam)
val bounds =