Skip to content

Commit

Permalink
Revert "Fix 'is export' on constants assigned to routines"
Browse files Browse the repository at this point in the history
This reverts commit d067abf.

Workaround for a js bug - will be reapplied when the bug is fixed
  • Loading branch information
pmurias committed Sep 8, 2017
1 parent 7f87455 commit c5383a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/traits.pm
Expand Up @@ -252,12 +252,13 @@ my $!;
my $/;
my $_;

multi sub trait_mod:<is>(Routine:D \r, :$export!, :$SYMBOL = '&' ~ r.name) {
multi sub trait_mod:<is>(Routine:D \r, :$export!) {
my $to_export := r.multi ?? r.dispatcher !! r;
my $exp_name := '&' ~ r.name;
my @tags = flat 'ALL', (nqp::istype($export,Pair) ?? $export.key() !!
nqp::istype($export,Positional) ?? @($export)>>.key !!
'DEFAULT');
Rakudo::Internals.EXPORT_SYMBOL(nqp::decont($SYMBOL), @tags, $to_export);
Rakudo::Internals.EXPORT_SYMBOL($exp_name, @tags, $to_export);
}
multi sub trait_mod:<is>(Mu:U \type, :$export!) {
my $exp_name := type.^shortname;
Expand Down

0 comments on commit c5383a1

Please sign in to comment.