Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quasiquotes don't work for packages #6841

Closed
scabug opened this issue Dec 19, 2012 · 2 comments
Closed

quasiquotes don't work for packages #6841

scabug opened this issue Dec 19, 2012 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Dec 19, 2012

scala> q"package foo"
error: exception during macro expansion: 
scala.tools.nsc.ast.parser.Scanners$MalformedInput
	at scala.tools.nsc.ast.parser.Parsers$SourceFileParser.syntaxError(Parsers.scala:162)
	at scala.tools.nsc.ast.parser.Parsers$Parser.syntaxError(Parsers.scala:521)
	at scala.tools.nsc.ast.parser.Parsers$Parser.syntaxErrorOrIncomplete(Parsers.scala:538)
	at scala.tools.nsc.ast.parser.Parsers$Parser.syntaxErrorOrIncomplete(Parsers.scala:532)
	at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$templateStatSeq$1.apply(Parsers.scala:3048)
	at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$templateStatSeq$1.apply(Parsers.scala:3015)
	at scala.tools.nsc.ast.parser.Parsers$Parser.checkNoEscapingPlaceholders(Parsers.scala:428)
	at scala.tools.nsc.ast.parser.Parsers$Parser.templateStatSeq(Parsers.scala:3015)
	at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$23.apply(Parsers.scala:2894)
	at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$23.apply(Parsers.scala:2894)
	at scala.tools.nsc.ast.parser.ParsersCommon$ParserCommon.inBraces(Parsers.scala:64)
	at scala.tools.nsc.ast.parser.Parsers$Parser.templateBody(Parsers.scala:2894)
	at scala.tools.nsc.ast.parser.Parsers$Parser.templateBodyOpt(Parsers.scala:2901)
	at scala.tools.nsc.ast.parser.Parsers$Parser.templateOpt(Parsers.scala:2860)
	at scala.tools.nsc.ast.parser.Parsers$Parser.objectDef(Parsers.scala:2774)
	at scala.tools.nsc.ast.parser.Parsers$Parser.tmplDef(Parsers.scala:2712)
	at scala.tools.nsc.ast.parser.Parsers$Parser.topLevelTmplDef(Parsers.scala:2693)
	at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$topStatSeq$2.apply(Parsers.scala:2986)
	at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$topStatSeq$2.apply(Parsers.scala:2986)
	at scala.tools.nsc.ast.parser.Parsers$Parser.joinComment(Parsers.scala:686)
	at scala.tools.nsc.ast.parser.Parsers$Parser.topStatSeq(Parsers.scala:2986)
	at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$compilationUnit$1.topstats$1(Parsers.scala:3181)
	at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$compilationUnit$1.apply(Parsers.scala:3187)
	at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$compilationUnit$1.apply(Parsers.scala:3151)
	at scala.tools.nsc.ast.parser.Parsers$Parser.checkNoEscapingPlaceholders(Parsers.scala:428)
	at scala.tools.nsc.ast.parser.Parsers$Parser.compilationUnit(Parsers.scala:3151)
	at scala.tools.nsc.ast.parser.Parsers$SourceFileParser$$anonfun$parseStartRule$1.apply(Parsers.scala:141)
	at scala.tools.nsc.ast.parser.Parsers$SourceFileParser$$anonfun$parseStartRule$1.apply(Parsers.scala:141)
	at scala.tools.nsc.ast.parser.Parsers$Parser.parse(Parsers.scala:313)
	at scala.tools.reflect.quasiquotes.Parser.parse(Parser.scala:16)
	at scala.tools.reflect.quasiquotes.ApplyQMacro.parse(ApplyQMacro.scala:69)
	at scala.tools.reflect.quasiquotes.ApplyQMacro.<init>(ApplyQMacro.scala:52)
	at scala.tools.reflect.FastTrack$$anonfun$fastTrack$7$$anon$5.<init>(FastTrack.scala:39)
	at scala.tools.reflect.FastTrack$$anonfun$fastTrack$7.applyOrElse(FastTrack.scala:39)
	at scala.tools.reflect.FastTrack$$anonfun$fastTrack$7.applyOrElse(FastTrack.scala:39)
	at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33)
	at scala.tools.reflect.FastTrack$FastTrackEntry.run(FastTrack.scala:25)
@scabug
Copy link
Author

@scabug scabug commented Dec 19, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6841?orig=1
Reporter: @xeno-by
Affected Versions: 2.11.0-M4

@scabug
Copy link
Author

@scabug scabug commented Oct 19, 2013

@densh said:
Fixed in scala/scala#3007

@scabug scabug closed this Oct 19, 2013
@scabug scabug added this to the 2.11.0-M7 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants