Skip Menu |

To: perl6-bugs-followup [...] perl.org
Date: Sun, 3 Dec 2017 13:24:54 +0800
Subject: [perl #124983]
From: 陈梓立 <wander4096 [...] gmail.com>
Download (untitled) / with headers
text/plain 928b
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
```


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org