reason icon indicating copy to clipboard operation
reason copied to clipboard

parsing error message very distant from actual parsing error

Open aryx opened this issue 5 years ago • 0 comments

On this simple content:

let parse = file => { let json = Json_io.load_json(file); switch(json) { | J.Object xs => { let rules = List.assoc("rules",xs); parse_rules(rules) } | _ => error("Top"); } }

reason reports an error on line 2 (let json = ...) Error: SyntaxError in block but the actual error is line 4 where I forgot the parenthesis around xs in J.Object xs pattern.

I'm using reason 3.5.2 from opam on Linux.

aryx avatar Feb 11 '20 10:02 aryx