www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12221] New: Regression (2.065 git-head): hash.get() does not return proper type

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12221

           Summary: Regression (2.065 git-head): hash.get() does not
                    return proper type
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-02-21
14:55:38 PST ---
-----
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. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 21 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12221


Vladimir Panteleev <thecybershadow gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow gmail.com


--- Comment #1 from Vladimir Panteleev <thecybershadow gmail.com> 2014-02-22
06:44:05 EET ---
Introduced in https://github.com/D-Programming-Language/druntime/pull/720

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 21 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12221


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com


--- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2014-02-23
03:16:24 PST ---
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?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 23 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12221



--- Comment #3 from Walter Bright <bugzilla digitalmars.com> 2014-02-23
03:18:15 PST ---
(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. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 23 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12221



--- Comment #4 from Walter Bright <bugzilla digitalmars.com> 2014-02-23
03:39:03 PST ---
Reverting 720 and adding a test case:

https://github.com/D-Programming-Language/dmd/pull/3331

https://github.com/D-Programming-Language/druntime/pull/727

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 23 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12221


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE
            Summary|Regression (2.066           |[REG2.066a] hash.get() does
                   |git-head): hash.get() does  |not return proper type
                   |not return proper type      |


--- Comment #5 from Kenji Hara <k.hara.pg gmail.com> 2014-03-03 01:12:13 PST ---
The root cause is exactly same as issue 12220.

*** This issue has been marked as a duplicate of issue 12220 ***

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