https://issues.dlang.org/show_bug.cgi?id=14161
Issue ID: 14161 Summary: UFCS call does not abide by scope Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: alphaglosi...@gmail.com If global function declared as same name to a local function pointer, UFCS will call the global function. Discovered: http://forum.dlang.org/post/qgtyvxurlgbrctjvn...@forum.dlang.org > import std.stdio; > > void f(int a) { > writeln("it's a function! : ", a); > } > > void main() { > auto f = function (int a) {writeln("It's a variable! : ", a);}; > 5.f(); > f(5); > } > > Output: > > it's a function! : 5 > It's a variable! : 5 --