From bf94956c7e0229a54faf917110f3679850e35188 Mon Sep 17 00:00:00 2001 From: rvcas Date: Wed, 15 Mar 2023 16:28:59 -0400 Subject: [PATCH] feat: print todo's type when printing the todo warning --- crates/aiken-lang/src/tipo/error.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/aiken-lang/src/tipo/error.rs b/crates/aiken-lang/src/tipo/error.rs index f654deec..a299a1cb 100644 --- a/crates/aiken-lang/src/tipo/error.rs +++ b/crates/aiken-lang/src/tipo/error.rs @@ -1287,7 +1287,12 @@ pub enum Warning { }, #[error("I found a todo left in the code.\n")] - #[diagnostic(help("You probably want to replace that one with real code... eventually."))] + #[diagnostic( + help( + "You probably want to replace that one with real code... eventually. The expected type is {}", + tipo.to_pretty_with_names(HashMap::new(), 0).if_supports_color(Stderr, |s| s.purple()) + ) + )] #[diagnostic(code("todo"))] Todo { #[label]