mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
[RFC] Asymmetric visibility v2 (GH-15063)
Co-authored-by: Larry Garfield <larry@garfieldtech.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
--TEST--
|
||||
Asymmetric visibility private(get) protected(set) not allowed
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Foo {
|
||||
private protected(set) string $bar;
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Visibility of property Foo::$bar must not be weaker than set visibility in %s on line %d
|
||||
Reference in New Issue
Block a user