mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
19 lines
281 B
PHP
19 lines
281 B
PHP
--TEST--
|
|
GH-19304: Incorrect anonymous class type name assertion
|
|
--FILE--
|
|
<?php
|
|
|
|
$foo = new class {
|
|
public self $v;
|
|
};
|
|
|
|
try {
|
|
$foo->v = 0;
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Cannot assign int to property class@anonymous::$v of type self
|