Permalink
Browse files

tests for RT #74490, return value of named method declarations

  • Loading branch information...
1 parent 4a42b2e commit 7b0b34d63356119642b24b4c1fd66d1a44212c48 @moritz moritz committed Oct 1, 2011
Showing with 12 additions and 1 deletion.
  1. +12 −1 S12-methods/instance.t
View
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 35;
+plan 37;
=begin pod
@@ -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.