Skip to content

Instantly share code, notes, and snippets.

@colomon
Created November 16, 2010 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colomon/702404 to your computer and use it in GitHub Desktop.
Save colomon/702404 to your computer and use it in GitHub Desktop.
if $right.returns eq 'WhateverCode' {
pir::say("phasers");
$right_new := PAST::Op.new( :pasttype('call'), :node($/), $right);
pir::say("now");
pir::say("type counter " ~ ~pir::typeof__SP($counter));
pir::say("type right.arity " ~ ~pir::typeof__SP($right.arity));
pir::say("now counter " ~ ~$counter);
pir::say("now right.arity " ~ ~$right.arity);
pir::say("num counter " ~ +$counter);
pir::say("num right.arity " ~ +$right.arity);
my $total_arity := $counter + +$right.arity;
pir::say("baby");
output:
phasers
now
type counter Integer
type right.arity Integer
now counter 0
now right.arity 1
num counter 0
num right.arity 1
set_number_native() not implemented in class 'Num'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment