www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14145] New: opDispatch should be considered over UFCS

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

          Issue ID: 14145
           Summary: opDispatch should be considered over UFCS
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Mac OS X
            Status: NEW
          Severity: critical
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: timothee.cour2 gmail.com

dmd -c -o- main.d
main.d(7): Error: function main.foo () is not callable using argument types (A)
----
  void foo(){}

  struct A{
    auto opDispatch(string op)() {
      writeln;
    }
  }

  void test(){
    A.init.foo();
  }

--
Feb 07 2015