New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
method form of postfix:<i> #630
Comments
From @masak<TimToady> rakudo: my $t = 5; say $t.i |
From @masakOn Wed Jan 14 22:00:33 2009, masak wrote:
Also this: <TimToady> hmm |
@masak - Status changed from 'new' to 'open' |
From @pmichaudOn Wed, Jan 14, 2009 at 10:02:21PM -0800, Carl Mäsak via RT wrote:
This latter note is a duplicate of RT #60148, and the comment there 15:52 <pmichaud> std: my $t = 5; $t\i Pm |
From @pmichaudOn Wed, Jan 14, 2009 at 10:00:33PM -0800, Carl Mäsak wrote:
Rakudo doesn't yet recognize the dotty form of postfix operators -- Just to verify: $t.i should always parse as postfix:<i> and Pm |
From @TimToadyOn Thu, Jan 15, 2009 at 10:08:22AM -0600, Patrick R. Michaud wrote: $t.i is now always a method, and you must use ($t)i or $t\i for postfix. Larry |
From @TimToadyOn Thu, Jan 15, 2009 at 09:58:12AM -0600, Patrick R. Michaud wrote: Now parses as specced. Larry |
From @bacekOn Wed Jan 14 22:00:33 2009, masak wrote:
Implementation of postfix:i there - -- |
From jswitzer@gmail.comThe attached patch is more up-to-date in that it adds this method to the -Jason "s1n" Switzer |
From jswitzer@gmail.comanyi.patchdiff --git a/src/setting/Any-num.pm b/src/setting/Any-num.pm
index 5391038..2953806 100644
--- a/src/setting/Any-num.pm
+++ b/src/setting/Any-num.pm
@@ -27,6 +27,10 @@ class Any is also {
}
}
+ multi method i() is export {
+ self * 1i;
+ }
+
our Num method rand() {
Q:PIR {
$N0 = self
|
From @ShimmerFairy()i and \i are working fine, and tests have been added to |
@ShimmerFairy - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#62382 (status was 'resolved')
Searchable as RT62382$
The text was updated successfully, but these errors were encountered: