[Issue 17720] New: Wrong code using vector extensions with different types
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Aug 4 16:41:42 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17720
Issue ID: 17720
Summary: Wrong code using vector extensions with different
types
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: ibuclaw at gdcproject.org
This is code is accepted by the compiler, but should be rejected, to be
consistent with static and dynamic array ops.
---
float4 v1;
int4 v2 = [1,2,3,4];
int4 v3 = [5,6,7,8];
v1 = v2 + v3;
// Prints: [8.40779e-45, 1.12104e-44, 1.4013e-44, 1.68156e-44]
writeln(v1.array);
---
--
More information about the Digitalmars-d-bugs
mailing list