digitalmars.D.bugs - [Issue 18718] New: ICE in dmd/traits.d:417
- d-bugmail puremagic.com (74/74) Apr 03 2018 https://issues.dlang.org/show_bug.cgi?id=18718
https://issues.dlang.org/show_bug.cgi?id=18718 Issue ID: 18718 Summary: ICE in dmd/traits.d:417 Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: ice, ice-on-invalid-code Severity: critical Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: greensunny12 gmail.com Reduced example (from https://forum.dlang.org/post/uulshsgxovbrrctvdbsz forum.dlang.org) --- struct World { mixin BuildStuff; } template BuildStuff() { static foreach(elem; __traits(allMembers, typeof(this))) { } } --- Stacktrace: --- 0x00005555558ba0eb in semanticTraits(TraitsExp*, Scope*) (e=0x0, sc=0x0) at dmd/traits.d:417 417 extern (C++) Expression semanticTraits(TraitsExp e, Scope* sc) dmd/traits.d:417 (this=0x7fffff7ff238, e=0x7ffff6971ad0) at dmd/expressionsem.d:3791 v=0x7fffff7ff238) at dmd/expression.d:4743 (e=0x7ffff6971ad0, sc=0x7ffff6857e40) at dmd/expressionsem.d:9367 _D3dmd4cond13StaticForeach7prepareMFPSQBk6dscope5ScopeZv (this=0x7ffff69719e0, sc=0x7ffff6857e40) at dmd/cond.d:385 (this=0x7ffff6971940, sc=0x7ffff6857d10) at dmd/attrib.d:1083 _D3dmd7dsymbol12ScopeDsymbol8_foreachFPSQBm6dscope5ScopePSQCe4root5array__T5ArrayTCQDdQDc7DsymbolZQxMDFmQwZiPmZi (pn=0x7fffff7ff3c8, dg=..., members=0x7ffff6971920, sc=0x7ffff6857d10) at dmd/dsymbol.d:1666 _D3dmd7dsymbol12ScopeDsymbol8_foreachFPSQBm6dscope5ScopePSQCe4root5array__T5ArrayTCQDdQDc7DsymbolZQxMDFmQwZiPmZi (pn=0x0, dg=..., members=0x7ffff7e9f500, sc=0x7ffff6857d10) at dmd/dsymbol.d:1668 sc=0x7ffff6857d10) at dmd/traits.d:1335 (this=0x7fffff7ffcc8, e=0x7ffff6971ad0) at dmd/expressionsem.d:3791 v=0x7fffff7ffcc8) at dmd/expression.d:4743 (e=0x7ffff6971ad0, sc=0x7ffff6857d10) at dmd/expressionsem.d:9367 _D3dmd4cond13StaticForeach7prepareMFPSQBk6dscope5ScopeZv (this=0x7ffff69719e0, sc=0x7ffff6857d10) at dmd/cond.d:385 (this=0x7ffff6971940, sc=0x7ffff6857be0) at dmd/attrib.d:1083 _D3dmd7dsymbol12ScopeDsymbol8_foreachFPSQBm6dscope5ScopePSQCe4root5array__T5ArrayTCQDdQDc7DsymbolZQxMDFmQwZiPmZi (pn=0x7fffff7ffe58, dg=..., members=0x7ffff6971920, sc=0x7ffff6857be0) at dmd/dsymbol.d:1666 _D3dmd7dsymbol12ScopeDsymbol8_foreachFPSQBm6dscope5ScopePSQCe4root5array__T5ArrayTCQDdQDc7DsymbolZQxMDFmQwZiPmZi (pn=0x0, dg=..., members=0x7ffff7e9f500, sc=0x7ffff6857be0) at dmd/dsymbol.d:1668 --- --
Apr 03 2018