D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7382 - Static matrix initialization
Summary: Static matrix initialization
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 15:41 UTC by bearophile_hugs
Modified: 2021-01-24 06:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2012-01-27 15:41:14 UTC
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 mhh 2021-01-24 06:56:51 UTC
DIPs 'n that