Skip to content

Commit

Permalink
[pmc] assign Undef for subclasses of Undef in Scalar.assign_pmc. Raku…
Browse files Browse the repository at this point in the history
…do test S12-introspection/walk.rakudo pass with this change. This function needs more review, though

git-svn-id: https://svn.parrot.org/parrot/trunk@41256 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
NotFound authored and NotFound committed Sep 14, 2009
1 parent 3a7a780 commit 276cf3a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pmc/scalar.pmc
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ according to the type of C<*value>.
return;
}

if (VTABLE_isa(INTERP, value, CONST_STRING(INTERP, "Undef"))) {
pmc_reuse(INTERP, SELF, enum_class_Undef, 0);
return;
}

if (VTABLE_isa(INTERP, value, CONST_STRING(INTERP, "Integer"))) {
const INTVAL v = VTABLE_get_integer(INTERP, value);
SELF.set_integer_native(v);
Expand Down

0 comments on commit 276cf3a

Please sign in to comment.