[Issue 17819] New: static foreach segfaults on __traits(allMembers)

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Sep 9 20:50:12 UTC 2017


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

          Issue ID: 17819
           Summary: static foreach segfaults on __traits(allMembers)
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: jl at leroy.nyc

Given:

// staticforeach.d

import std.traits;

static foreach (m; __traits(allMembers, staticforeach)) {
  pragma(msg, m.stringof);
}

Try to compile:

$ dmd staticforeach.d 
Segmentation fault (core dumped)

$ dmd --version
DMD64 D Compiler v2.076.0-dirty
Copyright (c) 1999-2017 by Digital Mars written by Walter Bright

--


More information about the Digitalmars-d-bugs mailing list