1 class Integer = 2 inherit Number 3 4 def (%) @c (rhs : Self) : Self 5 6 class Signed = 7 inherit Integer 8 9 def (Number -) @c (rhs : Self) : Self 10 def abs : Self = if self < 0 then -self else self 11 12 class Unsigned = 13 inherit Integer 14 15 def (&) @c (rhs : Self) : Self 16 def (^) @c (rhs : Self) : Self 17 def (|) @c (rhs : Self) : Self 18 19 def (<<)<T> @c (rhs : T) : Self where T : Integer 20 def (>>)<T> @c (rhs : T) : Self where T : Integer 21 22 type i32 @c = 23 is Signed 24 25 type i64 @c = 26 is Signed 27 28 type u8 @c = 29 def (-) "kd_ckd_sub_u8" (rhs : u8) : u8 30 31 is Unsigned 32 33 type u16 @c = 34 def (-) "kd_ckd_sub_u16" (rhs : u16) : u16 35 36 is Unsigned 37 38 type u32 @c = 39 def (-) "kd_ckd_sub_u32" (rhs : u32) : u32 40 41 is Unsigned 42 43 type u64 @c = 44 def (-) "kd_ckd_sub_u64" (rhs : u64) : u64 45 46 is Unsigned 47 48 type usize @c = 49 def (-) "kd_ckd_sub_usize" (rhs : usize) : usize 50 51 is Unsigned 52 53 type int @c = 54 is Signed 55 56 def (|) (rhs : int) : int 57 58 type uint @c = 59 def (-) "kd_ckd_sub_uint" (rhs : uint) : uint 60 61 is Unsigned 62 63 type long @c = 64 is Signed 65