Bug 17720 – Wrong code using vector extensions with different types
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-08-04T23:41:42Z
Last change time
2020-07-31T09:54:18Z
Keywords
pull
Assigned to
Iain Buclaw
Creator
Iain Buclaw
Comments
Comment #0 by ibuclaw — 2017-08-04T23:41:42Z
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);
---
@ibuclaw updated dlang/dmd pull request #7065 "fix Issue 17720 - Wrong code using vector extensions with different types" fixing this issue:
- fix Issue 17720 - Wrong code using vector extensions with different types
https://github.com/dlang/dmd/pull/7065
Comment #3 by dlang-bot — 2020-07-31T09:54:18Z
dlang/dmd pull request #7065 "fix Issue 17720 - Wrong code using vector extensions with different types" was merged into master:
- 0aeef222a3ce271f3e6637df3ab17a983bd45689 by Iain Buclaw:
fix Issue 17720 - Wrong code using vector extensions with different types
https://github.com/dlang/dmd/pull/7065