Fixed outdated keyword argument optimisation

The optimisation code still expected "self" to be an explicit argument.
This would result in arguments being optimised incorrectly when passed
out of order.
parent a4c2d681
Pipeline #41229448 passed with stages
in 16 minutes and 18 seconds
......@@ -89,9 +89,7 @@ module Inkoc
def on_keyword_argument(node, position, block_type)
symbol = block_type.arguments[]
# We add +1 to the position since "self" is the first argument but isn't
# included explicitly in the argument list.
if symbol.index == position + 1
if symbol.index == position
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment