Allow mutating a module-qualified function's first argument if it is a variable.

This commit is contained in:
Stephen Chung
2020-07-08 13:06:00 +08:00
parent d92a514f48
commit 703cc414b8
3 changed files with 145 additions and 41 deletions

View File

@@ -849,7 +849,7 @@ impl Module {
/// The `u64` hash is calculated by the function `crate::calc_fn_hash` and must match
/// the hash calculated by `index_all_sub_modules`.
pub(crate) fn get_qualified_fn(
&mut self,
&self,
hash_qualified_fn: u64,
) -> Result<&Func, Box<EvalAltResult>> {
self.all_functions.get(&hash_qualified_fn).ok_or_else(|| {