Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006061OCamlOCaml generalpublic2013-07-02 16:282014-01-17 15:40
Reportergasche 
Assigned To 
PrioritynormalSeverityminorReproducibilityN/A
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version4.01.0+dev 
Target VersionlaterFixed in Version 
Summary0006061: Confusing error message when parentheses enclose an invalid expression
DescriptionWhen a correctly-parenthesized expression is syntactically incorrect (inside the parens), the error message sometimes only mention the parentheses, which can be very confusing.

The original report comes from user BlankVerse which spelled "fn" instead of "fun", and got the following error:

  List.map (fn x -> x) [1;2;3];;
           ^
Syntax error: ')' expected, the highlighted '(' might be unmatched

Some other wrong-expressions trigger the same behavior, such as "x let x", but some other do not, such as the following better message (pointing at the last parens):

 List.map (let x) [1;2;3];;
                 ^
Error: Syntax error
TagsNo tags attached.
Attached Files

- Relationships
child of 0005068acknowledged ocamlc/camlp4 should give better error messages for syntax errors 

-  Notes
(0010805)
doligez (administrator)
2014-01-17 15:40

So, it used to be that the only syntax error message of the compiler was the plain "Syntax error". Users were unhappy about that and demanded more details...

- Issue History
Date Modified Username Field Change
2013-07-02 16:28 gasche New Issue
2013-07-02 16:28 gasche Relationship added child of 0005068
2013-07-02 16:29 gasche Status new => acknowledged
2013-07-12 17:12 doligez Product Version later => 4.01.0+dev
2013-07-12 17:12 doligez Target Version => later
2014-01-17 15:40 doligez Note Added: 0010805


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker