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

Avoid generating given definitions that loop #19282

Merged
merged 6 commits into from
Dec 23, 2023

Commits on Dec 18, 2023

  1. Configuration menu
    Copy the full SHA
    bc36acb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fab7147 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ed9f427 View commit details
    Browse the repository at this point in the history
  4. Restrict the new rules to givens that don't define a new class

    `given ... with` or `given ... = new { ... }` kinds of definitions now follow
    the old rules. This allows recursive `given...with` definitions as they are
    found in protoQuill.
    
    We still have the old check in a later phase against directly recursive methods.
    Of the three loops in the original i15474 we now detect #2 and #3 with new new
    restrictions. #1 slips through since it is a loop involving a `given...with` instance
    of `Conversion`, but is caught later with the recursive method check.
    
    Previously tests #1 and #3 were detected with the recursive methods check and #2 slipped
    through altogether.
    
    The new rules are enough for defining simple givens with `=` without fear of looping.
    odersky committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    f56aa22 View commit details
    Browse the repository at this point in the history
  5. Add tweaks and docs

    odersky committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    07c821a View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2023

  1. Configuration menu
    Copy the full SHA
    87e45fa View commit details
    Browse the repository at this point in the history