Add cycle recovery for type aliases

This commit is contained in:
Florian Diebold 2019-11-30 12:48:51 +01:00
parent 3ca40f7c08
commit 1c622e9fed
3 changed files with 10 additions and 2 deletions

View file

@ -2154,7 +2154,6 @@ fn test(x: Foo, y: Bar<&str>, z: Baz<i8, u8>) {
}
#[test]
#[should_panic] // we currently can't handle this
fn recursive_type_alias() {
assert_snapshot!(
infer(r#"
@ -2163,7 +2162,10 @@ type Foo = Foo;
type Bar = A<Bar>;
fn test(x: Foo) {}
"#),
@""
@r###"
[59; 60) 'x': {unknown}
[67; 69) '{}': ()
"###
)
}