You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
GDScript: Allow empty parentheses for property getter declaration
This commit is contained in:
@@ -6,6 +6,9 @@ var property:
|
||||
set(value):
|
||||
_backing = value - 1000
|
||||
|
||||
var property_2:
|
||||
get(): # Allow parentheses.
|
||||
return 123
|
||||
|
||||
func test():
|
||||
print("Not using self:")
|
||||
@@ -35,3 +38,5 @@ func test():
|
||||
self.property = 5000
|
||||
print(self.property)
|
||||
print(self._backing)
|
||||
|
||||
print(property_2)
|
||||
|
||||
@@ -17,3 +17,4 @@ Using self:
|
||||
-50
|
||||
5000
|
||||
4000
|
||||
123
|
||||
|
||||
Reference in New Issue
Block a user