Skip to content

Instantly share code, notes, and snippets.

@MasterDuke17
Last active October 30, 2017 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MasterDuke17/1412aae89483c0456d7127df9ca7e428 to your computer and use it in GitHub Desktop.
Save MasterDuke17/1412aae89483c0456d7127df9ca7e428 to your computer and use it in GitHub Desktop.
diff --git a/lib/NativeCall/Types.pm6 b/lib/NativeCall/Types.pm6
index 3a6271809..4e590118f 100644
--- a/lib/NativeCall/Types.pm6
+++ b/lib/NativeCall/Types.pm6
@@ -33,7 +33,7 @@ our class Pointer is repr('CPointer') {
nqp::p6box_i(nqp::unbox_i(nqp::decont(self)))
}
- proto method Bool() {*}
+ proto method Bool() { * }
multi method Bool(::?CLASS:U: --> False) { }
multi method Bool(::?CLASS:D:) { so self.Int }
diff --git a/src/core/Any-iterable-methods.pm b/src/core/Any-iterable-methods.pm
index 498280fab..abe73b1d7 100644
--- a/src/core/Any-iterable-methods.pm
+++ b/src/core/Any-iterable-methods.pm
@@ -1473,7 +1473,7 @@ Did you mean to add a stub (\{...\}) or did you mean to .classify?"
$reducer(&with,1)(self) if $reducer;
}
- proto method unique(|) is nodal {*}
+ proto method unique(|) is nodal { * }
multi method unique() {
Seq.new(class :: does Iterator {
has $!iter;
@@ -1572,7 +1572,7 @@ Did you mean to add a stub (\{...\}) or did you mean to .classify?"
)
}
- proto method repeated(|) is nodal {*}
+ proto method repeated(|) is nodal { * }
multi method repeated() {
Seq.new(class :: does Iterator {
has Mu $!iter;
@@ -1659,7 +1659,7 @@ Did you mean to add a stub (\{...\}) or did you mean to .classify?"
)
}
- proto method squish(|) is nodal {*}
+ proto method squish(|) is nodal { * }
multi method squish( :&as!, :&with = &[===] ) {
Seq.new(class :: does Iterator {
has Mu $!iter;
@@ -1937,17 +1937,17 @@ proto sub infix:<minmax>(|) is pure { * }
multi sub infix:<minmax>(+args) { args.minmax }
sub minmax(+args, :&by = &infix:<cmp>) { args.minmax(&by) }
-proto sub map(|) {*}
+proto sub map(|) { * }
multi sub map(&code, +values) { my $laze = values.is-lazy; values.map(&code).lazy-if($laze) }
-proto sub grep(|) {*}
+proto sub grep(|) { * }
multi sub grep(Mu $test, +values, *%a) {
my $laze = values.is-lazy;
values.grep($test,|%a).lazy-if($laze)
}
multi sub grep(Bool:D $t, |) { X::Match::Bool.new(:type<grep>).throw }
-proto sub first(|) {*}
+proto sub first(|) { * }
multi sub first(Bool:D $t, |) { Failure.new(X::Match::Bool.new(:type<first>)) }
multi sub first(Mu $test, +values, *%a) { values.first($test,|%a) }
@@ -1969,7 +1969,7 @@ multi sub squish(+values, |c) { my $laze = values.is-lazy; values.squish(|c).laz
proto sub repeated(|) { * }
multi sub repeated(+values, |c) { my $laze = values.is-lazy; values.repeated(|c).lazy-if($laze) }
-proto sub sort(|) {*}
+proto sub sort(|) { * }
multi sub sort(&by, @values) { @values.sort(&by) }
multi sub sort(&by, +values) { values.sort(&by) }
multi sub sort(@values) { @values.sort }
diff --git a/src/core/Any.pm b/src/core/Any.pm
index d8a9c42b0..57d41d485 100644
--- a/src/core/Any.pm
+++ b/src/core/Any.pm
@@ -188,7 +188,7 @@ my class Any { # declared in BOOTSTRAP
}
# auto-vivifying
- proto method push(|) is nodal {*}
+ proto method push(|) is nodal { * }
multi method push(Any:U \SELF: |values) {
SELF = nqp::istype(SELF,Positional) ?? SELF.new !! Array.new;
SELF.push(|values);
@@ -247,7 +247,7 @@ my class Any { # declared in BOOTSTRAP
Rakudo::Internals.WALK-AT-POS(self,@indices).EXISTS-POS($final)
}
- proto method AT-POS(|) is nodal {*}
+ proto method AT-POS(|) is nodal { * }
multi method AT-POS(Any:U \SELF: int \pos) is raw {
nqp::p6bindattrinvres(
my $scalar,
@@ -539,7 +539,7 @@ multi sub elems($a) { $a.elems }
proto sub end(|) { * }
multi sub end($a) { $a.end }
-proto sub sum(|) {*}
+proto sub sum(|) { * }
multi sub sum() { 0 }
multi sub sum(\SELF) { SELF.sum }
multi sub sum(+SELF) { SELF.sum }
diff --git a/src/core/CompUnit/PrecompilationRepository.pm b/src/core/CompUnit/PrecompilationRepository.pm
index cafd4dba4..aa15c4e20 100644
--- a/src/core/CompUnit/PrecompilationRepository.pm
+++ b/src/core/CompUnit/PrecompilationRepository.pm
@@ -163,7 +163,7 @@ class CompUnit::PrecompilationRepository::Default does CompUnit::PrecompilationR
True
}
- proto method load(|) {*}
+ proto method load(|) { * }
multi method load(
Str $id,
@@ -207,7 +207,7 @@ class CompUnit::PrecompilationRepository::Default does CompUnit::PrecompilationR
Nil
}
- proto method precompile(|) {*}
+ proto method precompile(|) { * }
multi method precompile(
IO::Path:D $path,
diff --git a/src/core/CompUnit/Repository/Installation.pm b/src/core/CompUnit/Repository/Installation.pm
index ab626e692..ba8c77178 100644
--- a/src/core/CompUnit/Repository/Installation.pm
+++ b/src/core/CompUnit/Repository/Installation.pm
@@ -170,7 +170,7 @@ sub MAIN(:$name is copy, :$auth, :$ver, *@, *%) {
$!version = 2;
}
- proto method install(|) {*}
+ proto method install(|) { * }
multi method install($dist, %sources, %scripts?, %resources?, Bool :$force) {
# XXX: Deprecation shim
my %files;
diff --git a/src/core/Complex.pm b/src/core/Complex.pm
index 1b433922f..94a785460 100644
--- a/src/core/Complex.pm
+++ b/src/core/Complex.pm
@@ -223,7 +223,7 @@ my class Complex is Cool does Numeric {
Complex.new( self.re.ceiling, self.im.ceiling );
}
- proto method round(|) {*}
+ proto method round(|) { * }
multi method round(Complex:D:) {
Complex.new( self.re.round, self.im.round );
}
diff --git a/src/core/Cool.pm b/src/core/Cool.pm
index 87bfd876b..ba68a25fa 100644
--- a/src/core/Cool.pm
+++ b/src/core/Cool.pm
@@ -35,11 +35,11 @@ my class Cool { # declared in BOOTSTRAP
method acotanh() { self.Numeric.acotanh }
method cis() { self.Numeric.cis }
- proto method log(|) {*}
+ proto method log(|) { * }
multi method log(Cool:D: ) { self.Numeric.log }
multi method log(Cool:D: $base) { self.Numeric.log($base.Numeric) }
- proto method exp(|) {*}
+ proto method exp(|) { * }
multi method exp(Cool:D: ) { self.Numeric.exp }
multi method exp(Cool:D: $base) { self.Numeric.exp($base.Numeric) }
@@ -320,18 +320,18 @@ sub printf(Cool $format, *@args) { print sprintf $format, @args }
sub samecase(Cool $string, Cool $pattern) { $string.samecase($pattern) }
sub split($pat, Cool $target, |c) { $target.split($pat, |c) }
-proto sub chars($) is pure {*}
+proto sub chars($) is pure { * }
multi sub chars(Cool $x) { $x.Str.chars }
multi sub chars(Str:D $x) { nqp::p6box_i(nqp::chars($x)) }
multi sub chars(str $x --> int) { nqp::chars($x) }
# These probably belong in a separate unicodey file
-proto sub uniname(|) {*}
+proto sub uniname(|) { * }
multi sub uniname(Str:D $str) { $str ?? uniname($str.ord) !! Nil }
multi sub uniname(Int:D $code) { nqp::getuniname($code) }
-proto sub uninames(|) {*}
+proto sub uninames(|) { * }
multi sub uninames(Str:D $str) { $str.NFC.map: { uniname($_) } }
#?if jvm
@@ -346,7 +346,7 @@ multi sub unimatch(|) { die 'unimatch NYI on jvm backend' }
#?endif
#?if moar
-proto sub uniprop(|) {*}
+proto sub uniprop(|) { * }
multi sub uniprop(Str:D $str, |c) { $str ?? uniprop($str.ord, |c) !! Nil }
multi sub uniprop(Int:D $code) {
nqp::getuniprop_str($code,nqp::unipropcode('General_Category'));
@@ -466,14 +466,14 @@ multi sub uniprop(Int:D $code, Stringy:D $propname) {
}
}
# Unicode functions
-proto sub uniprop-int(|) {*}
+proto sub uniprop-int(|) { * }
multi sub uniprop-int(Str:D $str, Stringy:D $propname) {
$str ?? uniprop-int($str.ord, $propname) !! Nil }
multi sub uniprop-int(Int:D $code, Stringy:D $propname) {
nqp::getuniprop_int($code,nqp::unipropcode($propname));
}
-proto sub uniprop-bool(|) {*}
+proto sub uniprop-bool(|) { * }
multi sub uniprop-bool(Str:D $str, Stringy:D $propname) {
$str ?? uniprop-bool($str.ord, $propname) !! Nil
}
@@ -481,19 +481,19 @@ multi sub uniprop-bool(Int:D $code, Stringy:D $propname) {
nqp::p6bool(nqp::getuniprop_bool($code,nqp::unipropcode($propname)));
}
-proto sub uniprop-str(|) {*}
+proto sub uniprop-str(|) { * }
multi sub uniprop-str(Str:D $str, Stringy:D $propname) {
$str ?? uniprop-str($str.ord, $propname) !! Nil
}
multi sub uniprop-str(Int:D $code, Stringy:D $propname) {
nqp::getuniprop_str($code,nqp::unipropcode($propname));
}
-proto sub uniprops(|) {*}
+proto sub uniprops(|) { * }
multi sub uniprops(Str:D $str, Stringy:D $propname = "General_Category") {
$str.ords.map: { uniprop($_, $propname) }
}
-proto sub unival(|) {*}
+proto sub unival(|) { * }
multi sub unival(Str:D $str) { $str ?? unival($str.ord) !! Nil }
multi sub unival(Int:D $code) {
state $nuprop = nqp::unipropcode("Numeric_Value_Numerator");
@@ -503,10 +503,10 @@ multi sub unival(Int:D $code) {
!$de || $de eq '1' ?? $nu.Int !! $nu / $de;
}
-proto sub univals(|) {*}
+proto sub univals(|) { * }
multi sub univals(Str:D $str) { $str.ords.map: { unival($_) } }
-proto sub unimatch(|) {*}
+proto sub unimatch(|) { * }
multi sub unimatch(Str:D $str, |c) { $str ?? unimatch($str.ord, |c) !! Nil }
# This multi below can be removed when MoarVM bug #448 is fixed
multi sub unimatch(Int:D $code, Stringy:D $pvalname, Stringy:D $propname) {
diff --git a/src/core/Date.pm b/src/core/Date.pm
index e0ba0735f..021d4a4af 100644
--- a/src/core/Date.pm
+++ b/src/core/Date.pm
@@ -20,7 +20,7 @@ my class Date does Dateish {
method !SET-SELF($!year,$!month,$!day,&!formatter,$!daycount = Int) { self }
- proto method new(|) {*}
+ proto method new(|) { * }
multi method new(Date: Int() $year, Int() $month, Int() $day, :&formatter, *%_) {
(1..12).in-range($month,'Month');
(1 .. self.DAYS-IN-MONTH($year,$month)).in-range($day,'Day');
diff --git a/src/core/DateTime.pm b/src/core/DateTime.pm
index 3d8188a70..2df22db85 100644
--- a/src/core/DateTime.pm
+++ b/src/core/DateTime.pm
@@ -99,7 +99,7 @@ my class DateTime does Dateish {
$dt
}
- proto method new(|) {*}
+ proto method new(|) { * }
multi method new(DateTime:
\y,\mo,\d,\h,\mi,\s,:$timezone = 0,:&formatter,*%_) {
self!new-from-positional(y,mo,d,h,mi,s,%_,:$timezone,:&formatter)
diff --git a/src/core/Failure.pm b/src/core/Failure.pm
index c340f87f9..a39498dc0 100644
--- a/src/core/Failure.pm
+++ b/src/core/Failure.pm
@@ -114,7 +114,7 @@ my class Failure is Nil {
}
}
-proto sub fail(|) {*};
+proto sub fail(|) { * };
multi sub fail(--> Nil) {
my $stash := CALLER::;
my $payload = $stash<$!>.DEFINITE ?? $stash<$!> !! "Failed";
diff --git a/src/core/ForeignCode.pm b/src/core/ForeignCode.pm
index d04ac3926..06f237bdd 100644
--- a/src/core/ForeignCode.pm
+++ b/src/core/ForeignCode.pm
@@ -100,7 +100,7 @@ multi sub EVAL($code, Str :$lang where { ($lang // '') eq 'Perl5' }, PseudoStash
!! $code.Str;
}
-proto sub EVALFILE($, *%) {*}
+proto sub EVALFILE($, *%) { * }
multi sub EVALFILE($filename, :$lang = 'perl6') {
EVAL slurp(:bin, $filename), :$lang, :context(CALLER::);
}
diff --git a/src/core/IO/Path.pm b/src/core/IO/Path.pm
index 736229160..2d38d0681 100644
--- a/src/core/IO/Path.pm
+++ b/src/core/IO/Path.pm
@@ -31,7 +31,7 @@ my class IO::Path is Cool does IO {
self;
}
- proto method new(|) {*}
+ proto method new(|) { * }
multi method new(IO::Path: Str $path, :$SPEC = $*SPEC, Str:D :$CWD) {
self.bless(:$path, :$SPEC, :$CWD);
}
@@ -121,7 +121,7 @@ my class IO::Path is Cool does IO {
$base,
)
}
- proto method extension(|) {*}
+ proto method extension(|) { * }
multi method extension(IO::Path:D:) {
nqp::if(
nqp::iseq_i(-1, (my int $offset = nqp::rindex(
@@ -543,7 +543,7 @@ my class IO::Path is Cool does IO {
}}
}
- proto method dir(|) {*} # make it possible to augment with multies from modulespace
+ proto method dir(|) { * } # make it possible to augment with multies from modulespace
multi method dir(IO::Path:D:
Mu :$test = $*SPEC.curupdir,
:$CWD = $*CWD,
diff --git a/src/core/Int.pm b/src/core/Int.pm
index bc818bdea..10aa42f7a 100644
--- a/src/core/Int.pm
+++ b/src/core/Int.pm
@@ -24,7 +24,7 @@ my class Int does Real { # declared in BOOTSTRAP
)
}
- proto method new(|) {*}
+ proto method new(|) { * }
multi method new( \value) { self.new: value.Int }
multi method new(int \value) {
# rebox the value, so we get rid of any potential mixins
@@ -143,7 +143,7 @@ my class Int does Real { # declared in BOOTSTRAP
method floor(Int:D:) { self }
method ceiling(Int:D:) { self }
- proto method round(|) {*}
+ proto method round(|) { * }
multi method round(Int:D:) { self }
multi method round(Int:D: Real(Cool) $scale) { (self / $scale + 1/2).floor * $scale }
@@ -439,14 +439,14 @@ multi sub prefix:<+^>(Int:D \a) {
# nqp::bitneg_i($a);
#}
-proto sub chr($) is pure {*}
+proto sub chr($) is pure { * }
multi sub chr(Int:D \x --> Str:D) { x.chr }
multi sub chr(Cool \x --> Str:D) { x.Int.chr }
multi sub chr(int $x --> str) {
nqp::chr($x);
}
-proto sub is-prime($) is pure {*}
+proto sub is-prime($) is pure { * }
multi sub is-prime(Int:D \i) {
nqp::p6bool(nqp::isprime_I(nqp::decont(i), nqp::unbox_i(100)));
}
@@ -455,7 +455,7 @@ multi sub is-prime(\i) {
&& nqp::p6bool(nqp::isprime_I(nqp::decont(i.Int), nqp::unbox_i(100)));
}
-proto sub expmod($, $, $) is pure {*}
+proto sub expmod($, $, $) is pure { * }
multi sub expmod(Int:D \base, Int:D \exp, Int:D \mod) {
nqp::expmod_I(nqp::decont(base), nqp::decont(exp), nqp::decont(mod), Int);
}
@@ -463,10 +463,10 @@ multi sub expmod(\base, \exp, \mod) {
nqp::expmod_I(nqp::decont(base.Int), nqp::decont(exp.Int), nqp::decont(mod.Int), Int);
}
-proto sub lsb($) {*}
+proto sub lsb($) { * }
multi sub lsb(Int:D \i) { i.lsb }
-proto sub msb($) {*}
+proto sub msb($) { * }
multi sub msb(Int:D \i) { i.msb }
# vim: ft=perl6 expandtab sw=4
diff --git a/src/core/List.pm b/src/core/List.pm
index f4472dbc1..89355652e 100644
--- a/src/core/List.pm
+++ b/src/core/List.pm
@@ -1077,7 +1077,7 @@ my class List does Iterable does Positional { # declared in BOOTSTRAP
)
}
- proto method combinations(|) is nodal {*}
+ proto method combinations(|) is nodal { * }
multi method combinations() {
nqp::stmts(
(my int $elems = self.elems), # reifies
@@ -1140,7 +1140,7 @@ my class List does Iterable does Positional { # declared in BOOTSTRAP
)
}
- proto method permutations(|) is nodal {*}
+ proto method permutations(|) is nodal { * }
multi method permutations() {
Seq.new(
Rakudo::Iterator.ListIndexes(
@@ -1419,7 +1419,7 @@ my class List does Iterable does Positional { # declared in BOOTSTRAP
}
# The , operator produces a List.
-proto sub infix:<,>(|) is pure {*}
+proto sub infix:<,>(|) is pure { * }
multi sub infix:<,>() { nqp::create(List) }
multi sub infix:<,>(|) {
@@ -1471,7 +1471,7 @@ sub list(+l) { l }
# things we flatten, which would be different semantics to .flat which gives
# back a Seq. We also add an Iterable candidate, to preserve .is-lazy
# of an Iterable whenever we can.
-proto flat(|) {*}
+proto flat(|) { * }
multi flat(**@list is raw) { @list.flat }
multi flat(Iterable \a) { a.flat }
@@ -1530,7 +1530,7 @@ multi sub infix:<cmp>(@a, @b) {
(@a Zcmp @b).first(&prefix:<?>) || @a <=> @b
}
-proto sub infix:<X>(|) is pure {*}
+proto sub infix:<X>(|) is pure { * }
multi sub infix:<X>(+lol, :&with!) {
Seq.new(Rakudo::Iterator.CrossIterablesOp(lol,&with))
}
@@ -1539,7 +1539,7 @@ multi sub infix:<X>(+lol) {
}
my constant &cross := &infix:<X>;
-proto sub infix:<Z>(|) is pure {*}
+proto sub infix:<Z>(|) is pure { * }
multi sub infix:<Z>(+lol, :&with!) {
Seq.new(Rakudo::Iterator.ZipIterablesOp(lol,&with))
}
diff --git a/src/core/Mu.pm b/src/core/Mu.pm
index dfc726a97..ad4f8e430 100644
--- a/src/core/Mu.pm
+++ b/src/core/Mu.pm
@@ -22,7 +22,7 @@ my class Mu { # declared in BOOTSTRAP
nqp::p6box_i(nqp::where(self))
}
- proto method WHICH(|) {*}
+ proto method WHICH(|) { * }
multi method WHICH(Mu:U:) {
nqp::box_s(
nqp::concat(
@@ -97,7 +97,7 @@ Perhaps it can be found at https://docs.perl6.org/type/$name"
self.HOW.set_why($why);
}
- proto method Bool() {*}
+ proto method Bool() { * }
multi method Bool(Mu:U: --> False) { }
multi method Bool(Mu:D:) { self.defined }
@@ -1075,9 +1075,9 @@ proto sub prefix:<−>(|) is pure { * }
multi sub prefix:<−>(|c) { prefix:<->(|c) }
# These must collapse Junctions
-proto sub so(Mu $) {*}
+proto sub so(Mu $) { * }
multi sub so(Mu $x) { ?$x }
-proto sub not(Mu $) {*}
+proto sub not(Mu $) { * }
multi sub not(Mu $x) { !$x }
Metamodel::ClassHOW.exclude_parent(Mu);
diff --git a/src/core/Num.pm b/src/core/Num.pm
index 1738b39d9..a11f4cbae 100644
--- a/src/core/Num.pm
+++ b/src/core/Num.pm
@@ -117,7 +117,7 @@ my class Num does Real { # declared in BOOTSTRAP
nqp::p6box_n(nqp::exp_n(nqp::unbox_n(self)));
}
- proto method log(|) {*}
+ proto method log(|) { * }
multi method log(Num:D: ) {
nqp::p6box_n(nqp::log_n(nqp::unbox_n(self)));
}
@@ -125,7 +125,7 @@ my class Num does Real { # declared in BOOTSTRAP
self.log() / base.log();
}
- proto method sqrt(|) {*}
+ proto method sqrt(|) { * }
multi method sqrt(Num:D: ) {
nqp::p6box_n(nqp::sqrt_n(nqp::unbox_n(self)));
}
@@ -145,35 +145,35 @@ my class Num does Real { # declared in BOOTSTRAP
!! nqp::fromnum_I(nqp::floor_n(nqp::unbox_n(self)), Int);
}
- proto method sin(|) {*}
+ proto method sin(|) { * }
multi method sin(Num:D: ) {
nqp::p6box_n(nqp::sin_n(nqp::unbox_n(self)));
}
- proto method asin(|) {*}
+ proto method asin(|) { * }
multi method asin(Num:D: ) {
nqp::p6box_n(nqp::asin_n(nqp::unbox_n(self)));
}
- proto method cos(|) {*}
+ proto method cos(|) { * }
multi method cos(Num:D: ) {
nqp::p6box_n(nqp::cos_n(nqp::unbox_n(self)));
}
- proto method acos(|) {*}
+ proto method acos(|) { * }
multi method acos(Num:D: ) {
nqp::p6box_n(nqp::acos_n(nqp::unbox_n(self)));
}
- proto method tan(|) {*}
+ proto method tan(|) { * }
multi method tan(Num:D: ) {
nqp::p6box_n(nqp::tan_n(nqp::unbox_n(self)));
}
- proto method atan(|) {*}
+ proto method atan(|) { * }
multi method atan(Num:D: ) {
nqp::p6box_n(nqp::atan_n(nqp::unbox_n(self)));
}
- proto method sec(|) {*}
+ proto method sec(|) { * }
multi method sec(Num:D: ) {
nqp::p6box_n(nqp::sec_n(nqp::unbox_n(self)));
}
- proto method asec(|) {*}
+ proto method asec(|) { * }
multi method asec(Num:D: ) {
nqp::p6box_n(nqp::asec_n(nqp::unbox_n(self)));
}
@@ -189,56 +189,56 @@ my class Num does Real { # declared in BOOTSTRAP
method acotan(Num:D:) {
nqp::p6box_n(nqp::atan_n(nqp::div_n(1e0, nqp::unbox_n(self))));
}
- proto method sinh(|) {*}
+ proto method sinh(|) { * }
multi method sinh(Num:D: ) {
nqp::p6box_n(nqp::sinh_n(nqp::unbox_n(self)));
}
- proto method asinh(|) {*}
+ proto method asinh(|) { * }
multi method asinh(Num:D: ) {
nqp::isnanorinf(self)
?? self
!! (self + (self * self + 1e0).sqrt).log;
}
- proto method cosh(|) {*}
+ proto method cosh(|) { * }
multi method cosh(Num:D: ) {
nqp::p6box_n(nqp::cosh_n(nqp::unbox_n(self)));
}
- proto method acosh(|) {*}
+ proto method acosh(|) { * }
multi method acosh(Num:D: ) {
self < 1e0
?? NaN
!! (self + (self * self - 1e0).sqrt).log;
}
- proto method tanh(|) {*}
+ proto method tanh(|) { * }
multi method tanh(Num:D: ) {
nqp::p6box_n(nqp::tanh_n(nqp::unbox_n(self)));
}
- proto method atanh(|) {*}
+ proto method atanh(|) { * }
multi method atanh(1e0:) { ∞ }
multi method atanh(Num:D: ) {
((1e0 + self) / (1e0 - self)).log / 2e0;
}
- proto method sech(|) {*}
+ proto method sech(|) { * }
multi method sech(Num:D: ) {
nqp::p6box_n(nqp::sech_n(nqp::unbox_n(self)));
}
- proto method asech(|) {*}
+ proto method asech(|) { * }
multi method asech(Num:D: ) {
(1e0 / self).acosh;
}
- proto method cosech(|) {*}
+ proto method cosech(|) { * }
multi method cosech(Num:D: ) {
nqp::p6box_n(nqp::div_n(1e0, nqp::sinh_n(nqp::unbox_n(self))));
}
- proto method acosech(|) {*}
+ proto method acosech(|) { * }
multi method acosech(Num:D: ) {
(1e0 / self).asinh;
}
- proto method cotanh(|) {*}
+ proto method cotanh(|) { * }
multi method cotanh(Num:D: ) {
nqp::p6box_n(nqp::div_n(1e0, nqp::tanh_n(nqp::unbox_n(self))));
}
- proto method acotanh(|) {*}
+ proto method acotanh(|) { * }
multi method acotanh(Num:D: ) {
(1e0 / self).atanh;
}
diff --git a/src/core/Numeric.pm b/src/core/Numeric.pm
index 49568ab78..ae040c4d6 100644
--- a/src/core/Numeric.pm
+++ b/src/core/Numeric.pm
@@ -10,13 +10,13 @@ my role Numeric {
!! False
}
- proto method log(|) {*}
+ proto method log(|) { * }
multi method log(Numeric:D: Cool $base) { self.log / $base.Numeric.log }
multi method log(Numeric:D: Numeric $base) { self.log / $base.log }
method log10() { self.log / 10e0.log }
- proto method exp(|) {*}
+ proto method exp(|) { * }
multi method exp(Numeric:D: $base) {
$base ** self;
}
@@ -51,121 +51,121 @@ multi sub prefix:<->(\a) { -a.Numeric }
proto sub abs($) is pure { * }
multi sub abs(\a) { abs a.Numeric }
-proto sub sign($) is pure {*}
+proto sub sign($) is pure { * }
multi sub sign(Numeric \x) { x.sign }
multi sub sign(Cool \x) { x.Numeric.sign }
-proto sub log($, $?) is pure {*}
+proto sub log($, $?) is pure { * }
multi sub log(Numeric $x) { $x.log }
multi sub log(Numeric $x, Numeric $base) { $x.log($base) }
multi sub log(Cool $x) { $x.Numeric.log }
multi sub log(Cool $x, Cool $base) { $x.Numeric.log($base.Numeric) }
-proto sub log10($, $?) is pure {*}
+proto sub log10($, $?) is pure { * }
multi sub log10(Numeric $x) { $x.log(10e0) }
multi sub log10(Cool $x) { $x.Numeric.log(10e0) }
-proto sub exp($, $?) is pure {*}
+proto sub exp($, $?) is pure { * }
multi sub exp(Numeric $x) { $x.exp }
multi sub exp(Numeric $x, Numeric $base) { $x.exp($base) }
-proto sub sin($) is pure {*}
+proto sub sin($) is pure { * }
multi sub sin(Numeric \x) { x.sin }
multi sub sin(Cool \x) { x.Numeric.sin }
-proto sub asin($) is pure {*}
+proto sub asin($) is pure { * }
multi sub asin(Numeric \x) { x.asin }
multi sub asin(Cool \x) { x.Numeric.asin }
-proto sub cos($) is pure {*}
+proto sub cos($) is pure { * }
multi sub cos(Numeric \x) { x.cos }
multi sub cos(Cool \x) { x.Numeric.cos }
-proto sub acos($) is pure {*}
+proto sub acos($) is pure { * }
multi sub acos(Numeric \x) { x.acos }
multi sub acos(Cool \x) { x.Numeric.acos }
-proto sub tan($) is pure {*}
+proto sub tan($) is pure { * }
multi sub tan(Numeric \x) { x.tan }
multi sub tan(Cool \x) { x.Numeric.tan }
-proto sub atan($) is pure {*}
+proto sub atan($) is pure { * }
multi sub atan(Numeric \x) { x.atan }
multi sub atan(Cool \x) { x.Numeric.atan }
-proto sub sec($) is pure {*}
+proto sub sec($) is pure { * }
multi sub sec(Numeric \x) { x.sec }
multi sub sec(Cool \x) { x.Numeric.sec }
-proto sub asec($) is pure {*}
+proto sub asec($) is pure { * }
multi sub asec(Numeric \x) { x.asec }
multi sub asec(Cool \x) { x.Numeric.asec }
-proto sub cosec($) is pure {*}
+proto sub cosec($) is pure { * }
multi sub cosec(Numeric \x) { x.cosec }
multi sub cosec(Cool \x) { x.Numeric.cosec }
-proto sub acosec(|) is pure {*}
+proto sub acosec(|) is pure { * }
multi sub acosec(Numeric \x) { x.acosec }
multi sub acosec(Cool \x) { x.Numeric.acosec }
-proto sub cotan($) is pure {*}
+proto sub cotan($) is pure { * }
multi sub cotan(Numeric \x) { x.cotan }
multi sub cotan(Cool \x) { x.Numeric.cotan }
-proto sub acotan($) is pure {*}
+proto sub acotan($) is pure { * }
multi sub acotan(Numeric \x) { x.acotan }
multi sub acotan(Cool \x) { x.Numeric.acotan }
-proto sub sinh($) is pure {*}
+proto sub sinh($) is pure { * }
multi sub sinh(Numeric \x) { x.sinh }
multi sub sinh(Cool \x) { x.Numeric.sinh }
-proto sub asinh($) is pure {*}
+proto sub asinh($) is pure { * }
multi sub asinh(Numeric \x) { x.asinh }
multi sub asinh(Cool \x) { x.Numeric.asinh }
-proto sub cosh($) is pure {*}
+proto sub cosh($) is pure { * }
multi sub cosh(Numeric \x) { x.cosh }
multi sub cosh(Cool \x) { x.Numeric.cosh }
-proto sub acosh($) is pure {*}
+proto sub acosh($) is pure { * }
multi sub acosh(Numeric \x) { x.acosh }
multi sub acosh(Cool \x) { x.Numeric.acosh }
-proto sub tanh($) is pure {*}
+proto sub tanh($) is pure { * }
multi sub tanh(Numeric \x) { x.tanh }
multi sub tanh(Cool \x) { x.Numeric.tanh }
-proto sub atanh($) is pure {*}
+proto sub atanh($) is pure { * }
multi sub atanh(Numeric \x) { x.atanh }
multi sub atanh(Cool \x) { x.Numeric.atanh }
-proto sub sech($) is pure {*}
+proto sub sech($) is pure { * }
multi sub sech(Numeric \x) { x.sech }
multi sub sech(Cool \x) { x.Numeric.sech }
-proto sub asech($) is pure {*}
+proto sub asech($) is pure { * }
multi sub asech(Numeric \x) { x.asech }
multi sub asech(Cool \x) { x.Numeric.asech }
-proto sub cosech($) is pure {*}
+proto sub cosech($) is pure { * }
multi sub cosech(Numeric \x) { x.cosech }
multi sub cosech(Cool \x) { x.Numeric.cosech }
-proto sub acosech($) is pure {*}
+proto sub acosech($) is pure { * }
multi sub acosech(Numeric \x) { x.acosech }
multi sub acosech(Cool \x) { x.Numeric.acosech }
-proto sub cotanh($) is pure {*}
+proto sub cotanh($) is pure { * }
multi sub cotanh(Numeric \x) { x.cotanh }
multi sub cotanh(Cool \x) { x.Numeric.cotanh }
-proto sub acotanh($) is pure {*}
+proto sub acotanh($) is pure { * }
multi sub acotanh(Numeric \x) { x.acotanh }
multi sub acotanh(Cool \x) { x.Numeric.acotanh }
-proto sub sqrt($) is pure {*}
+proto sub sqrt($) is pure { * }
multi sub sqrt(Numeric \x) { x.sqrt }
multi sub sqrt(Cool \x) { x.Numeric.sqrt }
diff --git a/src/core/Proc/Async.pm b/src/core/Proc/Async.pm
index 3ac31d87c..2b531fc81 100644
--- a/src/core/Proc/Async.pm
+++ b/src/core/Proc/Async.pm
@@ -223,7 +223,7 @@ my class Proc::Async {
$enc, Nil, 0, :$translate-nl
}
- proto method bind-stdin($) {*}
+ proto method bind-stdin($) { * }
multi method bind-stdin(IO::Handle:D $handle --> Nil) {
die X::Proc::Async::BindOrUse.new(:handle<stdin>, :use('use :w')) if $!w;
$!stdin-fd := $handle.native-descriptor;
diff --git a/src/core/Rakudo/Internals.pm b/src/core/Rakudo/Internals.pm
index 6a70a2944..433a2d38f 100644
--- a/src/core/Rakudo/Internals.pm
+++ b/src/core/Rakudo/Internals.pm
@@ -470,7 +470,7 @@ my class Rakudo::Internals {
Slip.from-iterator(self.iterator)
}
- proto method AT-POS(|) is raw {*}
+ proto method AT-POS(|) is raw { * }
multi method AT-POS(::?CLASS:U: |c) is raw {
self.Any::AT-POS(|c)
}
@@ -478,7 +478,7 @@ my class Rakudo::Internals {
die "Must specify at least one index with {self.^name}.AT-POS"
}
- proto method ASSIGN-POS(|) {*}
+ proto method ASSIGN-POS(|) { * }
multi method ASSIGN-POS(::?CLASS:U: |c) {
self.Any::ASSIGN-POS(|c)
}
@@ -489,7 +489,7 @@ my class Rakudo::Internals {
die "Must specify at least one index and a value with {self.^name}.ASSIGN-POS"
}
- proto method EXISTS-POS(|) {*}
+ proto method EXISTS-POS(|) { * }
multi method EXISTS-POS(::?CLASS:U: |c) {
self.Any::EXISTS-POS(|c)
}
diff --git a/src/core/Rakudo/Internals/HyperRaceSharedImpl.pm b/src/core/Rakudo/Internals/HyperRaceSharedImpl.pm
index b494c9ef2..dcea196ec 100644
--- a/src/core/Rakudo/Internals/HyperRaceSharedImpl.pm
+++ b/src/core/Rakudo/Internals/HyperRaceSharedImpl.pm
@@ -127,7 +127,7 @@ class Rakudo::Internals::HyperRaceSharedImpl {
}
}
- proto method rehyper($, $) {*}
+ proto method rehyper($, $) { * }
multi method rehyper(HyperSeq \hyper, \seq) {
my \conf = hyper.configuration;
seq.hyper(:degree(conf.degree), :batch(conf.batch))
diff --git a/src/core/Rakudo/Internals/JSON.pm b/src/core/Rakudo/Internals/JSON.pm
index 917348c71..5f33da796 100644
--- a/src/core/Rakudo/Internals/JSON.pm
+++ b/src/core/Rakudo/Internals/JSON.pm
@@ -97,7 +97,7 @@ my class Rakudo::Internals::JSON {
}
- proto sub to-json(|) {*}
+ proto sub to-json(|) { * }
multi sub to-json(Version:D $v, :$indent = 0, :$first = 0) { to-json(~$v, :$indent, :$first) }
multi sub to-json(Real:D $d, :$indent = 0, :$first = 0) { (' ' x $first) ~ ~$d }
diff --git a/src/core/Range.pm b/src/core/Range.pm
index 603a13600..51cbf6380 100644
--- a/src/core/Range.pm
+++ b/src/core/Range.pm
@@ -21,7 +21,7 @@ my class Range is Cool does Iterable does Positional {
# The order of "method new" declarations matters here, to ensure
# appropriate candidate tiebreaking when mixed type arguments
# are present (e.g., Range,Whatever or Real,Range).
- proto method new(|) {*}
+ proto method new(|) { * }
multi method new(Range $min, \max, :$excludes-min, :$excludes-max) {
X::Range::InvalidArg.new(:got($min)).throw;
}
diff --git a/src/core/Real.pm b/src/core/Real.pm
index 380870201..c3dc61acd 100644
--- a/src/core/Real.pm
+++ b/src/core/Real.pm
@@ -13,7 +13,7 @@ my role Real does Numeric {
method acos() { self.Bridge.acos }
method tan() { self.Bridge.tan }
method atan() { self.Bridge.atan }
- proto method atan2(|) {*}
+ proto method atan2(|) { * }
multi method atan2(Real $x = 1e0) { self.Bridge.atan2($x.Bridge) }
multi method atan2(Cool $x = 1e0) { self.Bridge.atan2($x.Numeric.Bridge) }
method sec() { self.Bridge.sec }
@@ -52,10 +52,10 @@ my role Real does Numeric {
Complex.new(self.cos, self.sin);
}
method Complex() { Complex.new(self.Num, 0e0) }
- proto method log(|) {*}
+ proto method log(|) { * }
multi method log(Real:D: ) { self.Bridge.log }
multi method log(Real:D: Real $base) { self.Bridge.log($base.Bridge) }
- proto method exp(|) {*}
+ proto method exp(|) { * }
multi method exp(Real:D: ) { self.Bridge.exp }
method truncate(Real:D:) {
self == 0 ?? 0 !! self < 0 ?? self.ceiling !! self.floor
@@ -127,7 +127,7 @@ my role Real does Numeric {
multi method Str(Real:D:) { self.Bridge.Str }
}
-proto sub cis($) {*}
+proto sub cis($) { * }
multi sub cis(Real $a) { $a.cis }
multi sub infix:<+>(Real \a, Real \b) { a.Bridge + b.Bridge }
@@ -160,7 +160,7 @@ multi sub prefix:<->(Real:D \a) { -a.Bridge }
# NOTE: According to the spec, infix:<mod> is "Not coercive,
# so fails on differing types." Thus no casts here.
-proto sub infix:<mod>($, $) is pure {*}
+proto sub infix:<mod>($, $) is pure { * }
multi sub infix:<mod>(Real $a, Real $b) {
$a - ($a div $b) * $b;
}
@@ -169,7 +169,7 @@ multi sub abs(Real \a) {
a < 0 ?? -a !! a;
}
-proto sub truncate($) {*}
+proto sub truncate($) { * }
multi sub truncate(Real:D $x) { $x.truncate }
multi sub truncate(Cool:D $x) { $x.Numeric.truncate }
@@ -181,7 +181,7 @@ multi sub atan2(Real \a, Real \b = 1e0) { a.Bridge.atan2(b.Bridge) }
# of ambiguous dispatches. So just go with (Any, Any) for now.
multi sub atan2( \a, \b = 1e0) { a.Numeric.atan2(b.Numeric) }
-proto sub unpolar($, $) {*}
+proto sub unpolar($, $) { * }
multi sub unpolar(Real $mag, Real $angle) { $mag.unpolar($angle) }
# vim: ft=perl6 expandtab sw=4
diff --git a/src/core/ShapedArray.pm b/src/core/ShapedArray.pm
index 2db7a9abe..f0f605f19 100644
--- a/src/core/ShapedArray.pm
+++ b/src/core/ShapedArray.pm
@@ -129,7 +129,7 @@
)
}
- proto method DELETE-POS(|) {*}
+ proto method DELETE-POS(|) { * }
multi method DELETE-POS(::?CLASS:U: |c) {
self.Any::DELETE-POS(|c)
}
@@ -177,7 +177,7 @@
)
}
- proto method BIND-POS(|) is raw {*}
+ proto method BIND-POS(|) is raw { * }
multi method BIND-POS(::?CLASS:U: |c) is raw {
self.Any::BIND-POS(|c)
}
diff --git a/src/core/Str.pm b/src/core/Str.pm
index 1a955940e..0c3793573 100644
--- a/src/core/Str.pm
+++ b/src/core/Str.pm
@@ -135,14 +135,14 @@ my class Str does Stringy { # declared in BOOTSTRAP
}
# TODO Use coercer in 1 candidate when RT131014
- proto method starts-with(|) {*}
+ proto method starts-with(|) { * }
multi method starts-with(Str:D: Cool:D $needle) {self.starts-with: $needle.Str}
multi method starts-with(Str:D: Str:D $needle) {
nqp::p6bool(nqp::eqat(self, $needle, 0))
}
# TODO Use coercer in 1 candidate when RT131014
- proto method ends-with(|) {*}
+ proto method ends-with(|) { * }
multi method ends-with(Str:D: Cool:D $suffix) {self.ends-with: $suffix.Str}
multi method ends-with(Str:D: Str:D $suffix) {
nqp::p6bool(nqp::eqat(
@@ -153,7 +153,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
}
# TODO Use coercer in 1 candidate when RT131014
- proto method substr-eq(|) {*}
+ proto method substr-eq(|) { * }
multi method substr-eq(Str:D: Cool:D $needle) {self.substr-eq: $needle.Str}
multi method substr-eq(Str:D: Str:D $needle) {
nqp::p6bool(nqp::eqat($!value,nqp::getattr($needle,Str,'$!value'),0))
@@ -169,7 +169,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
}
# TODO Use coercer in 1 candidate when RT131014
- proto method contains(|) {*}
+ proto method contains(|) { * }
multi method contains(Str:D: Cool:D $needle) {self.contains: $needle.Str}
multi method contains(Str:D: Str:D $needle) {
nqp::p6bool(nqp::isne_i(
@@ -188,7 +188,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
}
# TODO Use coercer in 1 candidate when RT131014
- proto method indices(|) {*}
+ proto method indices(|) { * }
multi method indices(Str:D: Cool:D $needle, *%pars) {self.indices: $needle.Str, |%pars}
multi method indices(Str:D: Str:D $needle, :$overlap) {
nqp::stmts(
@@ -233,7 +233,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
}
# TODO Use coercer in 1 candidate when RT131014
- proto method index(|) {*}
+ proto method index(|) { * }
multi method index(Str:D: Cool:D $needle) {self.index: $needle.Str}
multi method index(Str:D: Str:D $needle) {
nqp::if(
@@ -273,7 +273,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
}
# TODO Use coercer in 1 candidate when RT131014
- proto method rindex(|) {*}
+ proto method rindex(|) { * }
multi method rindex(Str:D: Cool:D $needle) {self.rindex: $needle.Str}
multi method rindex(Str:D: Str:D $needle) {
nqp::if(
@@ -947,7 +947,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
))
}
- proto method match(|) { $/ := nqp::getlexcaller('$/'); {*} }
+ proto method match(|) { $/ := nqp::getlexcaller('$/'); { * } }
multi method match(Cool:D $pattern, |c) {
$/ := nqp::getlexcaller('$/');
self.match(/ "$pattern": /,|c)
@@ -1085,7 +1085,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
proto method subst-mutate(|) {
$/ := nqp::getlexcaller('$/');
- {*}
+ { * }
}
multi method subst-mutate(
Str:D $self is rw: Any:D $matcher, $replacement,
@@ -1133,7 +1133,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
proto method subst(|) {
$/ := nqp::getlexcaller('$/');
- {*}
+ { * }
}
multi method subst(Str:D: Str:D $original, Str:D $final, *%options) {
nqp::if(
@@ -2214,7 +2214,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
}.new(self));
}
- proto method encode(|) {*}
+ proto method encode(|) { * }
multi method encode(Str:D $encoding = 'utf8', :$replacement, Bool() :$translate-nl = False) {
Encoding::Registry.find($encoding)
.encoder(:$replacement, :$translate-nl)
@@ -2249,7 +2249,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
});
}
- proto method trans(|) { $/ := nqp::getlexcaller('$/'); {*} }
+ proto method trans(|) { $/ := nqp::getlexcaller('$/'); { * } }
multi method trans(Str:D: Pair:D \what, *%n) {
my $from = what.key;
my $to = what.value;
@@ -2605,7 +2605,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
LSM.new(self,$substitutions,$squash,$complement).result;
}
}
- proto method indent($) {*}
+ proto method indent($) { * }
# Zero indent does nothing
multi method indent(Int() $steps where { $_ == 0 }) {
self;
@@ -3103,7 +3103,7 @@ multi sub infix:<eqv>(Str:D \a, Str:D \b) {
)
}
-proto sub samemark(|) {*}
+proto sub samemark(|) { * }
multi sub samemark($s, $pat) { $s.samemark($pat) }
# vim: ft=perl6 expandtab sw=4
diff --git a/src/core/array_operators.pm b/src/core/array_operators.pm
index 3f8ae565e..4160a0533 100644
--- a/src/core/array_operators.pm
+++ b/src/core/array_operators.pm
@@ -53,10 +53,10 @@ multi circumfix:<[ ]>(Mu \x) { # really only for [$foo]
)
}
-proto sub pop(@) {*}
+proto sub pop(@) { * }
multi sub pop(@a) { @a.pop }
-proto sub shift(@) {*}
+proto sub shift(@) { * }
multi sub shift(@a) { @a.shift }
sub push (\a, |elems) { a.push: |elems }
diff --git a/src/core/atomicops.pm b/src/core/atomicops.pm
index 7f4165549..8d2479adb 100644
--- a/src/core/atomicops.pm
+++ b/src/core/atomicops.pm
@@ -1,22 +1,22 @@
#-- fetching a value atomically
-proto sub atomic-fetch($) {*}
+proto sub atomic-fetch($) { * }
multi sub atomic-fetch($source is rw) {
nqp::atomicload($source)
}
-proto sub prefix:<⚛>($) {*}
+proto sub prefix:<⚛>($) { * }
multi sub prefix:<⚛>($source is rw) {
nqp::atomicload($source)
}
#-- assigning a value atomically
-proto sub atomic-assign($, $) {*}
+proto sub atomic-assign($, $) { * }
multi sub atomic-assign($target is rw, \value) {
nqp::atomicstore($target, value)
}
#-- atomic compare and swap
-proto sub cas(|) {*}
+proto sub cas(|) { * }
multi sub cas($target is rw, \expected, \value) {
nqp::cas($target, expected, value)
}
@@ -54,7 +54,7 @@ multi sub atomic-assign(atomicint $target is rw, $value) {
nqp::atomicstore_i($target, $value.Int)
}
-proto sub infix:<⚛=>($, $) {*}
+proto sub infix:<⚛=>($, $) { * }
multi sub infix:<⚛=>($target is rw, \value) {
nqp::atomicstore($target, value)
}
@@ -103,7 +103,7 @@ sub prefix:<--⚛>(atomicint $target is rw --> atomicint) {
}
#-- atomically fetch value and then add given value to it
-proto sub atomic-fetch-add($, $) {*}
+proto sub atomic-fetch-add($, $) { * }
multi sub atomic-fetch-add(atomicint $target is rw, int $add --> atomicint) {
nqp::atomicadd_i($target, $add)
}
@@ -115,7 +115,7 @@ multi sub atomic-fetch-add(atomicint $target is rw, $add --> atomicint) {
}
#-- atomically add given value to value and return that
-proto sub atomic-add-fetch($, $) {*}
+proto sub atomic-add-fetch($, $) { * }
multi sub atomic-add-fetch(atomicint $target is rw, int $add --> atomicint) {
my atomicint $ = nqp::atomicadd_i($target, $add) + $add
}
@@ -127,7 +127,7 @@ multi sub atomic-add-fetch(atomicint $target is rw, $add --> atomicint) {
my atomicint $ = nqp::atomicadd_i($target, $add-int) + $add-int
}
-proto sub infix:<⚛+=>($, $) {*}
+proto sub infix:<⚛+=>($, $) { * }
multi sub infix:<⚛+=>(atomicint $target is rw, int $add --> atomicint) {
my atomicint $ = nqp::atomicadd_i($target, $add) + $add
}
@@ -140,7 +140,7 @@ multi sub infix:<⚛+=>(atomicint $target is rw, $add --> atomicint) {
}
#-- atomically fetch value and then subtract given value from it
-proto sub atomic-fetch-sub($, $) {*}
+proto sub atomic-fetch-sub($, $) { * }
multi sub atomic-fetch-sub(atomicint $target is rw, int $add --> atomicint) {
nqp::atomicadd_i($target, nqp::neg_i($add))
}
@@ -152,7 +152,7 @@ multi sub atomic-fetch-sub(atomicint $target is rw, $add --> atomicint) {
}
#-- atomically subtract given value from value and return that
-proto sub atomic-sub-fetch($, $) {*}
+proto sub atomic-sub-fetch($, $) { * }
multi sub atomic-sub-fetch(atomicint $target is rw, int $add --> atomicint) {
my atomicint $ = nqp::atomicadd_i($target, nqp::neg_i($add)) - $add
}
@@ -164,7 +164,7 @@ multi sub atomic-sub-fetch(atomicint $target is rw, $add --> atomicint) {
my atomicint $ = nqp::atomicadd_i($target, $add-int) + $add-int
}
-proto sub infix:<⚛-=>($, $) {*}
+proto sub infix:<⚛-=>($, $) { * }
multi sub infix:<⚛-=>(atomicint $target is rw, int $add --> atomicint) {
my atomicint $ = nqp::atomicadd_i($target, nqp::neg_i($add)) - $add
}
diff --git a/src/core/control.pm b/src/core/control.pm
index 79563f353..9f4358567 100644
--- a/src/core/control.pm
+++ b/src/core/control.pm
@@ -29,7 +29,7 @@ sub RETURN-LIST(Mu \list) is raw {
!! list)
}
-proto sub return-rw(|) {*}
+proto sub return-rw(|) { * }
multi sub return-rw(--> Nil) {
nqp::throwpayloadlexcaller(nqp::const::CONTROL_RETURN, Nil);
}
@@ -39,7 +39,7 @@ multi sub return-rw(Mu \x --> Nil) {
multi sub return-rw(**@x is raw --> Nil) {
nqp::throwpayloadlexcaller(nqp::const::CONTROL_RETURN, @x);
}
-proto sub return(|) {*}
+proto sub return(|) { * }
multi sub return(--> Nil) {
nqp::throwpayloadlexcaller(nqp::const::CONTROL_RETURN, Nil);
}
@@ -163,7 +163,7 @@ sub done(--> Nil) {
THROW-NIL(nqp::const::CONTROL_DONE);
}
-proto sub die(|) {*};
+proto sub die(|) { * };
multi sub die(--> Nil) {
my $stash := CALLER::;
my $payload = $stash<$!>.DEFINITE ?? $stash<$!> !! "Died";
diff --git a/src/core/io_operators.pm b/src/core/io_operators.pm
index 4245b8f3a..15d3275e7 100644
--- a/src/core/io_operators.pm
+++ b/src/core/io_operators.pm
@@ -134,7 +134,7 @@ sub chdir(|c) {
nqp::if(nqp::istype(($_ := $*CWD.chdir(|c)), Failure), $_, $*CWD = $_)
}
-proto sub indir(|) {*}
+proto sub indir(|) { * }
multi sub indir(IO() $path, &what, :$test!) {
DEPRECATED(
:what<:$test argument>,
diff --git a/src/core/metaops.pm b/src/core/metaops.pm
index e70494542..0a1476683 100644
--- a/src/core/metaops.pm
+++ b/src/core/metaops.pm
@@ -483,7 +483,7 @@ sub METAOP_HYPER(\op, *%opt) {
-> Mu \a, Mu \b { HYPER(op, a, b, |%opt) }
}
-proto sub METAOP_HYPER_POSTFIX(|) {*}
+proto sub METAOP_HYPER_POSTFIX(|) { * }
multi sub METAOP_HYPER_POSTFIX(\op) {
nqp::if(
nqp::can(op,"nodal"),
@@ -493,7 +493,7 @@ multi sub METAOP_HYPER_POSTFIX(\op) {
}
# no indirection for subscripts and such
-proto sub METAOP_HYPER_POSTFIX_ARGS(|) {*}
+proto sub METAOP_HYPER_POSTFIX_ARGS(|) { * }
multi sub METAOP_HYPER_POSTFIX_ARGS(\obj,\op) {
nqp::if(
nqp::can(op,"nodal"),
diff --git a/src/core/operators.pm b/src/core/operators.pm
index ae17de917..1cc23bd6d 100644
--- a/src/core/operators.pm
+++ b/src/core/operators.pm
@@ -812,7 +812,7 @@ multi sub trait_mod:<is>(Routine $r, Str :$looser!) {
die "Routine given to looser does not appear to be an operator";;
}
-proto sub infix:<∘> (&?, &?) {*}
+proto sub infix:<∘> (&?, &?) { * }
multi sub infix:<∘> () { *.self }
multi sub infix:<∘> (&f) { &f }
multi sub infix:<∘> (&f, &g --> Block:D) {
diff --git a/src/core/set_elem.pm b/src/core/set_elem.pm
index ba908f72e..9537358a0 100644
--- a/src/core/set_elem.pm
+++ b/src/core/set_elem.pm
@@ -6,7 +6,7 @@
# ∋ contains
# ∌ does NOT contain
-proto sub infix:<(elem)>($, $ --> Bool:D) is pure {*}
+proto sub infix:<(elem)>($, $ --> Bool:D) is pure { * }
multi sub infix:<(elem)>(Str:D $a, Map:D $b --> Bool:D) {
nqp::p6bool(
(my $storage := nqp::getattr(nqp::decont($b),Map,'$!storage'))
diff --git a/src/core/set_precedes.pm b/src/core/set_precedes.pm
index cbe28d452..81c7e5ad2 100644
--- a/src/core/set_precedes.pm
+++ b/src/core/set_precedes.pm
@@ -12,7 +12,7 @@ proto sub infix:<<(<+)>>($, $ --> Bool:D) is pure {
:what("Set operator {$*WHAT // "(<+)"}"),
:up( 1 + ?$*WHAT )
);
- {*}
+ { * }
}
multi sub infix:<<(<+)>>(Setty:D \a, QuantHash:D \b --> Bool:D) {
nqp::if(
diff --git a/src/core/set_proper_subset.pm b/src/core/set_proper_subset.pm
index c55e9ca12..ecec6a533 100644
--- a/src/core/set_proper_subset.pm
+++ b/src/core/set_proper_subset.pm
@@ -6,7 +6,7 @@
# ⊃ is a proper superset of
# ⊅ is NOT a proper superset of
-proto sub infix:<<(<)>>($, $ --> Bool:D) is pure {*}
+proto sub infix:<<(<)>>($, $ --> Bool:D) is pure { * }
multi sub infix:<<(<)>>(Setty:D $a, Setty:D $b --> Bool:D) {
nqp::if(
nqp::eqaddr(nqp::decont($a),nqp::decont($b)),
diff --git a/src/core/set_subset.pm b/src/core/set_subset.pm
index 2c36780d3..1eafd19bb 100644
--- a/src/core/set_subset.pm
+++ b/src/core/set_subset.pm
@@ -6,7 +6,7 @@
# ⊇ is a superset of
# ⊉ is NOT a superset of
-proto sub infix:<<(<=)>>($, $ --> Bool:D) is pure {*}
+proto sub infix:<<(<=)>>($, $ --> Bool:D) is pure { * }
multi sub infix:<<(<=)>>(Setty:D $a, Setty:D $b --> Bool:D) {
nqp::stmts(
nqp::unless(
diff --git a/t/04-nativecall/18-routine-sig-sanity.t b/t/04-nativecall/18-routine-sig-sanity.t
index c37c8d1da..df918a75e 100644
--- a/t/04-nativecall/18-routine-sig-sanity.t
+++ b/t/04-nativecall/18-routine-sig-sanity.t
@@ -115,11 +115,11 @@ lives-ok {testr(&goodstrencoded)}, "Taking an encoded Str is fine";
lives-ok {testr(&goodretstrencoded)}, "Returning an encoded Str is fine";
# TODO rewrite this test to test for a warning instead of a fatal error:
-#eval-dies-ok 'use NativeCall; sub test(Int $a) is native("fake") {*};', "Bad trait declaration";
+#eval-dies-ok 'use NativeCall; sub test(Int $a) is native("fake") { * };', "Bad trait declaration";
-eval-lives-ok 'use NativeCall; sub test2(int32 $a) is native("fake") {*};', "Good trait declaration";
-eval-lives-ok 'use NativeCall; class A is repr("CPointer") { sub foo(A $a) is native("fake") {*} }', "Embeded type";
-eval-lives-ok 'use NativeCall; sub foo() is native("fake") {*}', "Void function";
+eval-lives-ok 'use NativeCall; sub test2(int32 $a) is native("fake") { * };', "Good trait declaration";
+eval-lives-ok 'use NativeCall; class A is repr("CPointer") { sub foo(A $a) is native("fake") { * } }', "Embeded type";
+eval-lives-ok 'use NativeCall; sub foo() is native("fake") { * }', "Void function";
eval-lives-ok 'use NativeCall; class Piko { method All_The_Things(int8, int16, int32, long, num32, num64) returns long is native("./11-cpp") is nativeconv("thisgnu") { * }}', "Method are silly";
eval-lives-ok 'use NativeCall; sub p5_str_to_sv(int32, long, Blob) is native("foo") { * };', "Blob should work";
eval-lives-ok 'use NativeCall; class Foo is repr("CPointer") {sub foo() returns Foo is native("foo") { * } }', "Return a type in its definition";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment