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

Incorrect syntax highlighting of inline function body within the argument list of a function call #91680

Closed
radishes opened this issue May 7, 2024 · 1 comment

Comments

@radishes
Copy link
Contributor

radishes commented May 7, 2024

Tested versions

v4.2.2.stable.official [15073af]

System information

Windows 10

Issue description

When an inline function definition within another function's argument list contains an inline if statement, the syntax highlighting of the statement following the inline if is incorrectly applied.

image

In this screenshot, the final my_var is colored with the color used by types in an argument list. Presumably because the statement comes after the colon : character of the if, which is the same way a type would be specified in an argument list.

Steps to reproduce

func test():
	var my_var = true
	tree_entered.connect(func(): if my_var: my_var = false)

Minimal reproduction project (MRP)

See steps to reproduce

@radishes radishes changed the title Incorrect syntax highlighting of inline function body Incorrect syntax highlighting of inline function body within the argument list of a function call May 7, 2024
@Maran23
Copy link
Contributor

Maran23 commented May 8, 2024

Is fixed in the latest Godot-4-3-dev-6, probably by #86176.

@akien-mga akien-mga added this to the 4.3 milestone May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants