GDScript: Add abstract methods
Co-authored-by: ryanabx <ryanbrue@hotmail.com>
This commit is contained in:
parent
8f87e60307
commit
a7cf2069d5
27 changed files with 399 additions and 94 deletions
|
|
@ -0,0 +1,8 @@
|
|||
extends RefCounted
|
||||
|
||||
abstract class A:
|
||||
abstract func f():
|
||||
pass
|
||||
|
||||
func test():
|
||||
pass
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_PARSER_ERROR
|
||||
Expected end of statement after abstract function declaration, found ":" instead.
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
extends RefCounted
|
||||
|
||||
abstract class A:
|
||||
# Currently, an abstract function cannot be static.
|
||||
abstract static func f()
|
||||
|
||||
func test():
|
||||
pass
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_PARSER_ERROR
|
||||
Expected "class" or "func" after "abstract".
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
GDTEST_PARSER_ERROR
|
||||
Expected "class_name", "extends", or "class" after "abstract".
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_PARSER_ERROR
|
||||
Expected "class_name", "extends", "class", or "func" after "abstract".
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
extends RefCounted
|
||||
|
||||
abstract class A:
|
||||
abstract abstract func f()
|
||||
|
||||
func test():
|
||||
pass
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_PARSER_ERROR
|
||||
Expected "class" or "func" after "abstract".
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
extends RefCounted
|
||||
|
||||
abstract class A:
|
||||
# Currently, an abstract function cannot be static.
|
||||
static abstract func f()
|
||||
|
||||
func test():
|
||||
pass
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_PARSER_ERROR
|
||||
Expected "func" or "var" after "static".
|
||||
Loading…
Add table
Add a link
Reference in a new issue