1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00
Files
archived-php-src/Zend/tests/readonly_classes/gh9285_error.phpt
T
2022-08-21 10:33:08 +02:00

17 lines
300 B
PHP

--TEST--
Bug GH-9285: PHP 8.2 readonly classes allow inheriting mutable properties from traits - error
--FILE--
<?php
trait T {
public $prop;
}
readonly class C {
use T;
}
?>
--EXPECTF--
Fatal error: Readonly class C cannot use trait with a non-readonly property T::$prop in %s on line %d