Files
nushell/crates/nu-protocol/src
mike 544c46e0e4 improve subtyping (#9614)
# Description

the current subtyping rule needs you to define the record entries in the
same order as declared in the annotation. this pr improves that

now
```nushell
{ name: 'Him', age: 12 } 

# ,

{ age: 100, name: 'It' }

# and

{ name: 'Red', age: 69, height: "5-8" }

# will all match

record<name: string, age: int>

# previously only the first one would match
```

however, something like

```nushell
{ name: 'Her' } # will not


# and

{ name: 'Car', wheels: 5 }
```

EDIT: applied JT's suggestion
2023-07-06 10:25:39 +02:00
..
2023-06-29 05:19:48 +12:00
2023-07-01 19:52:04 +12:00
2023-06-29 05:19:48 +12:00
2023-07-06 10:25:39 +02:00
2022-11-11 19:51:08 +13:00