diff options
-rw-r--r-- | src/dotty/tools/dotc/parsing/Parsers.scala | 11 | ||||
-rw-r--r-- | tests/pos/t2405.scala (renamed from tests/new/t2405.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t2421.scala (renamed from tests/new/t2421.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t2421_delitedsl.scala (renamed from tests/new/t2421_delitedsl.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t2421b_pos.scala (renamed from tests/new/t2421b_pos.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t2421c.scala (renamed from tests/new/t2421c.scala) | 0 | ||||
-rwxr-xr-x | tests/pos/t2425.scala (renamed from tests/new/t2425.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t2435.scala (renamed from tests/new/t2435.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t2441pos.scala (renamed from tests/new/t2441pos.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t2444.scala (renamed from tests/new/t2444.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t245.scala (renamed from tests/new/t245.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t2454.scala (renamed from tests/pending/pos/t2454.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t247.scala (renamed from tests/new/t247.scala) | 0 | ||||
-rwxr-xr-x | tests/pos/t2484.scala (renamed from tests/new/t2484.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t2486.scala (renamed from tests/new/t2486.scala) | 0 |
15 files changed, 6 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/parsing/Parsers.scala b/src/dotty/tools/dotc/parsing/Parsers.scala index 7bc7d5516..0ad33a96c 100644 --- a/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/src/dotty/tools/dotc/parsing/Parsers.scala @@ -447,10 +447,6 @@ object Parsers { if (tok == BACKQUOTED_IDENT) BackquotedIdent(name) else Ident(name) - /** IdentOrWildcard ::= id | `_' */ - def identOrWildcard(): Name = - if (in.token == USCORE) { in.nextToken(); nme.WILDCARD } else ident() - def wildcardIdent(): Ident = atPos(accept(USCORE)) { Ident(nme.WILDCARD) } @@ -1478,7 +1474,12 @@ object Parsers { if (mods is VarianceFlags) in.nextToken() } atPos(tokenRange) { - val name = (if (isConcreteOwner) ident() else identOrWildcard()).toTypeName + val name = + if (isConcreteOwner || in.token != USCORE) ident().toTypeName + else { + in.nextToken() + ctx.freshName(nme.USCORE_PARAM_PREFIX).toTypeName + } val hkparams = if (ownerKind == ParamOwner.TypeParam) Nil else typeParamClauseOpt(ParamOwner.TypeParam) diff --git a/tests/new/t2405.scala b/tests/pos/t2405.scala index 224b2ce83..224b2ce83 100644 --- a/tests/new/t2405.scala +++ b/tests/pos/t2405.scala diff --git a/tests/new/t2421.scala b/tests/pos/t2421.scala index 2544a1cb3..2544a1cb3 100644 --- a/tests/new/t2421.scala +++ b/tests/pos/t2421.scala diff --git a/tests/new/t2421_delitedsl.scala b/tests/pos/t2421_delitedsl.scala index 554702a03..554702a03 100644 --- a/tests/new/t2421_delitedsl.scala +++ b/tests/pos/t2421_delitedsl.scala diff --git a/tests/new/t2421b_pos.scala b/tests/pos/t2421b_pos.scala index 679b8a8d6..679b8a8d6 100644 --- a/tests/new/t2421b_pos.scala +++ b/tests/pos/t2421b_pos.scala diff --git a/tests/new/t2421c.scala b/tests/pos/t2421c.scala index bd24cacd7..bd24cacd7 100644 --- a/tests/new/t2421c.scala +++ b/tests/pos/t2421c.scala diff --git a/tests/new/t2425.scala b/tests/pos/t2425.scala index 477d5467a..477d5467a 100755 --- a/tests/new/t2425.scala +++ b/tests/pos/t2425.scala diff --git a/tests/new/t2435.scala b/tests/pos/t2435.scala index 697e9e1f2..697e9e1f2 100644 --- a/tests/new/t2435.scala +++ b/tests/pos/t2435.scala diff --git a/tests/new/t2441pos.scala b/tests/pos/t2441pos.scala index 25eb2232c..25eb2232c 100644 --- a/tests/new/t2441pos.scala +++ b/tests/pos/t2441pos.scala diff --git a/tests/new/t2444.scala b/tests/pos/t2444.scala index fac1e95d0..fac1e95d0 100644 --- a/tests/new/t2444.scala +++ b/tests/pos/t2444.scala diff --git a/tests/new/t245.scala b/tests/pos/t245.scala index 570ac4178..570ac4178 100644 --- a/tests/new/t245.scala +++ b/tests/pos/t245.scala diff --git a/tests/pending/pos/t2454.scala b/tests/pos/t2454.scala index 00f2e6f67..00f2e6f67 100644 --- a/tests/pending/pos/t2454.scala +++ b/tests/pos/t2454.scala diff --git a/tests/new/t247.scala b/tests/pos/t247.scala index fdcafeb2c..fdcafeb2c 100644 --- a/tests/new/t247.scala +++ b/tests/pos/t247.scala diff --git a/tests/new/t2484.scala b/tests/pos/t2484.scala index 15165c247..15165c247 100755 --- a/tests/new/t2484.scala +++ b/tests/pos/t2484.scala diff --git a/tests/new/t2486.scala b/tests/pos/t2486.scala index 69fe4c127..69fe4c127 100644 --- a/tests/new/t2486.scala +++ b/tests/pos/t2486.scala |