[Issue 22286] New: importC: (identifier)(other_identifier) incorrectly parsed as a cast-expression

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 7 17:25:55 UTC 2021


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

          Issue ID: 22286
           Summary: importC: (identifier)(other_identifier) incorrectly
                    parsed as a cast-expression
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dave287091 at gmail.com

The problem is demonstrated by the following small program:

// example.c
int foo(int b){
    return b;
}

int main(){
    int b = 3;
    int x = (foo)(b); // Error: function `examp.foo` is used as a type
    return 0;
}

--


More information about the Digitalmars-d-bugs mailing list