aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/parsing/Parsers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-28 22:25:09 +0200
committerMartin Odersky <odersky@gmail.com>2017-04-11 09:33:11 +0200
commitca5652cc5a74f00277ce942a001fa6e931ee3728 (patch)
tree9ef6e2b341bc10678bbe1f06d4c15fb28093da07 /compiler/src/dotty/tools/dotc/parsing/Parsers.scala
parent1e49ddad97c4e8207913857511ae62467f8cd3ce (diff)
downloaddotty-ca5652cc5a74f00277ce942a001fa6e931ee3728.tar.gz
dotty-ca5652cc5a74f00277ce942a001fa6e931ee3728.tar.bz2
dotty-ca5652cc5a74f00277ce942a001fa6e931ee3728.zip
Make freshName semantic
Diffstat (limited to 'compiler/src/dotty/tools/dotc/parsing/Parsers.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/parsing/Parsers.scala7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala
index 3e3673e5e..d0451dd60 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 NameExtractors.WildcardParamName
import ast.{Positioned, Trees, untpd}
import ast.Trees._
import Decorators._
@@ -1168,7 +1169,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 +1225,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 +1706,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 =