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

beam_validator: Use set_aliased_type in more operations #1960

Merged
merged 1 commit into from Sep 26, 2018

Conversation

Projects
None yet
1 participant
@jhogberg
Contributor

jhogberg commented Sep 25, 2018

hd/1 and friends only tracked types for their direct inputs, failing validation for legal code that used an aliased register.

https://bugs.erlang.org/browse/ERL-735

beam_validator: Use set_aliased_type in more operations
The following code broke because aliases weren't tracked for hd/1:

bug(Bool) ->
    Bug = remote:call(),
    if
        Bool -> %% Branch of some kind.
            _ = hd(Bug),
            remote:call(),
            hd(Bug)
    end.

Related to 1f221b2

@jhogberg jhogberg merged commit 08ef38b into erlang:master Sep 26, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment