|
|
@@ -67,7 +67,11 @@ impl Analyzer {
|
|
|
};
|
|
|
if var_type != Type::Base {
|
|
|
self.error(
|
|
|
- "Incorrect argument type. Expected `Base`.".to_string(),
|
|
|
+ format!(
|
|
|
+ "Incorrect argument type. Expected `{:?}`, got `{:?}`",
|
|
|
+ Type::Base,
|
|
|
+ var_type
|
|
|
+ ),
|
|
|
i.line,
|
|
|
i.column,
|
|
|
);
|
|
|
@@ -96,8 +100,8 @@ impl Analyzer {
|
|
|
if var_type != arg_types[idx] {
|
|
|
self.error(
|
|
|
format!(
|
|
|
- "Incorrect argument type. Expected `{:?}`.",
|
|
|
- arg_types[idx]
|
|
|
+ "Incorrect argument type. Expected `{:?}`, got `{:?}`",
|
|
|
+ arg_types[idx], var_type,
|
|
|
),
|
|
|
i.line,
|
|
|
i.column,
|
|
|
@@ -143,7 +147,11 @@ impl Analyzer {
|
|
|
};
|
|
|
if var_type != Type::Base {
|
|
|
self.error(
|
|
|
- "Incorrect argument type. Expected `Base`.".to_string(),
|
|
|
+ format!(
|
|
|
+ "Incorrect argument type. Expected `{:?}`, got `{:?}`",
|
|
|
+ Type::Base,
|
|
|
+ var_type
|
|
|
+ ),
|
|
|
i.line,
|
|
|
i.column,
|
|
|
);
|
|
|
@@ -172,8 +180,8 @@ impl Analyzer {
|
|
|
if var_type != arg_types[idx] {
|
|
|
self.error(
|
|
|
format!(
|
|
|
- "Incorrect argument type. Expected `{:?}`.",
|
|
|
- arg_types[idx]
|
|
|
+ "Incorrect argument type. Expected `{:?}`, got `{:?}`",
|
|
|
+ arg_types[idx], var_type,
|
|
|
),
|
|
|
i.line,
|
|
|
i.column,
|