nac3core: composer better error msg in for uninit field
This commit is contained in:
parent
aae9925014
commit
01b51b62ee
|
@ -1646,11 +1646,14 @@ impl TopLevelComposer {
|
||||||
unreachable!("must be init function here")
|
unreachable!("must be init function here")
|
||||||
}
|
}
|
||||||
let all_inited = Self::get_all_assigned_field(body.as_slice())?;
|
let all_inited = Self::get_all_assigned_field(body.as_slice())?;
|
||||||
if fields.iter().any(|x| !all_inited.contains(&x.0)) {
|
for (f, _, _) in fields {
|
||||||
return Err(format!(
|
if !all_inited.contains(f) {
|
||||||
"fields of class {} not fully initialized",
|
return Err(format!(
|
||||||
class_name
|
"fields `{}` of class `{}` not fully initialized",
|
||||||
));
|
f,
|
||||||
|
class_name
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue