1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/gh19304.phpt
Ilija Tovilo 6497c6c455 Don't substitute self/parent with anonymous class
Fixes GH-18373
Closes GH-19537
2025-08-25 17:08:29 +02:00

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