I think I know what happens. On MoarVM we call the Perl 6 method 'defined': 
https://github.com/perl6/nqp/blob/ac9a66abad13a7fd3d52b22ba533a9f8436ad1ac/src/vm/moar/QAST/QASTOperationsMAST.nqp#L787

On JVM we test for concreteness (like nqp::isconcrete would do):  
https://github.com/perl6/nqp/blob/ac9a66abad13a7fd3d52b22ba533a9f8436ad1ac/src/vm/jvm/QAST/Compiler.nqp#L802

And then there are special versions of 'method defined' for Slip and Failure 
which are missed on JVM when testing for concreteness only:

$ ./perl6-j -e 'say Empty.defined'
False

$ ./perl6-j -e 'use nqp; say nqp::isconcrete(Empty)'
1

$ ./perl6-j -e 'say Failure.new.defined'
False

$ ./perl6-j -e 'use nqp; say nqp::isconcrete(Failure.new)'
1

It looks like the implementation of 'with' needs some refinement on JVM.

Reply via email to