nqp icon indicating copy to clipboard operation
nqp copied to clipboard

nqp::getlex could not get a variable as arg.

Open songzan opened this issue 10 years ago • 0 comments

nqp::getlex() could not get a variable arg:

 my $sub-name := '&say'; 
 ok((?nqp::getlex($sub-name) == 1), "&say is global routine");

nqp-moarvm: OUTPUT«expected QAST constant; didn't get one␤ at gen/moar/stage2/QAST.nqp:5402 (/home/camelia/rakudo-inst- 2/languages/nqp/lib/QAST.moarvm:as_mast_constant:6)␤ from gen/moar/stage2/QAST.nqp:5390 (/home/camelia/rakudo-inst-2/languages/nqp/lib/QAST.moarvm:as_mast_c…»

Following code is ok:

  ok((?nqp::getlex('&say') == 1), "&say is global routine");

nqp-moarvm: OUTPUT«ok 1 - &say is global routine␤»

songzan avatar Dec 19 '14 03:12 songzan