[Issue 17733] New: idup fails for structs/classes with member functions
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Tue Aug  8 09:23:40 PDT 2017
    
    
  
https://issues.dlang.org/show_bug.cgi?id=17733
          Issue ID: 17733
           Summary: idup fails for structs/classes with member functions
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: fediushin.anton at yandex.ru
Test case:
void main() {
    struct S {
        void f() {}
    }
    [S()].idup;
}
Also, compilation fails only if struct is defined in same scope idup is called,
so this code works just fine:
struct S {
    void f() {}
}
void main() {
    [S()].idup;
}
I've tested it with latest dmd, gdc and ldc
--
    
    
More information about the Digitalmars-d-bugs
mailing list