Debian Codegraph @

modules/gdscript/tests/scripts/runtime/features/conversion_for_default_parameter.gd

raw
1 func literal(x: float = 1):
2 print('x is ', x)
3 print('typeof x is ', typeof(x))
4
5 var inferring := 2
6 func inferred(x: float = inferring):
7 print('x is ', x)
8 print('typeof x is ', typeof(x))
9
10 var weakling = 3
11 func weak(x: float = weakling):
12 print('x is ', x)
13 print('typeof x is ', typeof(x))
14
15 func test():
16 literal()
17 inferred()
18 weak()
19 print('ok')