Skip to content

Commit

Permalink
Mark sub infix:<=> as an "only" sub
Browse files Browse the repository at this point in the history
Assignment is handled directly in the compiler.  Add some comments to this
effect and make it an only to mark its "specialness" in that respect.
  • Loading branch information
lizmat committed Mar 1, 2018
1 parent 5490bac commit 1be26af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/operators.pm
Expand Up @@ -3,7 +3,10 @@
## generic string operators are in Stringy.pm
## Int/Rat/Num operators are in {Int|Rat|Num}.pm

sub infix:<=>(Mu \a, Mu \b) is raw {
# infix:<=> only exists to allow it to be referenced as an operator in
# meta-operator usage. You cannot add other candidates for it. Therefore
# it doesn't make sense to make it a multi.
only sub infix:<=>(Mu \a, Mu \b) is raw {
nqp::p6store(a, b)
}

Expand Down

0 comments on commit 1be26af

Please sign in to comment.