Skip to content

Instantly share code, notes, and snippets.

@folone
Created June 25, 2014 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save folone/e6d7250570a839e591b8 to your computer and use it in GitHub Desktop.
Save folone/e6d7250570a839e591b8 to your computer and use it in GitHub Desktop.
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