Skip to content

Commit

Permalink
Ensure that all new children are type Tree::Simple
Browse files Browse the repository at this point in the history
  • Loading branch information
Takadonet committed Dec 20, 2010
1 parent fa1d7d7 commit ca7fc39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Tree/Simple.pm
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ method insertChildAt(Int $index where { $index >= 0 },*@trees where { @trees.ele


for @trees -> $tree is rw {
# (blessed($tree) && $tree.isa("Tree::Simple"))
# || die "Insufficient Arguments : Child must be a Tree::Simple object";
$tree ~~ Tree::Simple
|| die "Insufficient Arguments : Child must be a Tree::Simple object";
$tree!setParent(self);
self.setHeight($tree);
self.setWidth($tree);
Expand Down

0 comments on commit ca7fc39

Please sign in to comment.