We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df1e271 commit 559413bCopy full SHA for 559413b
server/src/core/symbols/function_symbol.rs
@@ -171,10 +171,12 @@ impl FunctionSymbol {
171
if index > (call.arguments.args.len()-1) as u32 {
172
call_arg_keyword = call.arguments.keywords.get((index - call.arguments.args.len() as u32) as usize);
173
}
174
- let mut arg_index = 0;
175
- if is_on_instance.is_some() {
176
- arg_index += 1;
177
- }
+ let arg_index = if is_on_instance.unwrap_or(false) {
+ index + 1
+ } else {
+ index
178
+ };
179
+
180
if let Some(keyword) = call_arg_keyword {
181
for arg in self.args.iter() {
182
if arg.symbol.upgrade().unwrap().borrow().name().to_string() == keyword.arg.as_ref().unwrap().id {
0 commit comments