Skip to content

Commit

Permalink
Restore Int.Int behaviour, spotted by lucasb++
Browse files Browse the repository at this point in the history
I think this warrant further discussion about what a coercer should do on
a type object in general.  I see a Failure as well as Nil as valid options
and not the type object itself.
  • Loading branch information
lizmat committed Dec 28, 2018
1 parent 6af22bc commit 30a534d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Int.pm6
Expand Up @@ -46,7 +46,7 @@ my class Int does Real { # declared in BOOTSTRAP


method Capture() { die X::Cannot::Capture.new: :what(self) } method Capture() { die X::Cannot::Capture.new: :what(self) }


method Int(--> Int:D) { self } method Int(--> Int) { self }


multi method Str(Int:D: --> Str:D) { multi method Str(Int:D: --> Str:D) {
nqp::p6box_s(nqp::tostr_I(self)); nqp::p6box_s(nqp::tostr_I(self));
Expand Down

0 comments on commit 30a534d

Please sign in to comment.