-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Experimental Option Tracking: enforce-runtime-annotations #16832
Copy link
Copy link
Open
Labels
category:experimental-optionThis is a tracking issue for an experimental optionThis is a tracking issue for an experimental option
Description
Identifier
enforce-runtime-annotations
Introducing PR
Status
opt-in
Description
Enforce type checking of let assignments at runtime so that invalid type conversion errors propagate the same way they would for predefined values:
Error: nu::parser::type_mismatch
× Type mismatch.
╭─[example1.nu:2:32]
1 │ let table1: table<a: string> = [{a: "foo"}]
2 │ let table2: table<b: string> = $table1
· ───┬───
· ╰── expected table<b: string>, found table<a: string>
╰────Related
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
category:experimental-optionThis is a tracking issue for an experimental optionThis is a tracking issue for an experimental option