www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22102] New: importC: Error: function is used as a type

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

          Issue ID: 22102
           Summary: importC: Error: function is used as a type
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

Reduced test:
---
void test(int *p)
{
}

int main()
{
  int array[5];
  test(array);
  return 0;
}
---

The issue is that the parser can't disambiguate between `type(var)` the
declaration and `fncall(var)` the expression.

--
Jul 05