Skip to content

Commit

Permalink
Add Range coercers for int1 and uint1
Browse files Browse the repository at this point in the history
  • Loading branch information
b2gills committed Sep 22, 2014
1 parent aac70ae commit ea76dc6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/Int.pm
Expand Up @@ -109,11 +109,13 @@ my class Int does Real { # declared in BOOTSTRAP
when int32 { Range.new( -2147483648, 2147483647 ) }
when int16 { Range.new( -32768, 32767 ) }
when int8 { Range.new( -128, 127 ) }
when int1 { Range.new( -1, 0 ) }

when uint64 { Range.new( 0, 18446744073709551615 ) }
when uint32 { Range.new( 0, 4294967295 ) }
when uint16 { Range.new( 0, 65535 ) }
when uint8 { Range.new( 0, 255 ) }
when uint1 { Range.new( 0, 1 ) }

when Int { Range.new( -Inf, Inf ) }

Expand Down

0 comments on commit ea76dc6

Please sign in to comment.