While working with the NCurses module I ran into some strange behavior that I've distilled in the repl as:
> my $c = ' '.ord
32
> $c.WHAT
(Int)
> my int32 $n = ' '.ord
32
> $n.WHAT
Bytecode validation error at offset 128, instruction 20:
operand type 32 does not match register type 24 for op getlex_ni in frame <unit>
> my int32 $m = 32
32
> $m.WHAT
Bytecode validation error at offset 128, instruction 20:
operand type 32 does not match register type 24 for op getlex_ni in frame <unit>
> my int32 $j = int32( 32 )
Cannot invoke this object (REPR: P6int; int32)
in block <unit> at <unknown file> line 1
The problem is that wborder is defined with a signature of (NCurses::WINDOW, int32, int32, int32, int32, int32, int32, int32, int32 --> int32) but none of my attempts to come up with an int32 version of 32 have worked yet. I'm sure I'm missing something but I've no idea what.