erlang / otp

Erlang/OTP
http://erlang.org
Apache License 2.0
11.15k stars 2.92k forks source link

Refactor type annotation handling for clarity #8586

Closed bjorng closed 1 week ago

bjorng commented 2 weeks ago

In #8564, Frej Drejhammar noticed that the following comment was misleading:

%% One or more arguments have been simplified to literal values.

It turns out that the entire clause in which the comment is located is not needed. Removing the arg_types annotation is unnecessary, since it will be added back in the next iteration of the beam_ssa_type pass.

This commit removes the unnecessary clause, as well as strengthening and explaining the invariants maintained by opt_anno_types/2.

github-actions[bot] commented 2 weeks ago

CT Test Results

    2 files    324 suites   9m 56s :stopwatch:   816 tests   814 :white_check_mark: 2 :zzz: 0 :x: 5 419 runs  5 417 :white_check_mark: 2 :zzz: 0 :x:

Results for commit bb29ba3b.

:recycle: This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot