Description
Godot version
v4.0.dev.calinou [bfc14a6]
System information
Windows 10
Issue description
Once comparing an enum against an integer in code it will be marked as an error. I am assuming that this is a regression since it did work in GDScript 1.0 (Godot 3.x). Note that this behaviour occurs regardless of the enum value having an integer value assigned to it.
Steps to reproduce
Compare an enum value against an integer inside a GDScript file (see below)
Minimal reproduction project
Create a new GDScript file inside the engine and paste the following:
enum SomeEnum {
VALUE = 1
}
func function():
if 0 == SomeEnum.VALUE:
pass
const integer_const: int = 1
if integer_const == SomeEnum.VALUE:
pass
var integer_var: int = 1
if integer_var == SomeEnum.VALUE: # Error
pass
Activity