On 04 May 2012, at 21:46, Hannes Magnusson wrote: > On Fri, May 4, 2012 at 8:30 PM, Scott MacVicar <sc...@macvicar.net> wrote: >> This caused a few bugs for us / confusion. The final keyword is accepted >> inside a trait but it the class also defines a method without the final >> keyword this takes precedence.
The methods in the class always take precedency. However, the final keyword might just be something I overlooked. It sounds sensible that if the final is not explicitly removed during composition to treat it as what final was meant for and check it against the methods defined in the class body as well. Scott, could you elaborate a bit of the use case of final in a trait? > it also ignores visibility abstract and static.. abstract is not ignored. An abstract method in a trait expresses a requirement to the host class (using class). In general, the ppp visibilities are seen as hints for the standard usage of a trait, but can be changed during composition. Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php