mirror of
https://github.com/php/php-src.git
synced 2026-04-26 09:28:21 +02:00
17 lines
300 B
PHP
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
|