Bug 19796 – druntime PR#1982 broke array ops on double[] due to wrong assumption of integral element type

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-04-09T04:28:37Z
Last change time
2019-04-09T06:13:42Z
Keywords
pull
Assigned to
No Owner
Creator
hsteoh

Comments

Comment #0 by hsteoh — 2019-04-09T04:28:37Z
Code: ------- import std.stdio; void main() { double[] data = [ 0.5 ]; writefln("data=%s", data); double[] result; result.length = data.length; result[] = -data[]; import std.stdio;writefln("result=%s", result); } ------- Output: ------- data=[0.5] result=[0] ------- Expected output: ------- data=[0.5] result=[-0.5] ------- This regression was introduced by commit d7b99e91e2de6cb9476e4826d5404d431b39dafd.
Comment #1 by dlang-bot — 2019-04-09T05:26:07Z
@wilzbach created dlang/druntime pull request #2550 "Fix Issue 19796 - wrong assumption of integral element type" fixing this issue: - Fix Issue 19796 - wrong assumption of integral element type https://github.com/dlang/druntime/pull/2550
Comment #2 by dlang-bot — 2019-04-09T06:13:42Z
dlang/druntime pull request #2550 "Fix Issue 19796 - wrong assumption of integral element type" was merged into master: - 4a79c5f95c3656c3523955b56ba9189c10f8fdb3 by Sebastian Wilzbach: Fix Issue 19796 - wrong assumption of integral element type https://github.com/dlang/druntime/pull/2550