Bug 6796 – Several __error with wrong enum definition

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-10-08T19:12:00Z
Last change time
2013-11-18T17:18:43Z
Keywords
diagnostic
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2011-10-08T19:12:37Z
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 by lovelydear — 2012-05-01T14:46:17Z
What is the problem ?
Comment #2 by bearophile_hugs — 2012-05-01T15:19:09Z
(In reply to comment #1) > What is the problem ? I think the compiler should not show "__error".
Comment #3 by lovelydear — 2012-05-01T15:35:25Z
Ah, ok. BTW, check your mail, I believe there is a few reports that I checked and can be closed.
Comment #4 by k.hara.pg — 2013-11-18T04:42:14Z
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 by github-bugzilla — 2013-11-18T08:42:05Z