diff --git a/src/Php/CompilerBase.php b/src/Php/CompilerBase.php index c97b7ef2..aa87c1fd 100644 --- a/src/Php/CompilerBase.php +++ b/src/Php/CompilerBase.php @@ -1744,6 +1744,9 @@ class CompilerBase extends \PhpAot\Core\Translator // no break case 'mixed': return self::TYPE_VAR; + case 'self': + $this->objects[$var] = $this->classDef->getNamespacedName(false); + return self::TYPE_OBJECT; case 'resource': $this->fatalError($param, 'Cannot use `resource` as a parameter type.'); // no break diff --git a/tests/aot/static_prop_write_2.phpt b/tests/aot/static_prop_write_2.phpt new file mode 100644 index 00000000..68fcf70b --- /dev/null +++ b/tests/aot/static_prop_write_2.phpt @@ -0,0 +1,21 @@ +--TEST-- +Static Class Property Read/Write Test +--FILE-- + +--EXPECT-- +string(6) "Select" \ No newline at end of file