Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 28281:bd1dcc605e58 v8.2.4666
patch 8.2.4666: Vim9: assignment not recognized in skipped block
Commit: https://github.com/vim/vim/commit/97f8c1081ec6d6d158bb51e18fa23a36d3ed5623
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 2 19:43:57 2022 +0100
patch 8.2.4666: Vim9: assignment not recognized in skipped block
Problem: Vim9: assignment not recognized in skipped block.
Solution: When skipping assume identifier exists. (closes https://github.com/vim/vim/issues/10059)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 02 Apr 2022 20:45:03 +0200 |
parents | 22c8cafe8c9c |
children | fae7d94220e3 |
comparison
equal
deleted
inserted
replaced
28280:e998d4284855 | 28281:bd1dcc605e58 |
---|---|
2001 endfor | 2001 endfor |
2002 endif | 2002 endif |
2003 assert_equal([3, 4], result) | 2003 assert_equal([3, 4], result) |
2004 enddef | 2004 enddef |
2005 DefFalse() | 2005 DefFalse() |
2006 | |
2007 def BuildDiagrams() | |
2008 var diagrams: list<any> | |
2009 if false | |
2010 var max = 0 | |
2011 for v in diagrams | |
2012 var l = 3 | |
2013 if max < l | max = l | endif | |
2014 v->add(l) | |
2015 endfor | |
2016 endif | |
2017 enddef | |
2018 BuildDiagrams() | |
2006 END | 2019 END |
2007 v9.CheckDefAndScriptSuccess(lines) | 2020 v9.CheckDefAndScriptSuccess(lines) |
2008 enddef | 2021 enddef |
2009 | 2022 |
2010 def Test_for_loop() | 2023 def Test_for_loop() |