From 3af3bde70eaed13b235bc55c54cf0ca604be6fcf Mon Sep 17 00:00:00 2001 From: Vadim Belman Date: Wed, 12 Jun 2019 22:27:13 -0400 Subject: [PATCH] Decontainerize non-scalar symbols upon import rakudo/rakudo#2979 --- src/Perl6/World.nqp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Perl6/World.nqp b/src/Perl6/World.nqp index e8e195ea10f..dca38a411ee 100644 --- a/src/Perl6/World.nqp +++ b/src/Perl6/World.nqp @@ -1488,7 +1488,8 @@ class Perl6::World is HLL::World { my @clash; my @clash_onlystar; for sorted_keys(%stash) -> $key { - my $value := %stash{$key}; + # Prevent exported scalars from deconting. All other symbols are to be unwrapped. + my $value := nqp::iseq_s(nqp::substr($key,0,1),'$') ?? %stash{$key} !! nqp::decont(%stash{$key}); if $target.symbol($key) -> %sym { # There's already a symbol. However, we may be able to merge # if both are multis and have onlystar dispatchers.