Skip to content

Commit a6b5327

Browse files
committed
Update
1 parent e4c8eca commit a6b5327

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/Compiler/Builder/Generator/Operation/Operand.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
namespace PHPJava\Compiler\Builder\Generator\Operation;
44

55
use PHPJava\Compiler\Builder\Finder\Result\ConstantPoolFinderResult;
6+
use PHPJava\Compiler\Builder\Types\Int16;
7+
use PHPJava\Compiler\Builder\Types\Int32;
8+
use PHPJava\Compiler\Builder\Types\Int8;
69
use PHPJava\Compiler\Builder\Types\Uint16;
710
use PHPJava\Compiler\Builder\Types\Uint32;
811
use PHPJava\Compiler\Builder\Types\Uint8;
@@ -15,7 +18,18 @@ class Operand
1518

1619
public static function factory(string $type, $value): self
1720
{
18-
if (!in_array($type, [Uint8::class, Uint16::class, Uint32::class], true)) {
21+
if (!in_array(
22+
$type,
23+
[
24+
Uint8::class,
25+
Uint16::class,
26+
Uint32::class,
27+
Int8::class,
28+
Int16::class,
29+
Int32::class,
30+
],
31+
true
32+
)) {
1933
throw new AssembleStructureException(
2034
'Invalid class type: ' . $type
2135
);

0 commit comments

Comments
 (0)