On 22 July 2011 09:12, Alex Howansky <[email protected]> wrote:
>
>> That makes sense if it would overwrite the methods as well, but
>> otherwise it seems like it provides inconsistent functionality.
>
> Exactly. At the least, it's inconsistent. If it's a bug, then it seems the
> question becomes:
>
> Is the bug this:
>
> "Properties defined in a trait should be overridden by same-named properties
> defined in a class that use the trait."
>
> Or (as pointed out by Anthony) this:
>
> "You shouldn't be able to define properties in a trait."

Traits definitely need to be able to support properties, IMO, so I'd
say that the first behaviour just needs to be documented (and
potentially a notice added). Either the trait or the class is going to
have its property overwritten, so we should pick which definition wins
and go from there.

Adam

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to