Annotation of embedaddon/php/Zend/tests/traits/property003.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Conflicting properties with different visibility modifiers should result in a fatal error, since this indicates that the code is incompatible.
        !             3: --FILE--
        !             4: <?php
        !             5: error_reporting(E_ALL);
        !             6: 
        !             7: trait THello1 {
        !             8:   public $hello;
        !             9: }
        !            10: 
        !            11: trait THello2 {
        !            12:   private $hello;
        !            13: }
        !            14: 
        !            15: echo "PRE-CLASS-GUARD\n";
        !            16: 
        !            17: class TraitsTest {
        !            18:        use THello1;
        !            19:        use THello2;
        !            20: }
        !            21: 
        !            22: echo "POST-CLASS-GUARD\n";
        !            23: 
        !            24: $t = new TraitsTest;
        !            25: $t->hello = "foo";
        !            26: ?>
        !            27: --EXPECTF--    
        !            28: PRE-CLASS-GUARD
        !            29: 
        !            30: Fatal error: THello1 and THello2 define the same property ($hello) in the composition of TraitsTest. However, the definition differs and is considered incompatible. Class was composed in %s on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>