[RFC] Fix issue 12285, issue 12286, issue 12230#3345
[RFC] Fix issue 12285, issue 12286, issue 12230#3345CyberShadow wants to merge 3 commits intodlang:masterfrom
Conversation
|
@9rnsr Please have a look at this. 12230 is basically the same thing you did for 11946 but for methods. It will break some code, but it will be dampened by 12285 and 12286 which recognize some new valid cases, and for the remaining cases the same workaround you suggested in comment #1 on 11946 will work here too (see the adjustment to the test case for 9130 for an example). Also this appears to depend on your pull #2824 which I don't know why isn't merged yet. BTW, I like your "static alias" proposal on http://wiki.dlang.org/Brush_Up_Language_Features#Nested_Symbols. I think that it will solve the remaining cases that this change will affect. |
There was a problem hiding this comment.
I think you're missing some parentheses here:
(!f || (f->isNested() || f->isThis())) &&
Or you may end up dereferencing NULL.
There was a problem hiding this comment.
Oops, nevermind, forgot about short-circuit.
|
This LGTM. @9rnsr what do you think? |
|
This pull request is a good deal less useful without alias parameters to fields binding context to templates, which has now been reverted. So I'm going to close this for now. |
Fix issue 21309 along with other dead links on dlang.org merged-on-behalf-of: Mathias LANG <pro.mathias.lang@gmail.com>
https://d.puremagic.com/issues/show_bug.cgi?id=12285
https://d.puremagic.com/issues/show_bug.cgi?id=12286
https://d.puremagic.com/issues/show_bug.cgi?id=12230
DEPENDS ON #2824This fixes some inconsistencies with template alias parameters (12230) while avoiding breaking code (12285, 12286).
This pull request is experimental and a work-in-progress, please don't merge yet.