Skip to content

Commit 115c60e

Browse files
committed
Validate constructor property promotion in stubs
1 parent 20c49f8 commit 115c60e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build/gen_stub.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3947,6 +3947,10 @@ function parseFunctionLike(
39473947
$numRequiredArgs = 0;
39483948
$foundVariadic = false;
39493949
foreach ($func->getParams() as $i => $param) {
3950+
if ($param->isPromoted()) {
3951+
throw new Exception("Promoted properties are not supported");
3952+
}
3953+
39503954
$varName = $param->var->name;
39513955
$preferRef = !empty($paramMeta[$varName]['prefer-ref']);
39523956
unset($paramMeta[$varName]);

0 commit comments

Comments
 (0)