# New Ticket Created by [email protected]
# Please include the string: [perl #72338]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=72338 >
This code:
class x {
multi method y { self.y("void") }
multi method y (Str $arg) { say $arg }
}
x.new.y("foo");
x.new.y;
Produces this output:
Method 'y' not found for invocant of class 'Failure'
in Main (file src/gen_setting.pm, line 324)
It works if I put the "x.new" code in another file and "use x". It also works
if I stay in the same file and I assign x.new to a variable and call .y on the
variable.
my $x = x.new;
$x.y("foo");
$x.y;
It fails on both master and ng, versions
7914ca3aa2f17ced09ff0707700e638d77cd5a1f and
2db8b5e6e8a5ea1559bf2668866e12476cf416fc respectively.
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog - http://use.perl.org/~Ovid/journal/
Twitter - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6