Bug 7382 – Static matrix initialization

Status
RESOLVED
Resolution
INVALID
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-27T15:41:14Z
Last change time
2021-01-24T06:56:51Z
Assigned to
No Owner
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-01-27T15:41:14Z
I'd like D to allow to initialize the fixed-sized B matrix just as A: double[3] A = 0.0; // OK double[3][3] B = 0.0; // Error void main() { double[3][3] C = 0.0; // OK } Currently DMD 2.058head gives: test.d(2): Error: cannot implicitly convert expression (0) of type double to double[3u][3u]
Comment #1 by maxhaton — 2021-01-24T06:56:51Z
DIPs 'n that