Patch 9.0.1248
Problem:    Cannot export an interface. (Ernie Rael)
Solution:   Add the EX_EXPORT flag to :interface. (closes #11884)
Files:      src/ex_cmds.h, src/testdir/test_vim9_class.vim


*** ../vim-9.0.1247/src/ex_cmds.h       2023-01-22 21:14:32.621863614 +0000
--- src/ex_cmds.h       2023-01-26 20:28:10.934745059 +0000
***************
*** 758,764 ****
        EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
        ADDR_NONE),
  EXCMD(CMD_interface,  "interface",    ex_class,
!       EX_EXTRA|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
        ADDR_NONE),
  EXCMD(CMD_isearch,    "isearch",      ex_findpat,
        EX_BANG|EX_RANGE|EX_DFLALL|EX_WHOLEFOLD|EX_EXTRA|EX_CMDWIN|EX_LOCK_OK,
--- 758,764 ----
        EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
        ADDR_NONE),
  EXCMD(CMD_interface,  "interface",    ex_class,
!       EX_EXTRA|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK|EX_EXPORT,
        ADDR_NONE),
  EXCMD(CMD_isearch,    "isearch",      ex_findpat,
        EX_BANG|EX_RANGE|EX_DFLALL|EX_WHOLEFOLD|EX_EXTRA|EX_CMDWIN|EX_LOCK_OK,
*** ../vim-9.0.1247/src/testdir/test_vim9_class.vim     2023-01-24 
15:07:00.428562536 +0000
--- src/testdir/test_vim9_class.vim     2023-01-26 20:33:30.622684873 +0000
***************
*** 822,827 ****
--- 822,850 ----
        endinterface
    END
    v9.CheckScriptFailure(lines, 'E1345: Not a valid command in an interface: 
return 5')
+ 
+   lines =<< trim END
+       vim9script
+       export interface EnterExit
+           def Enter(): void
+           def Exit(): void
+       endinterface
+   END
+   writefile(lines, 'XdefIntf.vim', 'D')
+ 
+   lines =<< trim END
+       vim9script
+       import './XdefIntf.vim' as defIntf
+       export def With(ee: defIntf.EnterExit, F: func)
+           ee.Enter()
+           try
+               F()
+           finally
+               ee.Exit()
+           endtry
+       enddef
+   END
+   v9.CheckScriptSuccess(lines)
  enddef
  
  def Test_class_implements_interface()
*** ../vim-9.0.1247/src/version.c       2023-01-26 14:14:18.839484388 +0000
--- src/version.c       2023-01-26 20:29:21.958731806 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1248,
  /**/

-- 
Master: Boy, there is nothing more for you to learn
Student: I didn't know that!

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230126203737.AD9DF1C0EC3%40moolenaar.net.

Raspunde prin e-mail lui