www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17819] New: static foreach segfaults on __traits(allMembers)

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 puremagic.com
          Reporter: jl 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

--
Sep 09