www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22317] New: ImportC function redeclarations should be allowed

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

          Issue ID: 22317
           Summary: ImportC function redeclarations should be allowed in
                    function scope
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

This should compile:

  void test()
  {
    extern int f();
    int f();

    extern int x;
    extern int x;
  }

ImportC gives two errors. Marked as minor because such code should be pretty
rare.

--
Sep 18