Skip to content

Parallel assignment of local variables in packages can fail #4210

@d-torrance

Description

@d-torrance

I just discovered a bug with the new parallel assignment feature. If we try to assign variables alongside other things (i.e., not everything is a local variable) using parallel assignment inside a package, then we get a "mutable unexported symbol" error.

For example, in the package Foo, if we have:

f = () -> (
    (,x) := (1, 2);
    x)

then we get:

i1 : loadPackage "Foo"
stdio:1:11:(3):[1]: error: mutable unexported unset symbol(s) in package Foo: 'x'
Foo.m2:4:6-4:7: here is the first use of 'x'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions