Fix bug that consumes first argument in module-qualified call.
This commit is contained in:
@@ -94,6 +94,31 @@ fn test_module_resolver() -> Result<(), Box<EvalAltResult>> {
|
||||
42
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
engine.eval::<INT>(
|
||||
r#"
|
||||
import "hello" as h1;
|
||||
import "hello" as h2;
|
||||
let x = 42;
|
||||
h1::sum(x, -10, 3, 7)
|
||||
"#
|
||||
)?,
|
||||
42
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
engine.eval::<INT>(
|
||||
r#"
|
||||
import "hello" as h1;
|
||||
import "hello" as h2;
|
||||
let x = 42;
|
||||
h1::sum(x, 0, 0, 0);
|
||||
x
|
||||
"#
|
||||
)?,
|
||||
42
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
engine.eval::<INT>(
|
||||
r#"
|
||||
|
Reference in New Issue
Block a user