Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tests for RT #74490, return value of named method declarations
  • Loading branch information
moritz committed Oct 1, 2011
1 parent 4a42b2e commit 7b0b34d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S12-methods/instance.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 35;
plan 37;

=begin pod
Expand Down Expand Up @@ -219,4 +219,15 @@ is AnonInvocant.new().me, AnonInvocant, 'a typed $: as invocant is OK';
is $tracker, 42, 'nested methods work';
}

# RT #74490
{
my $tracker;
class HasMethod {
$tracker = method foo() { };
}
isa_ok $tracker, Method,
'a named method definition inside a class returns a Method';
is $tracker.name, 'foo', '... and that method knows its name';
}

# vim: ft=perl6

0 comments on commit 7b0b34d

Please sign in to comment.