https://issues.dlang.org/show_bug.cgi?id=21752 --- Comment #2 from moonlightsentinel at disroot.org --- Also happens for deeply nested templates without overload resolution: template bar() { template bar() { void bar()() if (true) // Comment this constraint to make it pass {} } } --