You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. now it's moved to S06-operator-overloading/infix.t
2. note that default Left-associative works, this ticket in fact about
reserved words. See the example below:
```
{
my sub infix:<Z> ($a, $b) {
$a ** $b;
}
is (2 Z 1 Z 2), 4, "default Left-associative works.";
}
# Calling infix:<Z>(Int, Int, Int) will never work with declared signature
($a, $b)
```
```
{
my sub infix:<B> ($a, $b) {
$a ** $b;
}
is (2 B 1 B 2), 4, "default Left-associative works.";
}
# ok
```
```
{
my sub infix:<.> ($a, $b) {
$a ** $b;
}
is (2 . 1 . 2), 4, "default Left-associative works.";
}
# Unsupported use of . to concatenate strings; in Perl 6 please use ~
```
```
{
my sub infix:<~> ($a, $b) {
$a ** $b;
}
is (2 ~ 1 ~ 2), 4, "default Left-associative works.";
}
# ok
```
```
{
my sub infix:<@> ($a, $b) {
$a ** $b;
}
is (2 @ 1 @2), 4, "default Left-associative works.";
}
# ok
```
Migrated from rt.perl.org#124983 (status was 'open')
Searchable as RT124983$
The text was updated successfully, but these errors were encountered: