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

Inferred type export vars are converted incorrectly from Godot 3 to Godot 4. #66006

Closed
HauntedBees opened this issue Sep 17, 2022 · 2 comments
Closed

Comments

@HauntedBees
Copy link

Godot version

v4.0.beta1.official [20d6672]

System information

Windows 8.1

Issue description

When importing a project into the Godot 4 beta (originally written in v3.5.stable.official [991bb6a]), exported variables with inferred types (using :=) are converted incorrectly. The export(type) is correctly changed to @export, but the variable declaration itself is now incorrect.

Steps to reproduce

  1. Create a gdscript file in Godot 3.5 with export(int) var int_export_var := 1 written in it.
  2. Save the project, then import it in Godot 4, selecting Convert Full Project in the import prompt.
  3. The converted line in Godot 4 will be @export var int_export_var: int := 1 instead of the expected @export var int_export_var := 1 or @export var int_export_var: int = 1.

Minimal reproduction project

VariableIssue.zip

Project was created in Godot 3.5.

@KoBeWi KoBeWi added this to the 4.0 milestone Sep 17, 2022
@KoBeWi KoBeWi modified the milestones: 4.0, 4.1 Feb 25, 2023
@YuriSizov YuriSizov modified the milestones: 4.1, 4.x Jun 22, 2023
@rileylyman
Copy link
Contributor

rileylyman commented Dec 17, 2023

This seems to be fixed as of 4.3dev (2d0ee20), tested with 3.5stable and converted script exactly as above, and the output was @export var int_export_var := 1

@Maran23
Copy link
Contributor

Maran23 commented Dec 20, 2023

This seems to be fixed as of 4.3dev

Correct, I actually fixed it some months ago in Godot 4.1. Related PR: #75900
So this issue can be closed. :)

@KoBeWi KoBeWi closed this as completed May 19, 2024
@KoBeWi KoBeWi modified the milestones: 4.x, 4.1 May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

5 participants