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 ints can take floats in a release build #42124

Closed
KoBeWi opened this issue Sep 16, 2020 · 6 comments
Closed

Inferred ints can take floats in a release build #42124

KoBeWi opened this issue Sep 16, 2020 · 6 comments

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Sep 16, 2020

Godot version:

3.2.3 rc6
Not sure about master

Issue description:

Check this code:

extends Node2D

var test1 := 120
var test2: int = 120

func _ready() -> void:
	test1 = 120.15
	test2 = 120.15
	$Label.text = str(test1)
	$Label2.text = str(test2)

When you run it in editor or debug build, both labels show 120. In a release build, the first label shows 120.15

Minimal reproduction project:

ReproductionProject.zip

@Calinou
Copy link
Member

Calinou commented Sep 16, 2020

I can reproduce this on 3.2.2 and 3.2 (official Linux release export templates).

With Godot 3.1.2 and 3.1's release export templates, both fields display 120.15. They both display 120 when using a debug export template though.

@KoBeWi
Copy link
Member Author

KoBeWi commented Sep 16, 2020

Impossible to test in master due to #42127

@JestemStefan
Copy link
Contributor

JestemStefan commented Aug 10, 2021

Can't reproduce in https://downloads.tuxfamily.org/godotengine/testing/4.0/4.0-dev.20210727/

I mean it shows 120 in release build.
var test1 := 120 works
var test2: int = 120 works
obraz

Here is a project with exports to check. I hope it helps
https://drive.google.com/file/d/1qIgkjMTanvA_7TZk5pcXGvoEffBqbp4w/view?usp=sharing

@JestemStefan
Copy link
Contributor

JestemStefan commented Aug 10, 2021

In 3.3.2 in Windows release export:
obraz

var test1 := 120 fail
var test2: int = 120 works

Project with exports. I can't test linux export:
https://drive.google.com/file/d/1wH_jcNX9H-cJrMKf9io2F6lcu-wza81c/view?usp=sharing

@akien-mga
Copy link
Member

Confirmed fixed in master, so this is a 3.x only issue now.

@akien-mga
Copy link
Member

Fixed by #57851.

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