www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12220] New: Regression (2.065 git-head): hash.get() does not accept proper parameters

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

           Summary: Regression (2.065 git-head): hash.get() does not
                    accept proper parameters
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          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:54:27 PST ---
-----
void main()
{
    short[short] hash;
    auto k = hash.get(1, 1);
}
-----

$ dmd test.d
 Error: template object.get cannot deduce function from argument types
!()(short[short], int, int)

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=12220


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |regression


-- 
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=12220


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:41:22 EET ---
Introduced in the same pulls as with 12167.

-- 
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=12220


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |12290
            Summary|Regression (2.065           |[REG2.066a] hash.get() does
                   |git-head): hash.get() does  |not accept proper
                   |not accept proper           |parameters
                   |parameters                  |


--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2014-03-03 01:11:41 PST ---
This is git-head only issue (does not exist in 2.065 release).

The UFCS 'get' function in object module should have following signature:

inout(V) get(K, V)(inout(V[K]) aa, K key, lazy V defaultValue)
{
    auto p = key in aa;
    return p ? *p : defaultValue;
}

But current IFTI does not consider the narrowing conversion from (1) to short
during type parameters deduction.

I think that enhancement 12290 is the best way to fix issue.

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



--- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2014-03-03 01:12:13 PST ---
*** Issue 12221 has been marked as a duplicate of this issue. ***

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid
          Component|DMD                         |druntime


--- Comment #4 from Kenji Hara <k.hara.pg gmail.com> 2014-03-03 01:19:54 PST ---
https://github.com/D-Programming-Language/druntime/pull/733

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



--- Comment #5 from github-bugzilla puremagic.com 2014-03-03 22:01:33 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/16198ea6abc750d4e3119195bde3c317156d4288
fix Issue 12220 - hash.get() does not accept proper parameters

https://github.com/D-Programming-Language/druntime/commit/7c8722f331ac61dd4fa82ea7c76c6ade7b2d51c5
Merge pull request #733 from 9rnsr/fix12220

[REG2.066a] Issue 12220 - hash.get() does not accept proper parameters

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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



--- Comment #6 from github-bugzilla puremagic.com 2014-03-04 21:29:13 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/537d821b409d7b379dae982212f37e6a38c6e883
fix Issue 12220 - hash.get() does not accept proper parameters

https://github.com/D-Programming-Language/dmd/commit/93542b840b1609797a9ad4b155110e99c5f83b08
Merge pull request #3358 from 9rnsr/fix12220

Issue 12220 - hash.get() does not accept proper parameters

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