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



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



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



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




03:18:15 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?
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




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      |



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