comparison src/testdir/test_vim9_func.vim @ 25046:2f702d19013a v8.2.3060

patch 8.2.3060: Vim9: cannot use ternary operator in parenthesis Commit: https://github.com/vim/vim/commit/98f9a5f4cbe6061e09bccf6074afe0a88a504219 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 26 22:22:38 2021 +0200 patch 8.2.3060: Vim9: cannot use ternary operator in parenthesis Problem: Vim9: cannot use ternary operator in parenthesis. Solution: Do not use "=~" for a default argument value. (closes https://github.com/vim/vim/issues/8462)
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Jun 2021 22:30:05 +0200
parents 3f39b6b73019
children de29f9a76233
comparison
equal deleted inserted replaced
25045:bb817601d9f5 25046:2f702d19013a
925 925
926 lines =<< trim END 926 lines =<< trim END
927 var a = 0 927 var a = 0
928 var b = (a == 0 ? 1 : 2) 928 var b = (a == 0 ? 1 : 2)
929 assert_equal(1, b) 929 assert_equal(1, b)
930 var txt = 'a'
931 b = (txt =~ 'x' ? 1 : 2)
932 assert_equal(2, b)
930 END 933 END
931 CheckDefAndScriptSuccess(lines) 934 CheckDefAndScriptSuccess(lines)
932 935
933 lines =<< trim END 936 lines =<< trim END
934 def ShadowLocal() 937 def ShadowLocal()