Problem: Vim9: Cannot use "fina" for "finally". (Naruhiko Nishino)
Solution: Specifically check for "fina". (closes #7020)
eap->cmdidx = CMD_SIZE;
}
+ // ":fina" means ":finally" for backwards compatibility.
+ if (eap->cmdidx == CMD_final && p - eap->cmd == 4)
+ eap->cmdidx = CMD_finally;
+
return p;
}
if loops == 2
try
Xpath 'f' . loops
- finally
+ final
Xpath 'g' . loops
endtry
endif
Xpath 'i'
endfunc
+" Also try using "fina" and "final" and "finall" as abbraviations.
func T25_G()
if 1
try
Xpath 'A'
call T25_F()
Xpath 'B'
- finally
+ fina
Xpath 'C'
endtry
else
try
Xpath 'D'
- finally
+ finall
Xpath 'E'
endtry
endif
endtry
catch /wrong/
add(l, 'caught')
- finally
+ fina
add(l, 'finally')
endtry
assert_equal(['1', 'caught', 'finally'], l)
def ReturnFinally(): string
try
return 'intry'
- finally
+ finall
g:in_finally = 'finally'
endtry
return 'end'
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1746,
/**/
1745,
/**/