GDScript: Fix constant conversions
This commit is contained in:
parent
218bef90af
commit
31e0ae2012
29 changed files with 204 additions and 105 deletions
|
|
@ -0,0 +1,16 @@
|
|||
const const_color: Color = 'red'
|
||||
|
||||
func func_color(arg_color: Color = 'blue') -> bool:
|
||||
return arg_color == Color.BLUE
|
||||
|
||||
@warning_ignore("assert_always_true")
|
||||
func test():
|
||||
assert(const_color == Color.RED)
|
||||
|
||||
assert(func_color() == true)
|
||||
assert(func_color('blue') == true)
|
||||
|
||||
var var_color: Color = 'green'
|
||||
assert(var_color == Color.GREEN)
|
||||
|
||||
print('ok')
|
||||
Loading…
Add table
Add a link
Reference in a new issue