Fix return value of Func::param_arity (#1566)
Accidentally forgot to subtract 2 to account for the two vmctx parameters, so let's add a test here nad adjust it appropriately.
This commit is contained in:
@@ -74,7 +74,9 @@ fn signatures_match() {
|
||||
|
||||
let f = Func::wrap(&store, || {});
|
||||
assert_eq!(f.ty().params(), &[]);
|
||||
assert_eq!(f.param_arity(), 0);
|
||||
assert_eq!(f.ty().results(), &[]);
|
||||
assert_eq!(f.result_arity(), 0);
|
||||
|
||||
let f = Func::wrap(&store, || -> i32 { loop {} });
|
||||
assert_eq!(f.ty().params(), &[]);
|
||||
|
||||
Reference in New Issue
Block a user