Change GDScript tests to use InstancePlaceholder as the example abstract

This commit is contained in:
Aaron Franke 2022-10-16 15:53:25 -05:00
parent a7583881af
commit 6a8a9cd279
No known key found for this signature in database
GPG Key ID: 40A1750B977E56BF
5 changed files with 6 additions and 6 deletions

View File

@ -1,2 +1,2 @@
func test():
CanvasItem.new()
InstancePlaceholder.new()

View File

@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
Native class "CanvasItem" cannot be constructed as it is abstract.
Native class "InstancePlaceholder" cannot be constructed as it is abstract.

View File

@ -1,4 +1,4 @@
class A extends CanvasItem:
class A extends InstancePlaceholder:
func _init():
print('no')

View File

@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
Class "abstract_script_instantiate.gd::B" cannot be constructed as it is based on abstract native class "CanvasItem".
Class "abstract_script_instantiate.gd::B" cannot be constructed as it is based on abstract native class "InstancePlaceholder".

View File

@ -170,6 +170,7 @@ protected:
_FORCE_INLINE_ void set_hide_clip_children(bool p_value) { hide_clip_children = p_value; }
GDVIRTUAL0(_draw)
public:
enum {
NOTIFICATION_TRANSFORM_CHANGED = SceneTree::NOTIFICATION_TRANSFORM_CHANGED, //unique
@ -179,7 +180,6 @@ public:
NOTIFICATION_EXIT_CANVAS = 33,
NOTIFICATION_LOCAL_TRANSFORM_CHANGED = 35,
NOTIFICATION_WORLD_2D_CHANGED = 36,
};
/* EDITOR */
@ -189,7 +189,7 @@ public:
// Save and restore a CanvasItem state
virtual void _edit_set_state(const Dictionary &p_state) {}
virtual Dictionary _edit_get_state() const { return Dictionary(); };
virtual Dictionary _edit_get_state() const { return Dictionary(); }
// Used to move the node
virtual void _edit_set_position(const Point2 &p_position) = 0;