Thread overview
[Issue 7618] New: delegate/function pointer call bypass parameter storage class
Mar 01, 2012
Kenji Hara
Mar 01, 2012
Kenji Hara
Mar 02, 2012
Walter Bright
March 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7618

           Summary: delegate/function pointer call bypass parameter
                    storage class
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: k.hara.pg@gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg@gmail.com> 2012-03-01 03:51:02 PST ---
Test case:
----
void foo(const int x)
{
    int func(ref int) { return 1; }
    func(x);
    // Error: function test.foo.func (ref int x) is not callable
    // using argument types (const(int))
    / --> OK

    int delegate(ref int) dg = (ref int x) => 1;
    dg(x);
    // --> compiles without error, bad!

    int function(ref int) fp = (ref int x) => 1;
    fp(x);
    // --> compiles without error, bad!
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7618


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-03-01 04:12:51 PST ---
https://github.com/D-Programming-Language/dmd/pull/776

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 02, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7618



--- Comment #2 from github-bugzilla@puremagic.com 2012-03-02 11:39:30 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/40b290c66756bce69369b188cad2cda1f3794777 fix Issue 7618 - delegate/function pointer call bypass parameter storage class

https://github.com/D-Programming-Language/dmd/commit/f2eff281cbb950cf85b47dda943afcbde22964d4 Merge pull request #776 from 9rnsr/fix7618

Issue 7618 - delegate/function pointer call bypass parameter storage class

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 02, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7618


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


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