-
Couldn't load subscription status.
- Fork 1.1k
Avoid generating given definitions that loop #19282
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
Conversation
e1cc2bb to
df79601
Compare
|
I appreciate the attention to quality-of-life issues when you might prefer to pursue an interesting area of research today. Hopefully these efforts do not go unnoticed at large. |
473b9af to
9c8108d
Compare
`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.
dde86c5 to
07c821a
Compare
f567c7e to
87e45fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, and well received!
Fixes a long-standing footgun of implicit resolution: givens that loop back to themselves.