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

@:using typedef cascading signatures loop #10107

Closed
PXshadow opened this issue Feb 7, 2021 · 2 comments
Closed

@:using typedef cascading signatures loop #10107

PXshadow opened this issue Feb 7, 2021 · 2 comments
Assignees
Milestone

Comments

@PXshadow
Copy link
Contributor

PXshadow commented Feb 7, 2021

The ability for typedefs to use @:using is extremly helpful for what I'm working on, I have run into a little restriction though. Similar to #2563

@:using(Main)
typedef B = {
    >A,
};
typedef A = { };

error: Loop found in cascading signatures definitions. Please change order/import

The work around:

@:using(Main)
typedef B = _B;
typedef _B = {
    >A,
};
typedef A = { };

If it's to much hassle to remove the restriction, don't worry about it, cheers!

@RealyUniqueName RealyUniqueName added this to the Bugs milestone Feb 12, 2021
@Simn
Copy link
Member

Simn commented Feb 18, 2021

That looks like a very unfortunate interaction that should be fixed. It suggests that @:using causes some typing which it shouldn't cause. This could lead to all sorts of weird errors, so something has to be delayed here.

@Simn
Copy link
Member

Simn commented Feb 18, 2021

Interestingly, there's a comment in typeload.ml that says (* delay the using since we need to resolve typedefs *). However, it doesn't seem to actually delay anything...

@Simn Simn modified the milestones: Bugs, Release 4.3 Mar 24, 2023
@Simn Simn self-assigned this Mar 24, 2023
@Simn Simn closed this as completed in ea3203d Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants