Bug 12221 – [REG2.066a] hash.get() does not return proper type
Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-21T14:55:00Z
Last change time
2014-03-03T01:12:13Z
Assigned to
nobody
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2014-02-21T14:55:38Z
-----
enum Key : short
{
a
}
void main()
{
short[short] hash;
auto a = hash.get(Key.a, Key.a);
short x = a;
}
-----
$ dmd test.d
> Error: cannot implicitly convert expression (a) of type int to short
Not sure if dupe of some of the reports in
https://d.puremagic.com/issues/show_bug.cgi?id=12167, but each issue should be
filed separately.
Comment #1 by dlang-bugzilla — 2014-02-21T20:44:05Z
When I try this example on 2.064:
Assertion failure: 'impl' on line 4708 in file 'mtype.c'
When did it ever work? Is it really a regression?
Comment #3 by bugzilla — 2014-02-23T03:18:15Z
(In reply to comment #2)
> When I try this example on 2.064:
>
> Assertion failure: 'impl' on line 4708 in file 'mtype.c'
>
> When did it ever work? Is it really a regression?
Eh, ignore that comment. My mistake.