Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception true = false is documented to be an exception definition #8111

Closed
vicuna opened this issue Apr 16, 2003 · 1 comment
Closed

exception true = false is documented to be an exception definition #8111

vicuna opened this issue Apr 16, 2003 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Apr 16, 2003

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

@vicuna
Copy link
Author

vicuna commented Aug 20, 2003

Comment author: administrator

Fixed in ref man 2003-08-20 by XL

@vicuna vicuna closed this as completed Aug 20, 2003
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant