Mercurial > vim
comparison src/testdir/test_vim9_enum.vim @ 35062:f57990be7526 v9.1.0376
patch 9.1.0376: Vim9: Trailing commands after class/enum keywords ignored
Commit: https://github.com/vim/vim/commit/ac7731895c996acef4d02b784f9952749226e203
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sat Apr 27 11:36:12 2024 +0200
patch 9.1.0376: Vim9: Trailing commands after class/enum keywords ignored
Problem: Vim9: Trailing commands after class/enum keywords ignored
Solution: Remove EX_TRLBAR keyword from command definition
(Yegappan Lakshmanan)
closes: #14649
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 27 Apr 2024 12:00:03 +0200 |
parents | af48c532bd88 |
children |
comparison
equal
deleted
inserted
replaced
35061:04ab7e07642d | 35062:f57990be7526 |
---|---|
95 # Try to define enum in a single command | 95 # Try to define enum in a single command |
96 lines =<< trim END | 96 lines =<< trim END |
97 vim9script | 97 vim9script |
98 enum Something | endenum | 98 enum Something | endenum |
99 END | 99 END |
100 v9.CheckSourceFailure(lines, 'E1420: Missing :endenum', 3) | 100 v9.CheckSourceFailure(lines, 'E488: Trailing characters: | endenum', 2) |
101 | |
102 # another command follows the enum name | |
103 lines =<< trim END | |
104 vim9script | |
105 enum Something | var x = 10 | |
106 Foo | |
107 endenum | |
108 END | |
109 v9.CheckSourceFailure(lines, 'E488: Trailing characters: | var x = 10', 2) | |
101 | 110 |
102 # Try to define an enum with the same name as an existing variable | 111 # Try to define an enum with the same name as an existing variable |
103 lines =<< trim END | 112 lines =<< trim END |
104 vim9script | 113 vim9script |
105 var Something: list<number> = [1] | 114 var Something: list<number> = [1] |