nushell/tests
Artemiy e96039fb1b
Fix default argument value type checking (#10460)
# Description
Fix type checking in arguments default values not adhering to subtyping
rules
Currently following examples produce a parse error:
```nu
def test [ --qwe: record<a: int> = {a: 1 b: 1} ] { }
def test [ --qwe: list<any> = [ 1 2 3 ] ] { }
```
despite types matching. Type equality check is replaced with subtyping
check and everything parses fine:
# User-Facing Changes
Default values of flag arguments type checking behavior is in line with
`let` statements
2023-09-24 11:30:58 +02:00
..
assets/nu_json Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
const_ Remove python-like string multiplication (#10293) 2023-09-13 19:52:04 +12:00
eval Exit early when encountering parsing errors (#10213) 2023-09-05 14:36:37 +02:00
fixtures Remove dead BSON related tests (#10458) 2023-09-21 20:01:49 +02:00
hooks Auto-expand table based on terminal width (#9934) 2023-08-08 05:47:23 -05:00
modules Recursively export constants from modules (#10049) 2023-08-20 14:51:35 +02:00
overlays Remove unnecessary cwd, pipeline(), r# from various tests (#9645) 2023-07-12 19:07:20 +02:00
parsing Fix default argument value type checking (#10460) 2023-09-24 11:30:58 +02:00
path Deref &String arguments to &str where appropriate (#10321) 2023-09-12 14:06:56 +08:00
plugins Disallow empty record with empty key,value pairs on ini format (#9722) 2023-07-18 22:14:18 +02:00
scope Add a few more fields to scope commands (#10045) 2023-08-18 20:47:38 +03:00
shell Update internal use of decimal to float (#10333) 2023-09-13 23:53:55 +02:00
main.rs prevent redefining fields in a record (#8705) 2023-04-02 06:09:33 +12:00