Mercurial > vim
comparison src/testdir/test_vim9_disassemble.vim @ 20397:c225be44692a v8.2.0753
patch 8.2.0753: Vim9: expressions are evaluated in the discovery phase
Commit: https://github.com/vim/vim/commit/32e351179eacfc84f64cd5029e221582d400bb38
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 14 22:41:15 2020 +0200
patch 8.2.0753: Vim9: expressions are evaluated in the discovery phase
Problem: Vim9: expressions are evaluated in the discovery phase.
Solution: Bail out if an expression is not a constant. Require a type for
declared constants.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 14 May 2020 22:45:04 +0200 |
parents | 7587d892c00c |
children | 83573e907c8b |
comparison
equal
deleted
inserted
replaced
20396:89228c88b5c4 | 20397:c225be44692a |
---|---|
1052 return FuncTwo() | 1052 return FuncTwo() |
1053 enddef | 1053 enddef |
1054 def FuncTwo(): string | 1054 def FuncTwo(): string |
1055 return 'two' | 1055 return 'two' |
1056 enddef | 1056 enddef |
1057 let g:res_FuncOne = execute('disass FuncOne') | 1057 let g:res_FuncOne: string = execute('disass FuncOne') |
1058 END | 1058 END |
1059 writefile(lines, 'Xdisassemble') | 1059 writefile(lines, 'Xdisassemble') |
1060 source Xdisassemble | 1060 source Xdisassemble |
1061 | 1061 |
1062 " check that the first function calls the second with DCALL | 1062 " check that the first function calls the second with DCALL |