[fine] Get rid of "value required", it's not useful
This commit is contained in:
parent
b205ebcb4c
commit
758aef4db9
4 changed files with 43 additions and 66 deletions
|
|
@ -150,7 +150,7 @@ fn assert_type_at(
|
|||
None => semantic_panic!(&semantics, "Unable to find the subtee at position {pos}"),
|
||||
};
|
||||
|
||||
let tree_type = semantics.type_of(tree_ref, true);
|
||||
let tree_type = semantics.type_of(tree_ref);
|
||||
let actual = format!("{}", tree_type.unwrap_or(Type::Error));
|
||||
semantic_assert_eq!(
|
||||
&semantics,
|
||||
|
|
@ -173,7 +173,7 @@ fn assert_type_error_at(
|
|||
None => semantic_panic!(&semantics, "Unable to find the subtee at position {pos}"),
|
||||
};
|
||||
|
||||
let tree_type = semantics.type_of(tree_ref, true);
|
||||
let tree_type = semantics.type_of(tree_ref);
|
||||
semantic_assert!(
|
||||
&semantics,
|
||||
matches!(tree_type, Some(Type::Error)),
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
if (if false { true }) { 32 } else { 23 }
|
||||
// type-error: 4 this conditional expression needs an else arm to produce a value
|
||||
// type-error: 4 the type of the `then` branch (bool) must match the type of the `else` branch (())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue