www.digitalmars.com         C & C++   DMDScript  

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

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

          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:

```d
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