patch 8.2.5039: confusing error if first argument of popup_create() is wrong
Problem: Confusing error if first argument of popup_create() is wrong.
Solution: Give a more informative error.
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 178f235..a78816b 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -1072,7 +1072,7 @@
call assert_fails('call popup_create("text", #{borderchars: "none"})', 'E714:')
call popup_clear()
- call assert_fails('call popup_create([#{text: "text"}, 666], {})', 'E715:')
+ call assert_fails('call popup_create([#{text: "text"}, 666], {})', 'E1284: Argument 1, list item 2: Dictionary required')
call popup_clear()
call assert_fails('call popup_create([#{text: "text", props: "none"}], {})', 'E714:')
call popup_clear()
@@ -1091,6 +1091,11 @@
call popup_clear()
call assert_fails('call popup_create("text", #{tabpage : 4})', 'E997:')
call popup_clear()
+
+ call assert_fails('call popup_create(range(10), {})', 'E1024:')
+ call popup_clear()
+ call assert_fails('call popup_create([1, 2], {})', 'E1284: Argument 1, list item 1: Dictionary required')
+ call popup_clear()
endfunc
func Test_win_execute_closing_curwin()