Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
prevent calling getstaticcode on something NQPMu-ish
On MoarVM we get away with checking for isnull, but this is not enough for
JVM. This unbusts SVG::Plot and Pod::To::HTML. The error is triggered when
we apply a trait to a sub or an Attribute and the module gets precompiled.
  • Loading branch information
FROGGS committed Apr 3, 2014
1 parent e872810 commit 1bc429c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/World.nqp
Expand Up @@ -1718,7 +1718,7 @@ class Perl6::World is HLL::World {
nqp::p6captureouters2($!list, $resolved);
}
method update($code) {
unless nqp::isnull($!resolved) {
if !nqp::isnull($!resolved) && !nqp::istype($!resolved, NQPMu) {
nqp::p6captureouters2([$code],
nqp::getcomp('perl6').backend.name eq 'moar'
?? nqp::getstaticcode($!resolved)
Expand Down

0 comments on commit 1bc429c

Please sign in to comment.