mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
GDScript: Make setter parameter type same as variable type
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
var with_setter := 0:
|
||||
set(val):
|
||||
var x: String = val
|
||||
with_setter = val
|
||||
|
||||
func test():
|
||||
with_setter = 1
|
||||
print(with_setter)
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_ANALYZER_ERROR
|
||||
Value of type "int" cannot be assigned to a variable of type "String".
|
||||
Reference in New Issue
Block a user