Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

warning suppression, mostly "not used"

  • Loading branch information...
commit 89f0409efc445de8b9ad437daf65532a5195eb6b 1 parent e6ba01a
Larry Wall TimToady authored
4 S02-types/subset.t
View
@@ -192,7 +192,7 @@ lives_ok { my Bug::RT80930 $rt80930 }, 'subset with "::" in the name';
#?niecza skip 'Methods must be used in some kind of package'
{
subset FooStr of Str where /^foo/;
- multi method uc(FooStr $self:) { return "OH HAI" };
+ my multi method uc(FooStr $self:) { return "OH HAI" }; #OK not used
is "foo".uc, 'FOO', 'multi method with subset invocants do not magically find their way into the method dispatch';
}
@@ -204,7 +204,7 @@ my $a = 1;
my $a = 3;
sub producer {
my $a = 2;
- sub bar($x where $a ) { $x }
+ sub bar($x where $a ) { $x } #OK not used
}
my &bar := producer();
lives_ok { bar(2) }, 'where-constraint picks up the right lexical (+)';
2  S03-binding/scalars.t
View
@@ -159,7 +159,7 @@ eval_dies_ok '0 := 1', 'cannot bind to a literal';
# RT #89484
{
my $x = 5;
- sub f($y) { $x := 5 }
+ sub f($y) { $x := 5 } #OK not used
f($x);
is $x, 5, 'interaction between signature binding and ordinary binding';
}
4 S03-operators/assign.t
View
@@ -907,7 +907,7 @@ sub l () { 1, 2 };
{
class A {};
my $x = ['a'];
- multi infix:<=> (A $a, Str $value) { $x.push: $value; }
+ multi infix:<=> (A $a, Str $value) { $x.push: $value; } #OK not used
(A.new() = 'b');
is $x.join(','), 'a,b', 'New multi infix:<=> works';
$x = 'c';
@@ -918,7 +918,7 @@ sub l () { 1, 2 };
# RT #77142
{
my $cc = 0;
- sub called($ignored) {
+ sub called($ignored) { #OK not used
$cc = 1;
};
2  S03-operators/nesting.t
View
@@ -14,7 +14,7 @@ is sort( &[<=>], <5 3 2 1 4> ), <1 2 3 4 5>, 'sort works using &[<=>]';
#?niecza skip 'undeclared name [+]'
is &[+](1, 2), 3, '&[+] as a function';
-is 1 [+] 2, 3, '[+] as an infix';
+is 1 [+] 2, 3, '[+] as an infix'; #OK Useless
# test nesting with Rop -- tests stolen from reverse.t and nested in various ways
2  S04-exceptions/fail.t
View
@@ -65,7 +65,7 @@ plan 13;
{
class AnEx is Exception { };
- my $f = (sub f { fail AnEx.new }).();
+ my $f = (sub f { fail AnEx.new }).(); #OK not used
isa_ok $f.exception, AnEx, 'can fail() typed exceptions';
}
2  S05-grammar/protoregex.t
View
@@ -78,7 +78,7 @@ grammar LTM {
proto token declok {*}
token declok:sym<a> {
- :my $x := 42;
+ :my $x := 42; #OK not used
.+
}
token declok:sym<b> { aa }
2  S05-mass/rx.t
View
@@ -3,7 +3,7 @@ use Test;
plan 733;
### for now
-sub matchcheck(*@a) { 1 }
+sub matchcheck(*@) { 1 }
# L<S05/Backtracking control/"To force the preceding atom to do no
# backtracking">
7 S05-match/capturing-contexts.t
View
@@ -42,8 +42,8 @@ plan 38;
#?niecza skip 'rule declaration outside of grammar'
{
augment class Match { method keys () {return %(self).keys }; };
- rule a {H};
- "Hello" ~~ /<a>/;
+ my rule a {H};
+ "Hello" ~~ /<a=&a>/;
is $/.keys, 'a', 'get rule result';
my $x = $/;
is $x.keys, 'a', 'match copy should be same as match';
@@ -118,9 +118,8 @@ is_run( q{'aa' ~~ /(.)$1/},
}
# RT #72956
-#?niecza skip 'Unsupported use of $/ variable as input record separator'
{
- $/ = Any;
+ $/ := Any;
lives_ok { $0 },
'$0 accessible when $/ is undefined';
ok $0 === Any,
2  S06-macros/quasi-blocks.t
View
@@ -57,7 +57,7 @@ plan 12;
# macro defined as an operator, and used as one
{
- macro infix:<comet>($rhs, $lhs) {
+ macro infix:<comet>($rhs, $lhs) { #OK not used
quasi { "comet!" }
}
2  S06-multi/lexical-multis.t
View
@@ -56,7 +56,7 @@ dies_ok { eval("waz('vtak')") }, '...but lexical multi no longer callable';
# RT #78208
{
- dies_ok { multi foo() { }; multi foo($x) { }; +&foo }, 'RT #78208'
+ dies_ok { multi foo() { }; multi foo($x) { }; +&foo }, 'RT #78208'; #OK not used
}
# vim: ft=perl6 :
4 S06-multi/positional-vs-named.t
View
@@ -64,8 +64,8 @@ is( wind('f', 'g', her => 3), 'pos f pos g her 3', 'pos, pos, named');
#?rakudo skip 'slurpy and named interaction'
{
# a nom bug
- multi catch(*@all ) { 1 }
- multi catch(*@all, :$really! ) { 2 }
+ multi catch(*@all ) { 1 } #OK not used
+ multi catch(*@all, :$really! ) { 2 } #OK not used
is catch(0, 5), 1, 'slurpy and named interact well (1)';
is catch(0, 5, :!really), 2, 'slurpy and named interact well (2)';
}
8 S06-multi/proto.t
View
@@ -5,10 +5,10 @@ plan 17;
# Test for proto definitions
class A { }
class B { }
-proto foo($x) { * }
-multi foo(A $x) { 2 }
-multi foo(B $x) { 3 }
-multi foo($x) { 1 }
+proto foo($x) { * } #OK not used
+multi foo(A $x) { 2 } #OK not used
+multi foo(B $x) { 3 } #OK not used
+multi foo($x) { 1 } #OK not used
is(foo(A.new), 2, 'dispatch on class worked');
is(foo(B.new), 3, 'dispatch on class worked');
is(foo(42), 1, 'dispatch with no possible candidates fell back to proto');
4 S06-multi/type-based.t
View
@@ -205,8 +205,8 @@ is(mmd(1..3), 2, 'Slurpy MMD to listop via list');
#?niecza skip 'no native types yet'
{
# This once wrongly reported a multi-dispatch circularity.
- multi rt107638(int $a) { 'ok' }
- multi rt107638(Str $a where 1) { }
+ multi rt107638(int $a) { 'ok' } #OK not used
+ multi rt107638(Str $a where 1) { } #OK not used
ok rt107638(1), 'native types and where clauses do not cause spurious circularities';
}
4 S06-multi/value-based.t
View
@@ -35,14 +35,14 @@ plan 12;
# RT #88562
{
multi m3(0 , $ ) { 'a' };
- multi m3(Int $n, Str $a = 'A') { 'b' };
+ multi m3(Int $n, Str $a = 'A') { 'b' }; #OK not used
is m3(2, 'A'), 'b', 'literal Int, anonymous parameters and default values mix';
}
{
multi sub foo(0, $) { 'B' };
- multi sub foo(Int $n, Str $a="A") { $a };
+ multi sub foo(Int $n, Str $a="A") { $a }; #OK not used
is foo(2,"A"), 'A', 'Literals and optionals mix';
}
5 S06-operator-overloading/sub.t
View
@@ -94,7 +94,7 @@ Testing operator overloading subroutines
}
{
- sub infix:«_<_ »($one, $two) { return 42 }
+ sub infix:«_<_ »($one, $two) { return 42 } #OK not used
is 3 _<_ 5, 42, "frenchquoted infix sub";
}
@@ -218,12 +218,13 @@ Testing operator overloading subroutines
class MyClass {
method prefix:<~> is export { "hi" }
method prefix:<+> is export { 42 }
- method infix:<as>($self, OtherClass $to) is export {
+ method infix:<as>($self: OtherClass $to) is export { #OK not used
my $obj = $to.new;
$obj.x = 23;
return $obj;
}
}
+ import MyClass; # should import that sub forms of the exports
my $obj;
lives_ok { $obj = MyClass.new }, "instantiation of a prefix:<...> and infix:<as> overloading class worked";
4 S06-signature/arity.t
View
@@ -147,7 +147,7 @@ dies_ok { eval("a_zero( 'hello', 'world' )") }, 'no matching sub signature';
# RT #111646
#?pugs 2 skip '.count'
-is (-> *@a { }).count, Inf, 'slurpy positional causes infinite count';
-is (-> *%a { }).count, 0, 'slurpy named causes no count change';
+is (-> *@a { }).count, Inf, 'slurpy positional causes infinite count'; #OK not used
+is (-> *%a { }).count, 0, 'slurpy named causes no count change'; #OK not used
# vim: ft=perl6
2  S06-signature/optional.t
View
@@ -93,7 +93,7 @@ eval_dies_ok 'sub opt($a = 1, $b) { }',
sub opt-type1(Int $x?) { $x };
ok opt-type1() === Int,
'optional param with type constraints gets the right value';
- sub opt-type2(Int $x = 'str') { };
+ sub opt-type2(Int $x = 'str') { }; #OK not used
dies_ok { eval('opt-type2()') }, 'default values are type-checked';
}
2  S06-traits/is-copy.t
View
@@ -87,7 +87,7 @@ plan 22;
# RT #74454
{
- sub g(%hash? is copy) { };
+ sub g(%hash? is copy) { }; #OK not used
lives_ok { g() }, 'can call a sub with an optional "is copy" hash param';
}
2  S12-introspection/definite.t
View
@@ -24,4 +24,4 @@ class C {
method DEFINITE() { True }
}
is C.DEFINITE, False, "Class declaring DEFINITE method doesn't influence .DEFINITE macro";
-is C."DEFINITE"(), True, "Quoting lets us call the method, however";
+is C."DEFINITE"(), True, "Quoting lets us call the method, however"; #OK Useless
2  S12-methods/private.t
View
@@ -86,7 +86,7 @@ dies_ok {$o."b"() }, 'can not call private method via quotes from outside'; #
class RT101964 {
has @!c;
method foo { self!bar(@!c) }
- method !bar(@r) {
+ method !bar(@r) { #OK not used
'OH HAI';
}
}
2  S14-traits/routines.t
View
@@ -55,7 +55,7 @@ plan 12;
# RT 112664
{
multi trait_mod:<is>($m, :$a!) {
- multi y(|) { my $x = $m }
+ multi y(|) { my $x = $m } #OK not used
$m.wrap(&y)
}
sub rt112664 is a {}
2  S16-filehandles/filetest.t
View
@@ -112,7 +112,7 @@ unlink "empty_file";
# potential parsing difficulties (pugs)
{
- sub f($x) { return 8; }
+ sub f($) { return 8; }
is(f($*PROGRAM_NAME), 8, "f(...) works");
is(-f($*PROGRAM_NAME), -8, "- f(...) does not call the ~~:f filetest");
2  S32-list/reduce.t
View
@@ -65,7 +65,7 @@ eval_lives_ok( 'reduce -> $a, $b, $c? { $a + $b * ($c//1) }, 1, 2', 'Use proper
# RT #66352
{
multi a (Str $a, Str $b) { [+$a, +$b] };
- multi a (Array $a,$b where "+") { [+] @($a) };
+ multi a (Array $a,$b where "+") { [+] @($a) }; #OK not used
is ("1", "2", "+").reduce(&a), 3, 'reduce and multi subs';
}
Please sign in to comment.
Something went wrong with that request. Please try again.