[Issue 6425] Cannot foreach over AA with char as key type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 27 07:26:16 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=6425


SomeDude <lovelydear at mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear at mailmetrash.com


--- Comment #2 from SomeDude <lovelydear at mailmetrash.com> 2012-04-27 07:27:19 PDT ---
On 2.059, this gives:
PS E:\DigitalMars\dmd2\samples> rdmd  bug.d
bug.d(3): Error: non-constant expression ['f':"foo",'b':"bar"]

unless one defines:
enum string[char] aa = ['f': "foo",'b': "bar"];

(See issue 5279)
But with the above declaration, both description and comment 1 test cases run
fine.

Test case of description
PS E:\DigitalMars\dmd2\samples> rdmd  bug.d
[b]: [bar]
[f]: [foo]

So I suggest we close this issue while keeping issue 5279 open.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list