Add a regression test for issue 17199 that causes stack overflow

This commit is contained in:
Shoyu Vanilla 2024-06-27 23:48:15 +09:00
parent 4e836c622a
commit 50b7678621

View file

@ -1999,3 +1999,22 @@ where
"#,
);
}
#[test]
fn tait_async_stack_overflow_17199() {
check_types(
r#"
//- minicore: fmt, future
type Foo = impl core::fmt::Debug;
async fn foo() -> Foo {
()
}
async fn test() {
let t = foo().await;
// ^ impl Debug
}
"#,
);
}