[Issue 2873] typeof() for member functions evaluated incorrectly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 4 20:33:08 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=2873



--- Comment #4 from Masahiro Nakagawa <repeatedly at gmail.com> 2010-05-04 20:33:06 PDT ---
(In reply to comment #3)
> Masahiro Nakagawa, I am not sure I understand this bug report and your answer
> well. 
Old D's property is a syntactic sugar(member function automatically becomes
property), so typeof() should have evaluated .length and .length() correctly.
But now, D has @property. User can choose property or non-property.

> But if I understand them, then then if you are right, and length method
> should be a property, then the compiler has to give a compile time error if you
> try to define a non-property length method, otherwise it's too much easy to
> write a bug.
I agree because I can't image non-property length. I think D's compiler should
print warning message if user tries to define non-property length.

-- 
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