forked from aniani/vim
patch 9.0.1885: Vim9: no support for abstract methods
Problem: Vim9: no support for abstract methods Solution: Add support for defining abstract methods in an abstract class closes: #13044 closes: #13046 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
committed by
Christian Brabandt
parent
86cfb39030
commit
7bcd25cad3
@@ -5850,6 +5850,7 @@ abandon editing.txt /*abandon*
|
||||
abbreviations map.txt /*abbreviations*
|
||||
abel.vim syntax.txt /*abel.vim*
|
||||
abs() builtin.txt /*abs()*
|
||||
abstract-method vim9class.txt /*abstract-method*
|
||||
acos() builtin.txt /*acos()*
|
||||
active-buffer windows.txt /*active-buffer*
|
||||
ada#Create_Tags() ft_ada.txt /*ada#Create_Tags()*
|
||||
|
||||
@@ -358,6 +358,16 @@ class, for which objects can be created. Example: >
|
||||
An abstract class is defined the same way as a normal class, except that it
|
||||
does not have any new() method. *E1359*
|
||||
|
||||
*abstract-method*
|
||||
An abstract method can be defined in an abstract class by using the "abstract"
|
||||
prefix when defining the function: >
|
||||
|
||||
abstract class Shape
|
||||
abstract def Draw()
|
||||
endclass
|
||||
|
||||
A class extending the abstract class must implement all the abstract methods.
|
||||
Class methods in an abstract class can also be abstract methods.
|
||||
|
||||
==============================================================================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user