[Issue 4545] Alias to members possible without "this" instance
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Aug 7 05:32:03 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4545
Stewart Gordon <smjg at iname.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |smjg at iname.com
Version|D2 |D1 & D2
--- Comment #2 from Stewart Gordon <smjg at iname.com> 2010-08-07 05:31:59 PDT ---
I'm not sure. The existence of .funcptr seems to contradict
http://www.digitalmars.com/d/1.0/type.html#delegates
"There are no pointers-to-members in D, but a more useful concept called
delegates are supported."
See also bug 2557.
Applies to D1 as well, though new A must be cast. Moreover, you don't need to
go through an alias - DMD 1.062 accepts even
dg.funcptr = &A.foo;
But non-static members of structs/classes/unions are still compile-time
entities, and they have properties.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list