-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
Fix issue 20488: opDispatch: copy call expression before checking for semantically valid parameters #10718
Fix issue 20488: opDispatch: copy call expression before checking for semantically valid parameters #10718
Conversation
|
Thanks for your pull request and interest in making D better, @FeepingCreature! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "stable + dmd#10718" |
|
Please target stable. |
0edb425 to
395ba1b
Compare
|
Rebased to stable. |
|
Okay, this failure is bizarre. It's indirectly caused by simply calling |
395ba1b to
3786983
Compare
|
Worked around (?) by avoiding copying |
|
@thewilsonator : I think this needs a proper review before applying the auto-merge again. |
|
Yeah, also I still need to look into whether |
3786983 to
c811890
Compare
|
Okay, I've changed the PR to the smallest set that I think can conceivably work. It's a bit memory wasteful now (a somewhat unneeded (?) syntax copy); not sure how to manage that. |
|
Bleh. This is annoying. Any way I slice it, I trip over some unexpected consequence or bug. Basically, the problem is with syntax like |
c811890 to
2561105
Compare
|
Well, let's try it like this: Instead of trying the parameters out upfront, why not just run the check only if we've already seen some indication of a failure (within the gagged This shouldn't do anything differently than before; just in a more trustworthy order. The problem is side effects from edit: Oh and make another god damn copy of the original arguments in this case, so you get a proper error message instead of double-eating |
… of a semantic failure. This avoids double evaluation of parameter semantic in some situations. Fixes issue 20488.
2561105 to
78e214e
Compare
|
ping @Geod24 @thewilsonator it seems to work now?? |
|
ping |
This may avoid accidentally resolving future occurrences to the wrong type, not sure.
Fixes issue 20488.
This relates to my PR from August 18 regarding invalid opDispatch parameters being a first-line syntax error rather than a (silent) opDispatch failure: #8584 .
Somehow the
opDispatchcall ends up using the_aaLenfrom thebool[int]case? I don't fully understand what happens here, but we need to clone theCallExpanyway, so just doing it before the semantic check on the arguments is probably the way to go.