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

Wrong syntax highlight when using static typing for for loop variable #90370

Closed
timothyqiu opened this issue Apr 8, 2024 · 0 comments · Fixed by #89659
Closed

Wrong syntax highlight when using static typing for for loop variable #90370

timothyqiu opened this issue Apr 8, 2024 · 0 comments · Fixed by #89659

Comments

@timothyqiu
Copy link
Member

timothyqiu commented Apr 8, 2024

Tested versions

  • Not reproducible: 4.2.1.stable
  • Reproducible: 4.3.dev3, master[e5b4ef8]

System information

Arch Linux

Issue description

Note how array on Line 9 and Line 12 are highlighted differently:

image

It seems that the highlighter thinks everything after in is still part of a type.

Code in the Screenshot
extends Node2D

var sprite: Sprite2D


func _ready() -> void:
	var array := [1, 2, 3]
	
	for e: int in array:
		print(e)
	
	for e in array:
		print(e)
	
	for e: int in sprite.vframes:
		print(e)
	
	for e in sprite.vframes:
		print(e)

Steps to reproduce

Paste the code in the built-in script editor.

Minimal reproduction project (MRP)

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant