-
-
Notifications
You must be signed in to change notification settings - Fork 609
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 15984 [REG2.071] Interface contracts retrieve garbage instead of parameters #9030
Conversation
|
Thanks for your pull request and interest in making D better, @thewilsonator! 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
|
| @@ -1363,6 +1363,32 @@ elem *toElem(Expression e, IRState *irs) | |||
| FuncDeclaration fd = te.var.toParent2().isFuncDeclaration(); | |||
| assert(fd); | |||
| ethis = getEthis(te.loc, irs, fd); | |||
|
|
|||
| /* Bugzilla 15984: If te is in interface contracts, ethis is a | |||
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.
Nit, I would quote any "word" that references a symbol in the code, to avoid any confusion with a regular word that is misspelled.
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.
Please use:
https://issues.dlang.org/show_bug.cgi?id=15984
instead of:
Bugzilla 15984
|
Please use more descriptive commit title (and as a consequence, PR title). |
|
Note that this does not actually fix 15984. still fails with the branch. |
|
I'm not expecting that to, given the CI is red ;), I'm not sure which |
| { | ||
| if (auto iface = parentfd.parent.isInterfaceDeclaration()) | ||
| { | ||
| Type thistype = irs.getFunc().vthis.type; |
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.
@FeepingCreature In particular I'm not certain about the provenance of irs.getFunc() (c.f. gIR->func() and fd (c.f.dfnval->func)
everything else I'm pretty sure is correct.
|
Don't you have to fix the |
|
Thanks I'll try that. |
|
So, it turns out that it is already handled in |
The LDC fix is essentially this (c.f. LDC's fix)
although I'm not too sure about
parentsand dealing withirs.cc @rainers @WalterBright @FeepingCreature