@@ -41,10 +41,10 @@ class Perl6::TypeGraph {
41
41
make $ get-type ($/ . Str );
42
42
}
43
43
method inherits ($/ ) {
44
- $ * CURRENT_TYPE . super. push : $ < longname > . ast;
44
+ $ * CURRENT_TYPE . super. append : $ < longname > . ast;
45
45
}
46
46
method roles ($/ ) {
47
- $ * CURRENT_TYPE . roles. push : $ < longname > . ast;
47
+ $ * CURRENT_TYPE . roles. append : $ < longname > . ast;
48
48
}
49
49
}
50
50
my @ categories ;
@@ -67,17 +67,17 @@ class Perl6::TypeGraph {
67
67
# roles that have a superclass actually apply that superclass
68
68
# to the class that does them, so mimic that here:
69
69
for $ t . roles -> $ r {
70
- $ t . super. push : $ r . super if $ r . super;
70
+ $ t . super. append : $ r . super if $ r . super;
71
71
}
72
72
# non-roles default to superclass Any
73
73
if $ t . packagetype ne ' role' && ! $ t . super && $ t ne ' Mu' {
74
- $ t . super. push : $ get-type (' Any' );
74
+ $ t . super. append : $ get-type (' Any' );
75
75
}
76
76
}
77
77
# Cache the inversion of all type relationships
78
78
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;
81
81
}
82
82
self ! topo-sort;
83
83
}
@@ -87,7 +87,7 @@ class Perl6::TypeGraph {
87
87
return if % seen {$ n };
88
88
% seen {$ n } = True ;
89
89
visit($ _ ) for flat $ n . super, $ n . roles;
90
- @ ! sorted . push : $ n ;
90
+ @ ! sorted . append : $ n ;
91
91
}
92
92
visit($ _ ) for % . types . values . sort (*. name );
93
93
}
0 commit comments