From 52dd792b3ec9e28baee8a6cdd8387e02a301deca Mon Sep 17 00:00:00 2001 From: pca006132 Date: Fri, 27 Aug 2021 11:39:36 +0800 Subject: [PATCH] nac3standalone: added return check --- nac3standalone/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nac3standalone/src/main.rs b/nac3standalone/src/main.rs index 41983a484..a0bb464a4 100644 --- a/nac3standalone/src/main.rs +++ b/nac3standalone/src/main.rs @@ -122,9 +122,11 @@ fn main() { .unwrap(); let mut identifiers = vec!["output".to_string()]; - inferencer + if !inferencer .check_block(&statements, &mut identifiers) - .unwrap(); + .unwrap() { + panic!("expected return"); + } let top_level = Arc::new(TopLevelContext { definitions: Arc::new(RwLock::new(std::mem::take(