File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -630,6 +630,17 @@ def Test_nested_function()
630630 assert_equal (2 , Test ())
631631 END
632632 CheckScriptSuccess (lines )
633+
634+ lines = << trim END
635+ vim9script
636+ def Outer ()
637+ def Inner ()
638+ echo ' hello'
639+ enddef burp
640+ enddef
641+ defcompile
642+ END
643+ CheckScriptFailure (lines , ' E1173: Text found after enddef: burp' , 3 )
633644enddef
634645
635646def Test_not_nested_function ()
Original file line number Diff line number Diff line change @@ -822,6 +822,8 @@ get_function_body(
822822 else if (* p != NUL && * p != (vim9_function ? '#' : '"' )
823823 && (vim9_function || p_verbose > 0 ))
824824 {
825+ SOURCING_LNUM = sourcing_lnum_top
826+ + newlines -> ga_len + 1 ;
825827 if (eap -> cmdidx == CMD_def )
826828 semsg (_ (e_text_found_after_enddef_str ), p );
827829 else
Original file line number Diff line number Diff line change @@ -755,6 +755,8 @@ static char *(features[]) =
755755
756756static int included_patches [] =
757757{ /* Add new patch number below this line */
758+ /**/
759+ 3352 ,
758760/**/
759761 3351 ,
760762/**/
You can’t perform that action at this time.
0 commit comments