mirror of
				https://github.com/vim/vim.git
				synced 2025-10-31 09:57:14 -04:00 
			
		
		
		
	patch 9.0.1897: Vim9: confusing error with .= in compiled functions
Problem:  Vim9: confusing error with .= in compiled functions
Solution: Check in error condition, if .= was attempted and in that case
          give a different error message.
closes: #12972
closes: #13066
Signed-off-by: Christian Brabandt <cb@256bit.org>
			
			
This commit is contained in:
		| @@ -79,6 +79,25 @@ def Test_vim9cmd() | ||||
|       legacy echo version | ||||
|   END | ||||
|   v9.CheckScriptSuccess(lines) | ||||
|  | ||||
|   lines =<< trim END | ||||
|     vim9script | ||||
|     def Func() | ||||
|         var d: dict<string> | ||||
|         d.k .= '' | ||||
|     enddef | ||||
|     defcompile | ||||
|   END | ||||
|   v9.CheckScriptFailure(lines, 'E985:') | ||||
|   lines =<< trim END | ||||
|     vim9script | ||||
|     def Func() | ||||
|         var d: dict<string> | ||||
|         d.k ,= '' | ||||
|     enddef | ||||
|     defcompile | ||||
|   END | ||||
|   v9.CheckScriptFailure(lines, 'E1017:') | ||||
| enddef | ||||
|  | ||||
| def Test_defcompile_fails() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user