www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7618] New: delegate/function pointer call bypass parameter storage class

reply d-bugmail puremagic.com writes:
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



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: -------
Mar 01 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7618


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

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



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: -------
Mar 01 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7618




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


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: -------
Mar 02 2012
prev sibling parent d-bugmail puremagic.com writes:
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: -------
Mar 02 2012