Hi All,
Anyone have a workaround to my stolen uint's?
> constant DWORD := uint32;
(uint32)
> subset StrOrDword where Str | DWORD;
(StrOrDword)
> sub x( StrOrDword $item ) {
* say "$item is a " ~ $item.^name;
* }
&x
> x( "abc" );
abc is a Str
> x( 3 );
Constraint type check failed in binding to parameter '$item'; expected
StrOrDword but got Int (3)
in sub x at <unknown file> line 1
in block <unit> at <unknown file> line 1
> x( 3.UInt );
Constraint type check failed in binding to parameter '$item'; expected
StrOrDword but got Int (3)
in sub x at <unknown file> line 1
in block <unit> at <unknown file> line 1
Many thanks,
-T