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

Can't use local constant as type #80960

Closed
KoBeWi opened this issue Aug 24, 2023 · 0 comments · Fixed by #80964
Closed

Can't use local constant as type #80960

KoBeWi opened this issue Aug 24, 2023 · 0 comments · Fixed by #80964

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Aug 24, 2023

Godot version

4.2 dev3

System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

Issue description

func _ready() -> void:
	const Type = preload("res://Script.gd")
	var test: Type

image

Works if type is outside function.

Steps to reproduce

See above.

Minimal reproduction project

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.

2 participants