New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrapped method fails when precompiled #5222
Comments
From @jonathanstoweIt appears that the Metamodel::WrapDispatcher can't find the candidate to execute when the wrapped method is pre-compiled. This can be recreated in several ways, first by wrapping the method in an over-ridden add_method: lib/Vum.pm: class MetamodelX::FooHOW is Metamodel::ClassHOW { my package EXPORTHOW { And lib/Boo.pm : use Vum; #no precompilation; class Boo { And exercised with "perl6 -Ilib ...": use Boo; my $b = Boo.new(rabble => "hoodoo"); say $b.rack; This will fail with: Cannot invoke this object (Which points to the enter method of WrapDispatch.) Which would appear that it is not getting the appropriate Callable from .candidates[0]. With the "no precompilation" un-commented in Boo.pm this will work fine. Just to check that this wasn't something mysterious in the MOP it can also be replicated with: lib/Wom.pm: module Wom { lib/Bok.pm: use Wom; #no precompilation; class Bok { And exercised with the similar script run with "perl6 -Ilib ..." : use Bok; my $b = Bok.new(rabble => "hoodoo"); say $b.rack; Then this will also fail identically without the "no precompilation". This afflicts OO::Monitors in the ecosystem which cannot be used in a module that will be precompiled, and I suspect this is also at the heart of a problem with Staticish which similarly doesn't work if used in a module which is precompiled. This is with: This is Rakudo version 2016.03-98-g61d231c built on MoarVM version 2016.03-84-g4afd7b6 |
From @LLFournFor reference this is another related to: https://rt.perl.org/Public/Bug/Display.html?id=125634 On Sat, Apr 9, 2016 at 7:10 AM Jonathan Stowe <perl6-bugs-followup@perl.org>
|
The RT System itself - Status changed from 'new' to 'open' |
From jns@gellyfish.co.ukI'm actually surprised there are as few "Cannot invoke this object" https://rt.perl.org/Search/Simple.html?q=%22Cannot+invoke+this+object%2 A cursory survey of those would suggest that they all fall in a wider On Sat, 2016-04-09 at 03:24 -0700, Lloyd Fournier via RT wrote:
|
Migrated from rt.perl.org#127860 (status was 'open')
Searchable as RT127860$
The text was updated successfully, but these errors were encountered: