Skip to content

Commit

Permalink
Revert "Add candidates for illegal +/- with Instants"
Browse files Browse the repository at this point in the history
This reverts commit 9f4db34.
  • Loading branch information
lizmat committed Aug 18, 2014
1 parent 9f4db34 commit c561ac3
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/core/Instant.pm
Expand Up @@ -105,26 +105,13 @@ multi sub infix:<+>(Instant:D $a, Duration:D $b) {
multi sub infix:<+>(Duration:D $a, Instant:D $b) {
Instant.new: $a.x + $b.x;
}
multi sub infix:<+>(Instant:D $a, Instant:D $b) {
fail X::Op::TheseTwo.new(
:op<+>, :first($a), :second($b), :perhaps<you meant '-'> );
}
multi sub infix:<+>(Instant:D $a, Any:D $b) {
fail X::Op::TheseTwo.new( :op<+>, :first($a), :second($b) );
}
multi sub infix:<+>(Any:D $a, Instant:D $b) {
fail X::Op::TheseTwo.new( :op<+>, :first($a), :second($b) );
}

multi sub infix:<->(Instant:D $a, Instant:D $b) {
Duration.new: $a.x - $b.x;
}
multi sub infix:<->(Instant:D $a, Real:D $b) {
Instant.new: $a.x - $b;
}
multi sub infix:<->(Instant:D $a, Any:D $b) {
fail X::Op::TheseTwo.new( :op<->, :first($a), :second($b) );
}

sub term:<time>() { nqp::p6box_i(nqp::time_i()) }
sub term:<now>() {
Expand Down

0 comments on commit c561ac3

Please sign in to comment.