Skip to content
Permalink
Browse files

Augment the Instant + Instant error message, timotimo++

  • Loading branch information...
lizmat committed Jan 4, 2019
1 parent e48712a commit 59bafb832d268deadd1f3f936c05f2460f9a160d
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/Instant.pm6
@@ -89,7 +89,8 @@ multi sub infix:«>=»(Instant:D $a, Instant:D $b --> Bool:D) {
}

multi sub infix:<+>(Instant:D $a, Instant:D $b) {
die "Adding two Instant values has no meaning, did you mean to subtract?"
die "Adding two Instant values has no meaning.
Did you mean to subtract? Perhaps you need to convert to .Numeric first?"
}
multi sub infix:<+>(Instant:D $a, Real:D $b --> Instant:D) {
nqp::create(Instant).SET-SELF($a.tai + $b.Rat)

0 comments on commit 59bafb8

Please sign in to comment.
You can’t perform that action at this time.