From fd4bf1280885c55f31e9b055cdd21bd594dc90b4 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 14 Jan 2022 16:56:23 +0800 Subject: [PATCH] fix grammar of some type error messages --- nac3artiq/src/lib.rs | 2 +- nac3core/src/typecheck/function_check.rs | 2 +- nac3core/src/typecheck/type_inferencer/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nac3artiq/src/lib.rs b/nac3artiq/src/lib.rs index e4e723aaf..a180a283c 100644 --- a/nac3artiq/src/lib.rs +++ b/nac3artiq/src/lib.rs @@ -188,7 +188,7 @@ impl Nac3 { let base_ty = match resolver.get_symbol_type(unifier, top_level_defs, primitives, "base".into()) { Ok(ty) => ty, - Err(e) => return Some(format!("type error of object launching kernel: {}", e)) + Err(e) => return Some(format!("type error inside object launching kernel: {}", e)) }; let fun_ty = if method_name.is_empty() { diff --git a/nac3core/src/typecheck/function_check.rs b/nac3core/src/typecheck/function_check.rs index 1e28e13c3..142b5ef84 100644 --- a/nac3core/src/typecheck/function_check.rs +++ b/nac3core/src/typecheck/function_check.rs @@ -80,7 +80,7 @@ impl<'a> Inferencer<'a> { } Err(e) => { return Err(format!( - "type error of identifier `{}` ({}) at {}", + "type error at identifier `{}` ({}) at {}", id, e, expr.location )); } diff --git a/nac3core/src/typecheck/type_inferencer/mod.rs b/nac3core/src/typecheck/type_inferencer/mod.rs index dc96638ef..9a303749b 100644 --- a/nac3core/src/typecheck/type_inferencer/mod.rs +++ b/nac3core/src/typecheck/type_inferencer/mod.rs @@ -371,7 +371,7 @@ impl<'a> fold::Fold<()> for Inferencer<'a> { } Err(e) => { return report_error( - &format!("type error of identifier `{}` ({})", id, e), + &format!("type error at identifier `{}` ({})", id, e), expr.location, ); }