| 1 |
# GH-79521, GH-86032 |
| 2 |
|
| 3 |
class_name TestStaticMethodAsCallable |
| 4 |
|
| 5 |
static func static_func() -> String: |
| 6 |
return "Test" |
| 7 |
|
| 8 |
static func another_static_func(): |
| 9 |
prints("another_static_func:", static_func.call(), static_func.is_valid()) |
| 10 |
|
| 11 |
func test(): |
| 12 |
var a: Callable = TestStaticMethodAsCallable.static_func |
| 13 |
var b: Callable = static_func |
| 14 |
prints(a.call(), a.is_valid()) |
| 15 |
prints(b.call(), b.is_valid()) |
| 16 |
@warning_ignore("static_called_on_instance") |
| 17 |
another_static_func() |
| 18 |
TestStaticMethodAsCallable.another_static_func() |