Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDScript: Allow empty parentheses for property getter declaration #83120

Conversation

dalexeev
Copy link
Member

@dalexeev dalexeev added this to the 4.x milestone Oct 10, 2023
@dalexeev dalexeev requested a review from a team as a code owner October 10, 2023 18:21
@dalexeev dalexeev force-pushed the gds-allow-property-getter-empty-parentheses branch from 429007a to 7558d3d Compare October 11, 2023 06:39
@dalexeev dalexeev force-pushed the gds-allow-property-getter-empty-parentheses branch from 7558d3d to 668ba2d Compare October 11, 2023 06:54
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected.

Syntax highlighting as it appears in the editor:

image

Testing code:

var hello = 25:
	get():
		print("get: hello")
		return hello
	set(value):
		print("set: hello = %d" % value)
		hello = value

func _ready() -> void:
	hello = 25
	hello = 26
	hello = 27
	print(hello)

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jan 4, 2024
@akien-mga akien-mga merged commit 150f2a7 into godotengine:master Jan 4, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@dalexeev dalexeev deleted the gds-allow-property-getter-empty-parentheses branch January 4, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants