Skip to content

Commit

Permalink
in value_to_enum, return the type object instead of parrot Null on lo…
Browse files Browse the repository at this point in the history
…okup failure
  • Loading branch information
moritz committed May 13, 2012
1 parent 9c85a3b commit f4837f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Perl6/Metamodel/EnumHOW.pm
Expand Up @@ -59,7 +59,9 @@ class Perl6::Metamodel::EnumHOW
%!value_to_enum{$_.value} := $_;
}
}
%!value_to_enum{$value}
nqp::existskey(%!value_to_enum, $value)
?? %!value_to_enum{$value}
!! $obj.WHAT;
}

method enum_value_list($obj) {
Expand Down

0 comments on commit f4837f5

Please sign in to comment.