From e75ec356870bb8feedcac97dc3294ebe25d4de87 Mon Sep 17 00:00:00 2001 From: ychenfo Date: Sat, 20 Nov 2021 04:59:40 +0800 Subject: [PATCH] nac3ore: default parameter of type int64 should be specified explicitly --- nac3core/src/toplevel/helper.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nac3core/src/toplevel/helper.rs b/nac3core/src/toplevel/helper.rs index e4796188..397a10dd 100644 --- a/nac3core/src/toplevel/helper.rs +++ b/nac3core/src/toplevel/helper.rs @@ -354,7 +354,10 @@ impl TopLevelComposer { if let Ok(v) = v.try_into() { Ok(SymbolValue::I32(v)) } else { - Ok(SymbolValue::I64(v.try_into().unwrap())) + Err(format!( + "int64 default parameter should be specified explicitly by `int64()` at {}", + loc + )) } } Constant::Float(v) => Ok(SymbolValue::Double(*v)),