Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Syntax error messages involving unclosed parens are sometimes incorrect #5770
Original bug ID: 5770
Parsing invalid patterns inside well-balanced parentheses produces an error message saying that parens don't match.
I provide a patch that fixes the problem by adding a few more error rules in the parser and relevant error messages.
Steps to reproduce
$ echo 'match x with (1 as ) -> 0;;' > /tmp/a.ml
After applying the patch, the new error message is
File "/tmp/a.ml", line 1, characters 19-20: