1
0
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:
Danil Alexeev
2023-10-10 21:19:15 +03:00
parent c5291a3555
commit 668ba2d1a5
3 changed files with 13 additions and 3 deletions

View File

@@ -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)

View File

@@ -17,3 +17,4 @@ Using self:
-50
5000
4000
123