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

          Issue ID: 17496
           Summary: Ambiguous address taking of overloaded function is not
                    rejected.
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: e...@weka.io

struct S {
    int f() { return 4; }
    int f() { return 5; }
}

unittest {
    S s;
    static assert(!is(typeof(s.f())));
    static assert(!is(typeof({ int delegate() foo = &s.f; }))); // fails, it
ambiguously takes address
}

--

Reply via email to