add failing unification testcase
This commit is contained in:
parent
fe73c47504
commit
dc6626833d
1 changed files with 20 additions and 0 deletions
|
@ -251,6 +251,26 @@ fn test_trait_not_subtype() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_reprtree_list_subtype() {
|
||||
let mut dict = BimapTypeDict::new();
|
||||
|
||||
dict.add_varname("Item".into());
|
||||
|
||||
assert_eq!(
|
||||
subtype_unify(
|
||||
&dict.parse("<List~Vec <Digit 10>~Char~ReprTree>").expect(""),
|
||||
&dict.parse("<List~Vec Item~ReprTree>").expect("")
|
||||
),
|
||||
Ok((
|
||||
TypeTerm::unit(),
|
||||
vec![
|
||||
(dict.get_typeid(&"Item".into()).unwrap(), dict.parse("<Digit 10>~Char").unwrap())
|
||||
].into_iter().collect()
|
||||
))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn test_subtype_delim() {
|
||||
let mut dict = BimapTypeDict::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue