Created
February 21, 2016 20:20
-
-
Save olafurpg/5c4055932ee2e3403275 to your computer and use it in GitHub Desktop.
Minimal examples from https://github.com/scalameta/scalameta/issues/312
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
ollie-scalameta@ """case x: (Int, Int) => 1""".parse[Case] | |
scala.meta.parsers.common.ParseException: identifier expected but integer literal found at 22..23 | |
ollie-scalameta@ """def macroTransform(annottees: Any*) = macro Cached.cachedImpl""".parse[Stat] | |
scala.meta.parsers.common.ParseException: macros must have explicitly specified return types at 4..18 | |
ollie-scalameta@ """for { ident @ (__ : Int) <- List(1, 2) } yield ident + 1""".parse[Stat] | |
scala.meta.parsers.common.ParseException: ) expected but : found at 18..19 | |
ollie-scalameta@ """import Predef.{ any2stringadd => _, _ => _ }""".parse[Stat] | |
scala.meta.parsers.common.ParseException: } expected but right arrow found at 38..40 | |
ollie-scalameta@ """{ | |
val (aa, bb) = tail.unzip: (IList[X], IList[Y]) | |
(nel(a, aa), nel(b, bb)) | |
}""".parse[Stat] | |
scala.meta.parsers.common.ParseException: ; expected but ( found at 58..59 | |
// Minimal example | |
ollie-scalameta@ """ case x: (Bob[X] forSome { type X[_] }) => true""".parse[Case] | |
scala.meta.parsers.common.ParseException: identifier expected but true found at 44..48 | |
// Big example | |
ollie-scalameta@ """class Bob[K[_]] { | |
def foo(other: Any) = other match { | |
case x: (Bob[X] forSome { type X[_] }) => true | |
case _ => false | |
} | |
}""".parse[Stat] | |
scala.meta.parsers.common.ParseException: identifier expected but true found at 103..107 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment