D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6796 - Several __error with wrong enum definition
Summary: Several __error with wrong enum definition
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2011-10-08 19:12 UTC by bearophile_hugs
Modified: 2013-11-18 17:18 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 2011-10-08 19:12:37 UTC
Wrong code:


void main() {
    enum int[][] array = [0, 1];
    array[0] *= 10;
}


DMD 2.056head shows several "__error":

test.d(2): Error: cannot implicitly convert expression (0) of type int to int[]
test.d(2): Error: cannot implicitly convert expression (1) of type int to int[]
test.d(3): Error: '[(__error),(__error)][cast(uint)0]' is not a scalar, it is a int[]
test.d(3): Error: incompatible types for (([(__error),(__error)][cast(uint)0]) *= (10)): 'int[]' and 'int'
Comment 1 SomeDude 2012-05-01 14:46:17 UTC
What is the problem ?
Comment 2 bearophile_hugs 2012-05-01 15:19:09 UTC
(In reply to comment #1)
> What is the problem ?

I think the compiler should not show "__error".
Comment 3 SomeDude 2012-05-01 15:35:25 UTC
Ah, ok. BTW, check your mail, I believe there is a few reports that I checked and can be closed.
Comment 4 Kenji Hara 2013-11-18 04:42:14 UTC
With 2.064:

test.d(2): Error: cannot implicitly convert expression (0) of type int to int[]
test.d(2): Error: cannot implicitly convert expression (1) of type int to int[]
Comment 5 github-bugzilla 2013-11-18 08:42:05 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d8d124f38e533c3e1415e1cdf147cc64dda8b305
fix Issue 6796 - Several __error with wrong enum definition