You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 1645 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
According to the documented grammar, "exception true = false" is a
syntactically valid exception definition because "true" and "false"
are cconstr-name's. However, the implementation doesn't accept it:
I think this should be fixed by making a distinction in the grammar
between user-defined cconstr-name's (which start with uppercase
letters) and predefined cconstr-name's (which are a fixed list: true,
false, [], ()), and only allowing user-defined cconstr-name's in
exception definitions.
This is similar to bug 1628 in that syntactically unique names are
allowed to appear in places that it only makes sense for uppercase
identifiers to appear.
--
Tim Freeman tim@fungible.com
Which is worse: ignorance or apathy? Who knows? Who cares?
GPG public key fingerprint ECDF 46F8 3B80 BB9E 575D 7180 76DF FE00 34B1 5C78
The text was updated successfully, but these errors were encountered:
Original bug ID: 1645
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
According to the documented grammar, "exception true = false" is a
syntactically valid exception definition because "true" and "false"
are cconstr-name's. However, the implementation doesn't accept it:
exception true = false;;
Characters 10-14:
exception true = false;;
^^^^
Syntax error
I think this should be fixed by making a distinction in the grammar
between user-defined cconstr-name's (which start with uppercase
letters) and predefined cconstr-name's (which are a fixed list: true,
false, [], ()), and only allowing user-defined cconstr-name's in
exception definitions.
This is similar to bug 1628 in that syntactically unique names are
allowed to appear in places that it only makes sense for uppercase
identifiers to appear.
--
Tim Freeman tim@fungible.com
Which is worse: ignorance or apathy? Who knows? Who cares?
GPG public key fingerprint ECDF 46F8 3B80 BB9E 575D 7180 76DF FE00 34B1 5C78
The text was updated successfully, but these errors were encountered: