[Issue 19717] New: ICE/segfault when using __traits(getMember) on overloaded function with "undefined identifier" error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 3 23:50:27 UTC 2019


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

          Issue ID: 19717
           Summary: ICE/segfault when using __traits(getMember) on
                    overloaded function with "undefined identifier" error
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: elpenguino+D at gmail.com

Reduced code:
```
enum bar = __traits(getMember, mixin(__MODULE__), "foo");

auto foo() {
        return foo();
}

void foo(Foo) {}
```
This also prints a misleading error: `Error: cannot overload both property and
non-property functions`

The error appears to have been introduced after DMD 2.070.2.

--


More information about the Digitalmars-d-bugs mailing list