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

More nitpicking: [assert e] is an expression, and [assert] is not. #8085

Closed
vicuna opened this issue Apr 1, 2003 · 2 comments
Closed

More nitpicking: [assert e] is an expression, and [assert] is not. #8085

vicuna opened this issue Apr 1, 2003 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Apr 1, 2003

Original bug ID: 1619
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

The grammar in the document doesn't make a special case for [assert].
This would make sense if we pretend that [assert] is a function and
don't worry too much about the compiler stripping out assert
statements when it's told to. However, if assert is a function then
[assert] by itself has to be a valid expression, and it isn't:

assert;;

Characters 6-8:
assert;;
^^
Syntax error

Thus I think you want another case for expr:

expr ::= ...
| assert expr

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 Apr 6, 2003

Comment author: administrator

The grammar in the document doesn't make a special case for [assert].

Fixed in the working version. Thanks for the bug report.

-- Damien

@vicuna
Copy link
Author

vicuna commented Apr 6, 2003

Comment author: administrator

Fixed by DD 2003-04-06
(fixed for both lazy and assert)

@vicuna vicuna closed this as completed Apr 6, 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