2472 – Delegates are not lvalue.

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2472 - Delegates are not lvalue.
Summary: Delegates are not lvalue.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Linux
: P2 normal
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
: 6173 (view as issue list)
Depends on:
Blocks:
Reported: 2008年11月25日 16:13 UTC by Eldar Insafutdinov
Modified: 2015年06月09日 05:11 UTC (History)
2 users (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Eldar Insafutdinov 2008年11月25日 16:13:00 UTC
class A
{
	void foo()
	{
	}
}
int main()
{
	auto a = new A;
	auto x = (&a.foo).funcptr;
}
dmd output:
Error: &a.foo is not an lvalue
Comment 1 Eldar Insafutdinov 2008年11月25日 16:15:45 UTC
while this works well:
auto dlg = &a.foo;
auto f_ptr = dlg.funcptr;
Comment 2 yebblies 2011年06月17日 20:57:22 UTC
*** Issue 6173 has been marked as a duplicate of this issue. ***
Comment 3 Kenji Hara 2012年05月21日 02:11:43 UTC
Pull request for D2 branch:
https://github.com/D-Programming-Language/dmd/pull/961 
Comment 4 github-bugzilla 2012年05月21日 12:21:43 UTC
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.


AltStyle によって変換されたページ (->オリジナル) /