-
-
Save folone/e6d7250570a839e591b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | |
index c9536f0..b97c674 100644 | |
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | |
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | |
@@ -1102,8 +1102,10 @@ self => | |
val tok = in.token | |
if (tok != BACKQUOTED_IDENT && tok != IDENTIFIER) { | |
val lit = literal(false) | |
- accept(DOT) | |
- accept(TYPE) | |
+ if (in.token == DOT && lookingAhead { in.token == TYPE }) { | |
+ accept(DOT) | |
+ accept(TYPE) | |
+ } | |
return atPos(start)(new SingletonTypeTree(lit) { override val isLiteral = true }) | |
} | |
val name = ident() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment