[Issue 19661] New: DMD 2.084.0 SIGSEGV in std.traits.isFunction

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 8 10:24:13 UTC 2019


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

          Issue ID: 19661
           Summary: DMD 2.084.0 SIGSEGV in std.traits.isFunction
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: flyboynw at gmail.com

This code produces a SIGSEGV in DMD 2.084.0 when attempting to find all
functions in the same module as the code itself is in.

module test;

public immutable bool testModule = testFunctionMembers!"test";

public void testFunctionMembers(string module_)() {
    import std.traits : isFunction;
    mixin(`import dmodule = ` ~ module_ ~ `;`);
    foreach(member; __traits(allMembers, dmodule)) {
        const bool isfunc = isFunction!(__traits(getMember, dmodule, member));
    }
}

--


More information about the Digitalmars-d-bugs mailing list