export const
with a type signature causes Internal error: failed to find added variable
#14023
Labels
🐛 bug
Something isn't working
modules
needs-triage
An issue that hasn't had any proper look
parser
Issues related to parsing
Milestone
Describe the bug
Declaring an
export const
with a type signature inside a module results in anInternal error
being thrown with the messagefailed to find added variable
.How to reproduce
At the REPL, try to define the following module:
Alternatively, define the module in a file named
foo.nu
and try touse
it from the REPL:The error is only produced if the
const
has bothexport
and a type signature. The specific type in the signature doesn't seem to matter.The issue occurs even when running Nu with
--no-config-file --no-std-lib
.Expected behavior
I expected module
foo
to be defined without issue.Configuration
The text was updated successfully, but these errors were encountered: