www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23221] New: codegen: Casting from static array to vector

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

          Issue ID: 23221
           Summary: codegen: Casting from static array to vector should
                    result in an element-wise conversion
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

Separate from CTFE, as the fix can be done independently - possibly also fixing
issue 23218 too.
i.e:
---
int[4] arr = [1,2,3,4];
float4 vec = cast(float4)arr;
assert(vec.array == [1,2,3,4]);

--
Jun 29 2022