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

fix: intersection types with wildcard "?" are allowed as simplename #3568

Merged
merged 4 commits into from
Sep 10, 2020

Conversation

MartinWitt
Copy link
Collaborator

@MartinWitt MartinWitt commented Sep 5, 2020

Sometimes intersectiontypes set simplename for a typereference to "?". We should allow this. Sadly we are cutting more and more corners in this check, because we have 1 check for all setSimplename methods. Now spoon would accept int a? =3;, which isn't problematic for analyzing code, but for transformations. More problematic is that we have at least 2 implementations for the identifier check, see here. But maybe we should continue step by step fixing the issue and after that find a solution for the problem described above.

@MartinWitt MartinWitt changed the title wip: add failing testcase for issue wip: fix: intersectiontypes with wildcard "?" as simplename Sep 9, 2020
@MartinWitt MartinWitt changed the title wip: fix: intersectiontypes with wildcard "?" as simplename review: fix: intersectiontypes with wildcard "?" as simplename Sep 9, 2020
@monperrus monperrus changed the title review: fix: intersectiontypes with wildcard "?" as simplename fix: intersection types with wildcard "?" are allowed as simplename Sep 10, 2020
@monperrus monperrus merged commit 856f816 into INRIA:master Sep 10, 2020
@monperrus
Copy link
Collaborator

Thanks a lot @MartinWitt!

@monperrus
Copy link
Collaborator

More problematic is that we have at least 2 implementations for the identifier

A refactoring PR to unify this is more than welcome :-)

@monperrus monperrus mentioned this pull request Oct 14, 2020
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

Successfully merging this pull request may close these issues.

2 participants