Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 21831:d8422de73113 v8.2.1465
patch 8.2.1465: Vim9: subscript not handled properly
Commit: https://github.com/vim/vim/commit/56acb0943ede35cd9d2f6667cde2442819ccbf59
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 16 14:48:19 2020 +0200
patch 8.2.1465: Vim9: subscript not handled properly
Problem: Vim9: subscript not handled properly.
Solution: Adjust error message. Remove dead code. Disallow string to
number conversion in scripts.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 16 Aug 2020 15:00:05 +0200 |
parents | 0deb6f96a5a3 |
children | e3f9528bddda |
comparison
equal
deleted
inserted
replaced
21830:bef87368c676 | 21831:d8422de73113 |
---|---|
791 catch /E684:/ | 791 catch /E684:/ |
792 n = 99 | 792 n = 99 |
793 endtry | 793 endtry |
794 assert_equal(99, n) | 794 assert_equal(99, n) |
795 | 795 |
796 # TODO: this will change when index on "any" works | |
796 try | 797 try |
797 n = g:astring[3] | 798 n = g:astring[3] |
798 catch /E714:/ | 799 catch /E1029:/ |
799 n = 77 | 800 n = 77 |
800 endtry | 801 endtry |
801 assert_equal(77, n) | 802 assert_equal(77, n) |
802 | 803 |
803 try | 804 try |
804 n = l[g:astring] | 805 n = l[g:astring] |
805 catch /E39:/ | 806 catch /E1029:/ |
806 n = 77 | 807 n = 88 |
807 endtry | 808 endtry |
808 assert_equal(77, n) | 809 assert_equal(88, n) |
809 | 810 |
810 try | 811 try |
811 n = s:does_not_exist | 812 n = s:does_not_exist |
812 catch /E121:/ | 813 catch /E121:/ |
813 n = 111 | 814 n = 111 |