From 8615960cd69230c379b6f0824c42ef7d538058fe Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Tue, 7 Jun 2022 20:52:04 +0800 Subject: [PATCH] Fix feature. --- src/eval/chaining.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/eval/chaining.rs b/src/eval/chaining.rs index 159a7a54..013b472f 100644 --- a/src/eval/chaining.rs +++ b/src/eval/chaining.rs @@ -622,11 +622,14 @@ impl Engine { match rhs { // Short-circuit for simple property access: {expr}.prop + #[cfg(not(feature = "no_object"))] Expr::Property(..) if chain_type == ChainType::Dotting => { idx_values.push(ChainArgument::Property(rhs.position())) } + #[cfg(not(feature = "no_object"))] Expr::Property(..) => unreachable!("unexpected Expr::Property for indexing"), // Short-circuit for simple method call: {expr}.func() + #[cfg(not(feature = "no_object"))] Expr::FnCall(x, ..) if chain_type == ChainType::Dotting && x.args.is_empty() => { idx_values.push(ChainArgument::MethodCallArgs( Default::default(), @@ -634,6 +637,7 @@ impl Engine { )) } // Short-circuit for method call with all literal arguments: {expr}.func(1, 2, 3) + #[cfg(not(feature = "no_object"))] Expr::FnCall(x, ..) if chain_type == ChainType::Dotting && x.args.iter().all(Expr::is_constant) => {