{"action":"closed","issue":{"url":"https://api.github.com/repos/lihaoyi/fastparse/issues/16","labels_url":"https://api.github.com/repos/lihaoyi/fastparse/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/lihaoyi/fastparse/issues/16/comments","events_url":"https://api.github.com/repos/lihaoyi/fastparse/issues/16/events","html_url":"https://github.com/lihaoyi/fastparse/issues/16","id":81508925,"number":16,"title":"Syntax error of typo on `def` is not reported if it's not type annotated.","user":{"login":"taisukeoe","id":1506707,"avatar_url":"https://avatars.githubusercontent.com/u/1506707?v=3","gravatar_id":"","url":"https://api.github.com/users/taisukeoe","html_url":"https://github.com/taisukeoe","followers_url":"https://api.github.com/users/taisukeoe/followers","following_url":"https://api.github.com/users/taisukeoe/following{/other_user}","gists_url":"https://api.github.com/users/taisukeoe/gists{/gist_id}","starred_url":"https://api.github.com/users/taisukeoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taisukeoe/subscriptions","organizations_url":"https://api.github.com/users/taisukeoe/orgs","repos_url":"https://api.github.com/users/taisukeoe/repos","events_url":"https://api.github.com/users/taisukeoe/events{/privacy}","received_events_url":"https://api.github.com/users/taisukeoe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-27T15:56:25Z","updated_at":"2015-05-27T18:24:40Z","closed_at":"2015-05-27T18:24:40Z","body":"I happen to find bugs about syntax error reporting of typo on `def`,`val` or `var`,  which are not occurred if method or variable doesn't have type annotation. I assume they should be reported as syntax error even if they're not type annotated\r\n\r\nHere are examples of method with typo on `def`. Behavior of variable with typo on `val` or `var` is the same. \r\n\r\n```scala\r\nscala> val p0 = scalaparse.Scala.CompilationUnit\r\np0: fastparse.P0 = CompilationUnit\r\n\r\n//Reporting typo of `def`, if return type is annotated\r\nscala> p0.parse(\"object A{def i:Int = 1}\",0,true)\r\nres24: fastparse.core.Result[Unit] = Success((), 23)\r\n\r\nscala> p0.parse(\"object A{de i:Int = 1}\",0,true)\r\nres25: fastparse.core.Result[Unit] = Failure(CompilationUnit:0 / Body:0 / TopStatSeq:0 / TopStat:0 / Tmpl:0 / ObjDef:0 / DefTmpl:8 / TmplBody:8 / }:17 / \"}\":18 ...\"= 1}\", true)\r\n\r\n//Not reporting typo of `def`, if return type is NOT annotated\r\nscala> p0.parse(\"object A{def i = 1}\",0,true)\r\nres26: fastparse.core.Result[Unit] = Success((), 19)\r\n\r\nscala> p0.parse(\"object A{de i = 1}\",0,true)\r\nres27: fastparse.core.Result[Unit] = Success((), 18)\r\n```"}}