Bug 10157 – Vector ops with different types

Status
REOPENED
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-05-23T15:34:00Z
Last change time
2024-12-13T18:07:01Z
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: dmd#18585 →

Comments

Comment #0 by bearophile_hugs — 2013-05-23T15:34:00Z
Is code like this meant to work? It's useful code: void main() { int[2] data = [10, 20]; double[2] result; result[] = data[] * 0.5; } DMD 2.063beta5 gives: test.d(4): Error: incompatible types for ((data[]) * (0.5)): 'int[]' and 'double'
Comment #1 by code — 2017-08-17T11:37:37Z
Comment #2 by dfj1esp02 — 2017-08-21T13:59:15Z
void f() { ubyte[] a; char[] b; a[]=b[]; } Error: cannot implicitly convert expression `b[]` of type `char[]` to `ubyte[]`
Comment #3 by dfj1esp02 — 2017-08-21T14:00:16Z
Hmm... vector ops are array ops?
Comment #4 by robert.schadek — 2024-12-13T18:07:01Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18585 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB