Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created May 2, 2013 19:45
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 jnthn/5504848 to your computer and use it in GitHub Desktop.
Save jnthn/5504848 to your computer and use it in GitHub Desktop.
diff --git a/src/vm/parrot/QAST/Compiler.nqp b/src/vm/parrot/QAST/Compiler.nqp
index ae729d0..becfebe 100644
--- a/src/vm/parrot/QAST/Compiler.nqp
+++ b/src/vm/parrot/QAST/Compiler.nqp
@@ -988,6 +988,10 @@ class QAST::Compiler is HLL::Compiler {
multi method as_post(QAST::WVal $node, :$want) {
my $val := $node.value;
my $sc := nqp::getobjsc($val);
+ if nqp::isnull($sc) {
+ nqp::die("Object of type " ~ $val.HOW.name($val) ~
+ " in QAST::WVal is not in a serialization context");
+ }
my $handle := nqp::scgethandle($sc);
my $idx := nqp::scgetobjidx($sc, $val);
my $reg := $*REGALLOC.fresh_p();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment