mirror of
https://github.com/tweag/nickel.git
synced 2024-11-10 10:46:49 +03:00
Merge pull request #246 from tweag/fix/failing-ci-promise
[Fix]Failing CI on master (old Promise syntax)
This commit is contained in:
commit
8a439d5e0a
@ -2189,14 +2189,14 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn dynamic_row_tail() {
|
||||
parse_and_typecheck("let r = Assume({a: Num | Dyn}, {a = 1; b = 2}) in Promise(Num, r.a)")
|
||||
parse_and_typecheck("let r = Assume({a: Num | Dyn}, {a = 1; b = 2}) in (r.a : Num)")
|
||||
.unwrap();
|
||||
parse_and_typecheck("Promise({a: Num | Dyn}, Assume({a: Num | Dyn}, {a = 1; b = 2}))")
|
||||
.unwrap();
|
||||
// Currently, typechecking is conservative wrt the dynamic row type, meaning it can
|
||||
parse_and_typecheck("Promise({a: Num | Dyn}, {a = 1; b = 2})").unwrap_err();
|
||||
parse_and_typecheck("Promise({a: Num | Dyn}, {a = 1})").unwrap_err();
|
||||
parse_and_typecheck("Promise({a: Num}, Assume({a: Num | Dyn}, {a = 1}))").unwrap_err();
|
||||
parse_and_typecheck("Promise({a: Num | Dyn}, {a = 1})").unwrap_err();
|
||||
parse_and_typecheck("Assume({a: Num | Dyn}, {a = 1; b = 2}) : {a: Num | Dyn}").unwrap();
|
||||
// Currently, typechecking is conservative wrt the dynamic row type, meaning it can't to a
|
||||
// less precise type with a dynamic tail.
|
||||
parse_and_typecheck("{a = 1; b = 2} : {a: Num | Dyn}").unwrap_err();
|
||||
parse_and_typecheck("{a = 1} : {a: Num | Dyn}").unwrap_err();
|
||||
parse_and_typecheck("Assume({a: Num | Dyn}, {a = 1}) : {a: Num}").unwrap_err();
|
||||
parse_and_typecheck("{a = 1} : {a: Num | Dyn}").unwrap_err();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user