Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
post constraints on parameters should'nt affect a sub's declarative docs
  • Loading branch information
hoelzro committed Jun 23, 2015
1 parent 6f6461b commit af92bda
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
8 changes: 7 additions & 1 deletion S26-documentation/why-both.t
@@ -1,5 +1,5 @@
use Test;
plan 277;
plan 284;

my $pod_index = 0;

Expand Down Expand Up @@ -296,4 +296,10 @@ our $fancy-var = 17;
test-both($fancy-var.VAR, 'Very', 'fancy!');
)

#| where constraints shouldn't
sub has-where(Int $n where * > 10) {}
#= prevent declarative comments

test-both(&has-where, "where constraints shouldn't", 'prevent declarative comments');

is $=pod.elems, $pod_index;
7 changes: 6 additions & 1 deletion S26-documentation/why-leading.t
@@ -1,5 +1,5 @@
use Test;
plan 341;
plan 348;

my $pod_index = 0;

Expand Down Expand Up @@ -310,4 +310,9 @@ our $fancy-var = 17;
test-leading($fancy-var.VAR, 'Very fancy!');
)

#| where constraints shouldn't prevent declarative comments
sub has-where(Int $n where * > 10) {}

test-leading(&has-where, "where constraints shouldn't prevent declarative comments");

is $=pod.elems, $pod_index;
8 changes: 7 additions & 1 deletion S26-documentation/why-trailing.t
@@ -1,5 +1,5 @@
use Test;
plan 334;
plan 341;

my $pod_index = 0;

Expand Down Expand Up @@ -300,4 +300,10 @@ our $fancy-var = 17;
test-trailing($fancy-var.VAR, 'Very fancy!');
)

# RT #125253
sub has-where(Int $n where * > 10) {}
#= where constraints shouldn't prevent declarative comments

test-trailing(&has-where, "where constraints shouldn't prevent declarative comments");

is $=pod.elems, $pod_index;

0 comments on commit af92bda

Please sign in to comment.