I've tried
module Program
{
Main() : void
{ mutable x : byte = 0B;
mutable y : byte = 0B;
x++;
//y = x + 1;
//y = x + 1B;
//def one:byte=1;// x = x + one;
}
}
No matter which one I try, I get the following error message.
Error 1 expected byte, got int in assigned value: System.Int32 is not a subtype of System.Byte [simple require]
Only way I've found that works is
y = ( x + 1 ):>byte
Which is bit of faff, just to add one.
Why is this? and Is there a better (read shorter way)?