https://issues.dlang.org/show_bug.cgi?id=22497
--- Comment #3 from kinke <ki...@gmx.net> --- (In reply to Andrei Alexandrescu from comment #2) > Not sure I understand but hopefully it's something that can be fixed, right? Nevermind, that's what the compiler does for a freestanding function template. In your example with parent template instance, the current behavior seems to match that of a simple struct parent: ``` int foo(alias f)(int x) { return f(x); } struct S { static int staticFoo(alias f)(int x) { return f(x); } int foo(alias f)(int x) { return f(x); } } void main() { int x = 42; int nested(int y) { return y + x; } foo!nested(1); // should work analogously (without dual context) but doesn't: //S.staticFoo!nested(1); // correctly requires dual-context: S().foo!nested(1); } ``` So some logic seems to be definitely off here (and surely fixable). --