Mercurial > vim
comparison src/testdir/test_vim9_class.vim @ 33326:4e531adb3fac v9.0.1928
patch 9.0.1928: Vim9: constructor type checking bug
Commit: https://github.com/vim/vim/commit/b895b0fabce7d952a6617eb69fc1e1597ece8b00
Author: h-east <h.east.727@gmail.com>
Date: Sun Sep 24 15:46:31 2023 +0200
patch 9.0.1928: Vim9: constructor type checking bug
Problem: Vim9: constructor type checking bug
Solution: Fix class constructor regression
closes: #13102
closes: #13113
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 24 Sep 2023 16:00:07 +0200 |
parents | 9062315f9de1 |
children | 19b4f85c2649 |
comparison
equal
deleted
inserted
replaced
33325:46a93a71d4ee | 33326:4e531adb3fac |
---|---|
919 enddef | 919 enddef |
920 | 920 |
921 Check() | 921 Check() |
922 END | 922 END |
923 v9.CheckSourceFailure(lines, 'E1013:') | 923 v9.CheckSourceFailure(lines, 'E1013:') |
924 | |
925 lines =<< trim END | |
926 vim9script | |
927 | |
928 class C | |
929 this.str: string | |
930 def new(str: any) | |
931 enddef | |
932 endclass | |
933 | |
934 def Check() | |
935 try | |
936 var c = C.new(1) | |
937 catch | |
938 assert_report($'Unexpected exception was caught: {v:exception}') | |
939 endtry | |
940 enddef | |
941 | |
942 Check() | |
943 END | |
944 v9.CheckSourceSuccess(lines) | |
924 enddef | 945 enddef |
925 | 946 |
926 def Test_class_object_member_inits() | 947 def Test_class_object_member_inits() |
927 var lines =<< trim END | 948 var lines =<< trim END |
928 vim9script | 949 vim9script |