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

False negative parse error for type ascription on partial function inside for comprehension assignment #162

Open
olafurpg opened this issue Aug 13, 2017 · 1 comment

Comments

@olafurpg
Copy link
Collaborator

twitter/scalding started failing in ProjectTests in PR #159 due to a recent commit twitter/scalding@f4b77ce

The culprit lines are https://github.com/twitter/scalding/blob/cc6e71d2e4ee26e7c0ac0a77735fd1455d867ee9/scalding-graph/src/test/scala/com/twitter/scalding/graph/LiteralTests.scala#L34-L38

def genUnary: Gen[Literal[Int, Box]] = for {
  fn <- Arbitrary.arbitrary[(Int) => (Int)]
  bfn = { case Box(b) => Box(fn(b)) }: Box[Int] => Box[Int]
  input <- genLiteral
} yield UnaryLit(input, bfn)
// CompilationUnit:1:1 / Body:17:1 / TopStatSeq:19:1 / TopStat:22:1 / Tmpl:22:1 / ObjDef:22:1 / DefTmpl:22:21 / AnonTmpl:22:29 / NamedTmpl:22:29 / TmplBody:22:51 / TmplStat:34:3 / BlockDef:34:3 / Dcl:34:3 / FunDef:34:7 / Body:34:39 / Expr:34:42 / For:34:42 / Body:34:46 / "}":36:51 ..."=> Box[Int"
olafurpg added a commit to olafurpg/fastparse that referenced this issue Aug 13, 2017
@lihaoyi
Copy link
Member

lihaoyi commented Aug 13, 2017

lol postfix arrow-function type-annotations will be the death of me. This is probably the 10th bug I've bumped into related to those fellas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants