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

no union types in godot 4.2.1? #9529

Closed
zbkha opened this issue Apr 15, 2024 · 6 comments
Closed

no union types in godot 4.2.1? #9529

zbkha opened this issue Apr 15, 2024 · 6 comments
Labels

Comments

@zbkha
Copy link

zbkha commented Apr 15, 2024

Describe the project you are working on

1

Describe the problem or limitation you are having in your project

var a: int | float = 1
It throws error! No union types in godot 4.2.1? How can I avoid it!

Describe the feature / enhancement and how it helps to overcome the problem or limitation

1

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

1

If this enhancement will not be used often, can it be worked around with a few lines of script?

1

Is there a reason why this should be core and not an add-on in the asset library?

1

@AThousandShips
Copy link
Member

See:

In the future please fill in the proposal properly, none of the questions are optional

@AThousandShips AThousandShips closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
@zbkha
Copy link
Author

zbkha commented Apr 15, 2024

See:

In the future please fill in the proposal properly, none of the questions are optional

So I must code var a = 1 instead of var a: int | float = 1! Otherwise game crashes!

@AThousandShips
Copy link
Member

Please read the proposal I linked, you can't do this feature yet, but this proposal is a duplicate, and not filled out correctly, so if you have questions add them to that proposal, otherwise just wait for it to be decided on

@zbkha
Copy link
Author

zbkha commented Apr 15, 2024

Please read the proposal I linked, you can't do this feature yet, but this proposal is a duplicate, and not filled out correctly, so if you have questions add them to that proposal, otherwise just wait for it to be decided on

I know Godot refuse to add the feature, but now I only care how to avoid throwing error. I want to know if there are any setting to avoid it. If var a = 1 is the only way, I will code it.

@AThousandShips
Copy link
Member

No one is refusing, please listen, did you look at the proposal?

Please do not comment more here, no one is refusing this feature, add your support to the proper proposal and have patience

@zbkha
Copy link
Author

zbkha commented Apr 15, 2024

No one is refusing, please listen, did you look at the proposal?

Please do not comment more here, no one is refusing this feature, add your support to the proper proposal and have patience

You are right. 2024 - 1018 = 6.

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

No branches or pull requests

2 participants