make function arguments immutable

This commit is contained in:
Alexander Medvednikov 2019-07-05 00:20:59 +02:00
parent 74dbb1bce3
commit 0f0ed8d716
8 changed files with 42 additions and 33 deletions

View file

@ -443,8 +443,8 @@ fn (p mut Parser) async_fn_call(f Fn, method_ph int, receiver_var, receiver_type
// Normal function => just its name, method => TYPE_FNNAME
mut fn_name := f.name
if f.is_method {
receiver_type = receiver_type.replace('*', '')
fn_name = '${receiver_type}_${f.name}'
_receiver_type := receiver_type.replace('*', '')
fn_name = '${_receiver_type}_${f.name}'
}
// Generate tmp struct with args
arg_struct_name := 'thread_arg_$fn_name'