diff --git a/schala-lang/src/lib.rs b/schala-lang/src/lib.rs index 7a16202..9ec7195 100644 --- a/schala-lang/src/lib.rs +++ b/schala-lang/src/lib.rs @@ -84,7 +84,10 @@ fn typechecking(handle: &mut Schala, input: parsing::AST, comp: Option<&mut Unfi comp.map(|comp| comp.add_artifact(TraceArtifact::new("type_check", format!("{:?}", ty)))); Ok(input) }, - Err(msg) => Err(msg) + Err(msg) => { + comp.map(|comp| comp.add_artifact(TraceArtifact::new("type_check", format!("{:?}", msg)))); + Ok(input) + } } }