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 symbol table patching for overriding default methods #3719

Merged
merged 2 commits into from
Feb 25, 2021

Conversation

Trundle
Copy link
Contributor

@Trundle Trundle commented Feb 24, 2021

ast_replace (potentially) copies the input AST, hence it's important
to do the symbol table patching on the output AST. Otherwise the
patching will happen on the wrong nodes, which leads to methods with
a wrong symbol table.

Fixes #3305

`ast_replace` (potentially) copies the input AST, hence it's important
to do the symbol table patching on the output AST. Otherwise the
patching will happen on the wrong nodes, which leads to methods with
a wrong symbol table.

Fixes ponylang#3305
@SeanTAllen SeanTAllen added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Feb 24, 2021
@ponylang-main
Copy link
Contributor

Hi @Trundle,

The changelog - fixed label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do.

Release notes are added by creating a uniquely named file in the .release-notes directory. We suggest you call the file 3719.md to match the number of this pull request.

The basic format of the release notes (using markdown) should be:

## Title

End user description of changes, why it's important,
problems it solves etc.

If a breaking change, make sure to include 1 or more
examples what code would look like prior to this change
and how to update it to work after this change.

Thanks.

@SeanTAllen SeanTAllen requested review from jemc and mfelsche February 24, 2021 23:37
@SeanTAllen
Copy link
Member

The test here is different than @EpicEric's minimal example from #3305, however, I verified that this change fixes #3305.

@SeanTAllen
Copy link
Member

This is an awesome first contribution @Trundle. Thanks.

Can you add release notes? If that is done before Friday, this can go out with the release that is happening on Friday.

@SeanTAllen SeanTAllen self-requested a review February 24, 2021 23:42
@Trundle
Copy link
Contributor Author

Trundle commented Feb 25, 2021

Whoops I should have probably mentioned this, yes. The other tests mostly use traits and not interfaces. As the bug happens with both, I tried to be consistent with the other tests.

I added some release notes, I hope that's how it works. I unfortunately forgot to add a "ci skip" though :/

@SeanTAllen
Copy link
Member

@Trundle no need to worry about skip ci

@SeanTAllen
Copy link
Member

@Trundle release notes look good. This will go out with tomorrow's release. Thanks!

@SeanTAllen SeanTAllen merged commit fdf35c3 into ponylang:main Feb 25, 2021
github-actions bot pushed a commit that referenced this pull request Feb 25, 2021
github-actions bot pushed a commit that referenced this pull request Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler crash with intersection types of equivalent interfaces
3 participants