Skip to content

Commit

Permalink
Mark CompUnit.WHICH as returning a ValueObjAt
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed May 13, 2020
1 parent b3d933b commit 4afaab7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/core.c/CompUnit.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ class CompUnit {
has Distribution $.distribution is built(:bind);
has ValueObjAt $!WHICH;

multi method WHICH(CompUnit:D:) {
nqp::isconcrete($!WHICH)
?? $!WHICH
!! self!WHICH
multi method WHICH(CompUnit:D: --> ValueObjAt:D) {
nqp::isconcrete($!WHICH) ?? $!WHICH !! self!WHICH
}
method !WHICH() {
my $parts :=
Expand All @@ -39,6 +37,7 @@ class CompUnit {
).Str
!! $!repo-id
);

$!WHICH := nqp::box_s(
nqp::concat(
nqp::concat(self.^name, '|'),
Expand Down

0 comments on commit 4afaab7

Please sign in to comment.