diff --git a/src/Php/Preprocessor.php b/src/Php/Preprocessor.php index 27a3b38f..71443254 100644 --- a/src/Php/Preprocessor.php +++ b/src/Php/Preprocessor.php @@ -274,6 +274,13 @@ class Preprocessor extends CompilerBase if (!($class->flags & Modifiers::ABSTRACT)) { $this->fatalError($v, "Class {$this->class} cannot override non-abstract method {$v->name}"); } + if ($this->method === '__construct') { + foreach ($v->params as $param) { + if ($param->isPromoted()) { + $this->fatalError($v, "Cannot declare promoted property in an abstract constructor"); + } + } + } } $fullClassName = $this->getFullClassName();