Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binding list to variable with `@' sigil doesn't survive export/import #5495

Open
paulprocacci opened this issue Dec 15, 2023 · 2 comments
Open
Labels
CORE.setting Things broken in the CORE.setting

Comments

@paulprocacci
Copy link

The Problem

unit module Module::Something;

our @Locations is export := ('yabba', 'dabba');

+-------------------------------+
use Module::Something;

say @locations.WHAT;

Expected Behavior

I would expect a list to survive this import/export.

Actual Behavior

I end up with an array instead of a list.

Now, admittedly this may be intended but I cannot find a reasonable explanation for this in the documentation. It may exist and I may have missed it. I understand I can use a different sigil; I tested that and that works without issue, but I can't fathom why this specific example doesn't.

@2colours
Copy link
Contributor

2colours commented Jan 8, 2024

It would be nice to get actual golfed, reproducible issues so that there don't need to be extra laps run only to analyze the behavior. In this case: some actual folder structure. Also for this example - if the issue is indeed import/export - our wouldn't be needed and that strikes me as something that might interfere...

@lizmat
Copy link
Contributor

lizmat commented Jan 8, 2024

I think it's a bug in the handling of our exports.

The following DWIM:

sub EXPORT() {
    Map.new: '@Locations' => <yabba dabba>
}

@ab5tract ab5tract added the CORE.setting Things broken in the CORE.setting label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CORE.setting Things broken in the CORE.setting
Projects
None yet
Development

No branches or pull requests

4 participants