X Tutup
Skip to content

Allow trailing comma in preload#110775

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
fstxz:preload-comma
Oct 1, 2025
Merged

Allow trailing comma in preload#110775
Repiteo merged 1 commit intogodotengine:masterfrom
fstxz:preload-comma

Conversation

@fstxz
Copy link
Contributor

@fstxz fstxz commented Sep 22, 2025

Fixes #110773

I wanted to add a test, but I don't know how to test preload, it complains that the file I am trying to load doesn't exist (which makes sense, to be fair)

@fstxz fstxz requested a review from a team as a code owner September 22, 2025 10:17
@Chaosus Chaosus added this to the 4.6 milestone Sep 22, 2025
@fstxz
Copy link
Contributor Author

fstxz commented Sep 23, 2025

Failed build doesn't seem to be related to the PR, I've seen the same error on master.

@Calinou
Copy link
Member

Calinou commented Sep 24, 2025

Can you check if assert() is also affected by this issue?

@fstxz
Copy link
Contributor Author

fstxz commented Sep 24, 2025

@Calinou no, assert() is not affected.

Both of these work:

assert(false,)
assert(false, "error",)

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. Code looks good to me.

extends Node2D

var test = preload("res://node_2d.gd",)

func _ready():
	print(test)

@Repiteo Repiteo merged commit 8f386fd into godotengine:master Oct 1, 2025
39 of 40 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 1, 2025

Thanks!

@fstxz fstxz deleted the preload-comma branch October 2, 2025 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parse error when preload has a trailing comma

4 participants

X Tutup