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

Incorrect parsing in HB.structure Definition ... #494

Open
MathisBD opened this issue Dec 19, 2024 · 0 comments
Open

Incorrect parsing in HB.structure Definition ... #494

MathisBD opened this issue Dec 19, 2024 · 0 comments
Labels
bug Something isn't working easy difficulty Very easy high priority High priority

Comments

@MathisBD
Copy link

In HB.structure Definition ... one can use the &} syntax to bring in all implicit dependencies of the mixins of the structure. This however results in a parse error when there are at least two factories in the structure.

Here is a minimal example to reproduce this :

From HB Require Export structures.

HB.mixin Record mixin1 T := {}.
HB.structure Definition struct1 := { T of mixin1 T }.

HB.mixin Record mixin2 T of mixin1 T := {}.
HB.structure Definition struct2 := { T of mixin2 T &}.
(* Works as intended, no warning. *)

HB.mixin Record mixin3 T of mixin2 T & mixin1 T := {}.
HB.structure Definition struct3 := { T of mixin3 T & mixin2 T &}.
(* Parse error. *)
@MathisBD MathisBD changed the title Parse error in HB.structure Definition ... Incorrect parsing in HB.structure Definition ... Dec 19, 2024
@CohenCyril CohenCyril added high priority High priority easy difficulty Very easy bug Something isn't working labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easy difficulty Very easy high priority High priority
Projects
None yet
Development

No branches or pull requests

2 participants