Skip to content

Commit c6bc991

Browse files
committed
push to append
1 parent cc4d77c commit c6bc991

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/Perl6/TypeGraph.pm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ class Perl6::TypeGraph {
4141
make $get-type($/.Str);
4242
}
4343
method inherits($/) {
44-
$*CURRENT_TYPE.super.push: $<longname>.ast;
44+
$*CURRENT_TYPE.super.append: $<longname>.ast;
4545
}
4646
method roles($/) {
47-
$*CURRENT_TYPE.roles.push: $<longname>.ast;
47+
$*CURRENT_TYPE.roles.append: $<longname>.ast;
4848
}
4949
}
5050
my @categories;
@@ -67,17 +67,17 @@ class Perl6::TypeGraph {
6767
# roles that have a superclass actually apply that superclass
6868
# to the class that does them, so mimic that here:
6969
for $t.roles -> $r {
70-
$t.super.push: $r.super if $r.super;
70+
$t.super.append: $r.super if $r.super;
7171
}
7272
# non-roles default to superclass Any
7373
if $t.packagetype ne 'role' && !$t.super && $t ne 'Mu' {
74-
$t.super.push: $get-type('Any');
74+
$t.super.append: $get-type('Any');
7575
}
7676
}
7777
# Cache the inversion of all type relationships
7878
for %.types.values -> $t {
79-
$_.sub.push($t) for $t.super;
80-
$_.doers.push($t) for $t.roles;
79+
$_.sub.append($t) for $t.super;
80+
$_.doers.append($t) for $t.roles;
8181
}
8282
self!topo-sort;
8383
}
@@ -87,7 +87,7 @@ class Perl6::TypeGraph {
8787
return if %seen{$n};
8888
%seen{$n} = True;
8989
visit($_) for flat $n.super, $n.roles;
90-
@!sorted.push: $n;
90+
@!sorted.append: $n;
9191
}
9292
visit($_) for %.types.values.sort(*.name);
9393
}

0 commit comments

Comments
 (0)