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

4.03.0+beta2: Invariant check runs against code F(A) inside attributes #7208

Closed
vicuna opened this issue Apr 3, 2016 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@vicuna
Copy link

vicuna commented Apr 3, 2016

Original bug ID: 7208
Reporter: furuse
Assigned to: @alainfrisch
Status: closed (set by @alainfrisch on 2016-04-04T07:11:17Z)
Resolution: not a bug
Priority: normal
Severity: major
Target version: 4.03.0+dev / +beta1
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @hcarty

Bug description

With 4.03.0+beta2, I got

Error: broken invariant in parsetree: Functor application now allowed here.

with PPX output contains [@attr F(A)].

I know F(A) is not a valid OCaml expression, but it is parsable by parser.mly and is not rejected when it is not in the PPX output but in a source file.

I feel the invariant check for F(A) is too tight here.

@vicuna
Copy link
Author

vicuna commented Apr 3, 2016

Comment author: @alainfrisch

Actually F(A) is a valid expression, even a well-typed one assuming e.g.

type t = F of t | A

So I'm not sure that the problem is related to attributes at all.

@vicuna
Copy link
Author

vicuna commented Apr 4, 2016

Comment author: furuse

Ah! My PPX creates F(A) as a Path.t not as an expression, which cannot happen in parser.mly. I now understand what happened.

Please close this ticket.

@vicuna vicuna closed this as completed Apr 4, 2016
@vicuna vicuna added this to the 4.03.0 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 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

2 participants