Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make $?BITS only visible inside Int
  • Loading branch information
lizmat committed Mar 16, 2015
1 parent 97215d0 commit 748e695
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/Int.pm
Expand Up @@ -4,11 +4,6 @@ my class X::Numeric::DivideByZero { ... }
my class Int { ... }
my subset UInt of Int where * >= 0;

my constant $?BITS = do {
my int $a = 0x1ffffffff;
nqp::iseq_i($a,8589934591) ?? 64 !! 32;
}

my class Int does Real { # declared in BOOTSTRAP
# class Int is Cool {
# has bigint $!value is box_target;
Expand Down Expand Up @@ -121,6 +116,11 @@ my class Int does Real { # declared in BOOTSTRAP

method narrow(Int:D:) { self }

my constant $?BITS = do {
my int $a = 0x1ffffffff;
nqp::iseq_i($a,8589934591) ?? 64 !! 32;
}

method Range(Int:U:) {
given self {
when int { $?BITS == 64 ?? int64.Range !! int32.Range }
Expand Down

0 comments on commit 748e695

Please sign in to comment.