mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
patch 8.2.1455: Vim9: crash when using typecast before constant
Problem: Vim9: crash when using typecast before constant. Solution: Generate constant before checking type. Add tets.
This commit is contained in:
@@ -1324,6 +1324,12 @@ let $TESTVAR = 'testvar'
|
||||
def Test_expr7t()
|
||||
let ls: list<string> = ['a', <string>g:string_empty]
|
||||
let ln: list<number> = [<number>g:anint, <number>g:alsoint]
|
||||
let nr = <number>234
|
||||
assert_equal(234, nr)
|
||||
|
||||
call CheckDefFailure(["let x = <nr>123"], 'E1010:')
|
||||
call CheckDefFailure(["let x = <number >123"], 'E1068:')
|
||||
call CheckDefFailure(["let x = <number 123"], 'E1104:')
|
||||
enddef
|
||||
|
||||
" test low level expression
|
||||
|
Reference in New Issue
Block a user