Skip to content

Commit

Permalink
Fix in mutator: add diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTheKush committed Sep 14, 2023
1 parent 56b0852 commit 8a77563
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/mutator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ impl Mutator {
log::info!(" {} files", ns.files.len());
log::info!(" {} contracts", ns.contracts.len());
log::info!(" {} functions", ns.functions.len());

if ns.diagnostics.any_errors() {
ns.print_diagnostics(&self.file_resolver, true);
return Err("error".into());
}

self.namespace = Some(ns.clone());

let resolved = match self.file_resolver.resolve_file(None, os_filename) {
Expand Down Expand Up @@ -304,7 +310,7 @@ impl Mutator {
continue;
}
}
if function.is_accessor || function.is_virtual || !function.has_body {
if function.is_accessor || !function.has_body {
continue;
}
let contract = if let Some(contract_no) = function.contract_no {
Expand Down

0 comments on commit 8a77563

Please sign in to comment.