Skip to content

Commit 1af4704

Browse files
committed
Add parameter length
1 parent f6dbd69 commit 1af4704

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Compiler/Lang/Assembler/MethodAssembler.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use PHPJava\Compiler\Lang\Assembler\Traits\Enhancer\Operation\LocalVariableAssignable;
1515
use PHPJava\Compiler\Lang\Assembler\Traits\Enhancer\Operation\LocalVariableLoadable;
1616
use PHPJava\Compiler\Lang\Assembler\Traits\OperationManageable;
17+
use PHPJava\Exceptions\AssembleStructureException;
1718
use PHPJava\Kernel\Maps\OpCode;
1819
use PHPJava\Kernel\Types\_Void;
1920
use PHPJava\Utilities\ArrayTool;
@@ -128,6 +129,14 @@ public function assemble(): void
128129
}
129130
}
130131

132+
foreach ($parameters as $keyName => $value) {
133+
if ($value === null) {
134+
throw new AssembleStructureException(
135+
'Parameter length are mismatch.'
136+
);
137+
}
138+
}
139+
131140
$operations = [];
132141
$defaultLocalVariableOperations = $this->getStore()->getAll();
133142

0 commit comments

Comments
 (0)