We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d864a34 commit 1c5e9d8Copy full SHA for 1c5e9d8
lib/Perl6/Type.pm
@@ -3,7 +3,9 @@ use v6;
3
class Perl6::Type {
4
has Str $.name handles <Str>;
5
has @.super;
6
+ has @.sub;
7
has @.roles;
8
+ has @.doers;
9
has $.packagetype is rw = 'class';
10
11
has @.mro;
lib/Perl6/TypeGraph.pm
@@ -65,6 +65,11 @@ class Perl6::TypeGraph {
65
$t.super.push: $get-type('Any');
66
}
67
68
+ # Cache the inversion of all type relationships
69
+ for %.types.values -> $t {
70
+ $_.sub.push($t) for $t.super;
71
+ $_.doers.push($t) for $t.roles;
72
+ }
73
self!topo-sort;
74
75
method !topo-sort {
0 commit comments