https://issues.dlang.org/show_bug.cgi?id=17836
--- Comment #4 from Iain Buclaw <ibuc...@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. --