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

ast: When checking actual type par against constraints, do not walk through inh chain of choice Fix #3362 #3386

Merged
merged 4 commits into from
Jul 15, 2024

Commits on Jul 15, 2024

  1. ast: When checking actual type par against constraints, do not walk t…

    …hrough inh chain of choice Fix #3362
    
    Since choice types cannot be called, the result of a call to `choice X Y Z` is
    `void`, which lead to choice types that inherit from choice to be accepted to
    match any constraint. This patch fixes this by not walking through the parents
    if the actual type parameter is a choice.
    
    This also adds a regression test with the original code from #3362 and a minimalistic example.
    fridis committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    e36b98e View commit details
    Browse the repository at this point in the history
  2. tests: typo fixes

    fridis committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    3e0e62c View commit details
    Browse the repository at this point in the history
  3. ast: Walk through inheritance chain

    Otherwise `option T`, which is a choice, would not be assignable to `Sequence
    T`-
    fridis committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    2bf3c32 View commit details
    Browse the repository at this point in the history
  4. ast: Walk through inheritance chain

    Otherwise `option T`, which is a choice, would not be assignable to `Sequence
    T`-
    fridis committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    1e12df5 View commit details
    Browse the repository at this point in the history