Created
November 28, 2015 09:30
-
-
Save usev6/cc463b2166e1107f06bd to your computer and use it in GitHub Desktop.
Avoid NullPointerException executing 'my %h; say %h'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/Mu.pm b/src/core/Mu.pm | |
index f123489..896630e 100644 | |
--- a/src/core/Mu.pm | |
+++ b/src/core/Mu.pm | |
@@ -342,7 +342,7 @@ Please refactor this code using the new Iterator / Seq interface. | |
method gistseen(Mu:D \SELF: $id, $gist, *%named) { | |
if $*gistseen -> \sems { | |
my str $WHICH = nqp::unbox_s(self.WHICH); | |
- if nqp::atkey(sems,$WHICH) { | |
+ if sems<$WHICH> { | |
nqp::bindkey(sems,$WHICH,2); | |
"{$id}_{nqp::objectid(SELF)}"; | |
} | |
@@ -369,7 +369,7 @@ Please refactor this code using the new Iterator / Seq interface. | |
method perlseen(Mu:D \SELF: $id, $perl, *%named) { | |
if $*perlseen -> \sems { | |
my str $WHICH = nqp::unbox_s(self.WHICH); | |
- if nqp::atkey(sems,$WHICH) { | |
+ if sems<$WHICH> { | |
nqp::bindkey(sems,$WHICH,2); | |
"{$id}_{nqp::objectid(SELF)}"; | |
} |
Author
usev6
commented
Nov 28, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment