www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22912] New: importC: syntax error for function call with cast

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

          Issue ID: 22912
           Summary: importC: syntax error for function call with cast and
                    typedef and parentheses around name
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

typedef long my_long;
int fn1() { return 0; }
void fn2() { long x = (my_long) (fn1) (); }

Error: function expected before `()`, not `cast(long)& fn1` of type `long`

--
Mar 22 2022