Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[common] An extra sanity check for add_parent (discovered missing whi…

…le fixing the previous issue, though unrelated to it).
  • Loading branch information...
commit 0b1a12db46f989cb6a12d20344dfeb471cba5a95 1 parent 9269db5
@jnthn authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  common/NQP/NQPSetting.pm
View
3  common/NQP/NQPSetting.pm
@@ -524,6 +524,9 @@ my knowhow NQPClassHOW {
if $!composed {
die("NQPClassHOW does not support adding parents after being composed.");
}
+ if $obj =:= $parent {
+ die("Cannot make a class its own parent.");
+ }
my $i := 0;
while $i != +@!parents {
if @!parents[$i] =:= $parent {
Please sign in to comment.
Something went wrong with that request. Please try again.