[Issue 17836] ICE with custom 'map' template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 19 20:30:48 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17836

--- Comment #4 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Note to anyone looking.

For function call to mmap(...).


Given that:

FuncDeclaration fd = void mmap(T...);

fd.toParent2() == main();
fd.parent.isTemplateInstance() == template mmap(T...);
fd.parent.isTemplateInstance().tinst == template printstuffs(T...);
fd.parent.isTemplateInstance().tinst.toAlias() == void printstuffs(T...);

This is how you track the 'this' pointer for mmap to the frame of printstuffs.

Fix for gdc will happen soon.  Someone will have to look at dmd.

--


More information about the Digitalmars-d-bugs mailing list