diff --git a/crates/repl_test/src/state.rs b/crates/repl_test/src/state.rs index f95210b9b9..670c6c48de 100644 --- a/crates/repl_test/src/state.rs +++ b/crates/repl_test/src/state.rs @@ -30,6 +30,21 @@ fn persisted_defs() { complete("val1 + x + y", &mut state, Ok(("15 : Num *", "val2"))); } +#[test] +fn annotated_body() { + let mut input = "t : [A, B, C]".to_string(); + + incomplete(&mut input); + + input.push_str("t = A"); + + incomplete(&mut input); + + let mut state = ReplState::new(); + + complete(&input, &mut state, Ok(("A : [A]*", "t"))); +} + #[test] fn exhaustiveness_problem() { let mut input = "t : [A, B, C]".to_string();