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 code generation failure with tuples in recover blocks #2642

Merged
merged 1 commit into from
Apr 11, 2018

Conversation

Praetonus
Copy link
Member

This fixes a bug where code generation would fail when trying to convert a tuple from a recover block to an abstract type. This was occurring because the gen_assign_cast function was expecting the tuple to have the LLVM type corresponding to the Pony type outside of the recover block, but it was encountering the type from inside of the recover block. This was failing because we use different LLVM types for tuples with differing capabilities.

Objects from recover blocks are now casted to the correct expected type before being handled to their user.

Closes #2639.

This fixes a bug where code generation would fail when trying to
convert a tuple from a recover block to an abstract type. This was
occurring because the `gen_assign_cast` function was expecting the
tuple to have the LLVM type corresponding to the Pony type outside of
the recover block, but it was encountering the type from inside of the
recover block. This was failing because we use different LLVM types for
tuples with differing capabilities.

Objects from recover blocks are now casted to the correct expected type
before being handled to their user.

Closes ponylang#2639.
@Praetonus Praetonus added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Apr 10, 2018
@Praetonus Praetonus merged commit c398c4b into ponylang:master Apr 11, 2018
@Praetonus Praetonus deleted the fix-codegen-tuple-recover branch April 11, 2018 20:37
ponylang-main added a commit that referenced this pull request Apr 11, 2018
dipinhora pushed a commit to dipinhora/ponyc that referenced this pull request Jun 5, 2018
)

This fixes a bug where code generation would fail when trying to
convert a tuple from a recover block to an abstract type. This was
occurring because the `gen_assign_cast` function was expecting the
tuple to have the LLVM type corresponding to the Pony type outside of
the recover block, but it was encountering the type from inside of the
recover block. This was failing because we use different LLVM types for
tuples with differing capabilities.

Objects from recover blocks are now casted to the correct expected type
before being handled to their user.

Closes ponylang#2639.
dipinhora pushed a commit to dipinhora/ponyc that referenced this pull request Jun 5, 2018
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.

Codegen failure with tuples in recover blocks
2 participants