| 1 |
# https://github.com/godotengine/godot/issues/73273 |
| 2 |
|
| 3 |
func other(callable : Callable): |
| 4 |
callable.call() |
| 5 |
|
| 6 |
func four_parameters(_a, callable : Callable, b=func(): print(10)): |
| 7 |
callable.call() |
| 8 |
b.call() |
| 9 |
|
| 10 |
func test(): |
| 11 |
var v |
| 12 |
@warning_ignore("confusable_capture_reassignment") |
| 13 |
v=func():v=1 |
| 14 |
if true: v=1 |
| 15 |
print(v) |
| 16 |
print() |
| 17 |
|
| 18 |
@warning_ignore("standalone_ternary") |
| 19 |
v=func(): print(2) if false else print(3) |
| 20 |
@warning_ignore("unsafe_cast") |
| 21 |
(v as Callable).call() |
| 22 |
print() |
| 23 |
|
| 24 |
v=func(): |
| 25 |
print(4) |
| 26 |
print(5) |
| 27 |
@warning_ignore("unsafe_cast") |
| 28 |
if true: (v as Callable).call() |
| 29 |
print() |
| 30 |
|
| 31 |
@warning_ignore("unsafe_call_argument") |
| 32 |
other(v) |
| 33 |
print() |
| 34 |
|
| 35 |
other(func(): print(6)) |
| 36 |
print() |
| 37 |
|
| 38 |
other(func(): |
| 39 |
print(7) |
| 40 |
print(8) |
| 41 |
) |
| 42 |
print() |
| 43 |
|
| 44 |
four_parameters(1,func():print(9)) |
| 45 |
four_parameters(1,func():print(9), func(): print(11)) |
| 46 |
four_parameters(1,func(): |
| 47 |
print(12) |
| 48 |
print(13) |
| 49 |
, func(): print(11)) |
| 50 |
print() |
| 51 |
|
| 52 |
from_ticket() |
| 53 |
|
| 54 |
func from_ticket(): |
| 55 |
var _v |
| 56 |
if true: _v = (func(): test()) |
| 57 |
if true: _v = (func(): test()) |
| 58 |
if true: _v = (func(): test()) |
| 59 |
|
| 60 |
if true: _v = func(): test() |
| 61 |
if true: _v = func(): test() |
| 62 |
print(14) |