Skip to content

Callables of static methods are not valid if accessed via the class's name #79521

Closed
@jtnicholl

Description

Godot version

v4.1.stable.official [9704596], v4.1.1.rc1.official [e709ad4]

System information

Ubuntu 23.04

Issue description

4.1 introduced support for using static methods as callables. However, if the callable is accessed via the class's name, it is considered invalid. This makes using static methods from other classes as callables very difficult.

Steps to reproduce

class_name Test extends Node

static func static_func() -> void:
	pass

func _ready() -> void:
	print(Test.static_func.is_valid()) # prints false
	print(static_func.is_valid()) # prints true

Minimal reproduction project

ClassNameCallables.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions