[Issue 5729] taking the address of a @property doesn't work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 1 09:36:12 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5729
Harry Vennik <htvennik at zonnet.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |htvennik at zonnet.nl
--- Comment #1 from Harry Vennik <htvennik at zonnet.nl> 2011-04-01 09:32:40 PDT ---
The point is that you are getting the address of the property function, not the
address of the ref return value. Adding the () changes this, because the () is
evaluated before &.
So the real problem is a syntax ambiguity.
It depends on the context how the reference to the property is evaluated. Try
this:
typeof(a.bla) // returns int
typeof(&a.bla) // returns int delegate() @property ref
--
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