Skip to content

Commit ffc4b0e

Browse files
committed
Parse checkcast
1 parent 2d9d4a8 commit ffc4b0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

classfile/src/opcode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub enum Opcode {
2727
Bipush(i8),
2828
Caload,
2929
Castore,
30-
Checkcast(u16),
30+
Checkcast(ValueConstant),
3131
D2f,
3232
D2i,
3333
D2l,
@@ -196,7 +196,7 @@ impl Opcode {
196196
0x10 => map(i8, Opcode::Bipush)(data),
197197
0x34 => success(Opcode::Caload)(data),
198198
0x55 => success(Opcode::Castore)(data),
199-
0xc0 => map(be_u16, Opcode::Checkcast)(data),
199+
0xc0 => map(be_u16, |x| Opcode::Checkcast(ValueConstant::from_constant_pool(constant_pool, x as _)))(data),
200200
0x90 => success(Opcode::D2f)(data),
201201
0x8e => success(Opcode::D2i)(data),
202202
0x8f => success(Opcode::D2l)(data),

0 commit comments

Comments
 (0)