mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
15 lines
426 B
PHP
15 lines
426 B
PHP
--TEST--
|
|
readonly property does not satisfy get/set interface property
|
|
--DESCRIPTION--
|
|
The error message should be improved, the set access level comes from readonly.
|
|
--FILE--
|
|
<?php
|
|
interface I {
|
|
public int $prop { get; set; }
|
|
}
|
|
class C implements I {
|
|
public function __construct(public readonly int $prop) {}
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Set access level of C::$prop must be omitted (as in class I) in %s on line %d
|