www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23469] New: ICE when using private import


          Issue ID: 23469
           Summary: ICE when using private import
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: schveiguy gmail.com

Not sure how else to describe this bug. Reduced from a much larger test case:

struct S {
    private import std.traits : FieldNameTuple;    
    float x = 0;
void main()
    S x;
    foreach(v; x.FieldNameTuple!S) {}

Change `x.FieldNameTuple!S` to `S.FieldNameTuple!S` and it works.

Nov 06 2022