Fix bug.
This commit is contained in:
parent
f903eda8ab
commit
aa6d00f253
@ -526,14 +526,18 @@ impl Engine {
|
|||||||
|
|
||||||
// Fn/eval - reaching this point it must be a method-style call, mostly like redirected
|
// Fn/eval - reaching this point it must be a method-style call, mostly like redirected
|
||||||
// by a function pointer so it isn't caught at parse time.
|
// by a function pointer so it isn't caught at parse time.
|
||||||
KEYWORD_FN_PTR | KEYWORD_EVAL if args.len() == 1 => EvalAltResult::ErrorRuntime(
|
KEYWORD_FN_PTR | KEYWORD_EVAL
|
||||||
format!(
|
if args.len() == 1 && !self.has_override(lib, hash_fn, hash_script, pub_only) =>
|
||||||
"'{}' should not be called in method style. Try {}(...);",
|
{
|
||||||
fn_name, fn_name
|
EvalAltResult::ErrorRuntime(
|
||||||
),
|
format!(
|
||||||
Position::none(),
|
"'{}' should not be called in method style. Try {}(...);",
|
||||||
)
|
fn_name, fn_name
|
||||||
.into(),
|
),
|
||||||
|
Position::none(),
|
||||||
|
)
|
||||||
|
.into()
|
||||||
|
}
|
||||||
|
|
||||||
// Script-like function found
|
// Script-like function found
|
||||||
#[cfg(not(feature = "no_function"))]
|
#[cfg(not(feature = "no_function"))]
|
||||||
|
Loading…
Reference in New Issue
Block a user