Reproduce code gen crash

This commit is contained in:
Richard Feldman 2022-01-28 00:17:54 -05:00
parent ff8937b142
commit f8fc9cf577
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
3 changed files with 9 additions and 4 deletions

View file

@ -3607,7 +3607,12 @@ fn expose_function_to_host_help_c_abi_v2<'a, 'ctx, 'env>(
_ => &param_types,
};
debug_assert_eq!(params.len(), param_types.len());
debug_assert!(
params.len() == param_types.len(),
"when exposing a function to the host, params.len() was {}, but param_types.len() was {}",
params.len(),
param_types.len()
);
let it = params.iter().zip(param_types).map(|(arg, fastcc_type)| {
let arg_type = arg.get_type();