Skip to content

Commit 263dc84

Browse files
committed
Constants referencing unknown constants shouldn't be declared
1 parent d98d354 commit 263dc84

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build/gen_stub.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,6 +1833,11 @@ public function getCDeclaration(iterable $allConstInfos): ?string
18331833
*/
18341834
public function getDeclaration(iterable $allConstInfos): string
18351835
{
1836+
$value = EvaluatedValue::createFromExpressionRecursively($this->value, $this->cname, $allConstInfos);
1837+
if ($value->isUnknownConstValue) {
1838+
return "";
1839+
}
1840+
18361841
$value = EvaluatedValue::createFromExpression($this->value, $this->cname, $allConstInfos);
18371842
if ($value->isUnknownConstValue) {
18381843
return "";

0 commit comments

Comments
 (0)