www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2472] New: Delegates are not lvalue.

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

           Summary: Delegates are not lvalue.
           Product: D
           Version: 1.036
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: e.insafutdinov gmail.com


class A
{
        void foo()
        {
        }
}

int main()
{
        auto a = new A;
        auto x = (&a.foo).funcptr;
}

dmd output:
Error: &a.foo is not an lvalue


-- 
Nov 25 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2472





------- Comment #1 from e.insafutdinov gmail.com  2008-11-25 16:15 -------
while this works well:
auto dlg = &a.foo;
auto f_ptr = dlg.funcptr;


-- 
Nov 25 2008
prev sibling next sibling parent Brad Roberts <braddr bellevue.puremagic.com> writes:
 dmd output:
 Error: &a.foo is not an lvalue
Second bug on the same snippit of code, this error message lacks source file and line number info. I didn't try the code to see if it's just missing from the report or if dmd fails to include it.
Nov 25 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2472


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy yahoo.com


--- Comment #2 from yebblies <yebblies gmail.com> 2011-06-17 20:57:22 PDT ---
*** Issue 6173 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 17 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2472


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
            Version|1.036                       |D1 & D2


--- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2012-05-21 02:11:43 PDT ---
Pull request for D2 branch:
https://github.com/D-Programming-Language/dmd/pull/961

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 21 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2472



--- Comment #4 from github-bugzilla puremagic.com 2012-05-21 12:21:43 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/df406f1de78236092fee2a311a806a1226a596d8
fix Issue 2472 - Delegates are not lvalue.

https://github.com/D-Programming-Language/dmd/commit/acc992258b592f4f9ed849a1064c3066993ab196
Merge pull request #961 from 9rnsr/fix2472

Issue 2472 - Delegates are not lvalue.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 21 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2472


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: -------
May 21 2012