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

Parser Bug While Entering Code #80266

Closed
VRNocturne opened this issue Aug 4, 2023 · 6 comments · Fixed by #83257
Closed

Parser Bug While Entering Code #80266

VRNocturne opened this issue Aug 4, 2023 · 6 comments · Fixed by #83257

Comments

@VRNocturne
Copy link

Godot version

v4.1.stable.official [9704596]

System information

Godot v4.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 Ti (NVIDIA; 31.0.15.3179) - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)

Issue description

While typing code (a match statement in case it's relevant) into the IDE, I started seeing parser errors.

Steps to reproduce

Opened my project

Started editing code

ran project once

Continued editing code, this is when I started seeing the parser errors

In the test project (attached), it just started happening while making the const values

Minimal reproduction project

GodotTest.zip

@rsubtil
Copy link
Contributor

rsubtil commented Aug 8, 2023

Can you send some screenshots and/or a video clip of the issue you're facing? I tried messing around on the linked project, but I can't seem to trigger any parser errors.

Also I've tested with v4.1.1-stable, please check if this has been fixed with this latest release.

@VRNocturne
Copy link
Author

VRNocturne commented Aug 8, 2023 via email

@rsubtil
Copy link
Contributor

rsubtil commented Aug 8, 2023

Thanks, I've managed to replicate the issue. I'll detail it here for someone else to tackle since GDScript stuff is not my "forte" 😉

On the following code:

enum MyEnum {
	VALUE1,
	VALUE2,
}

func some_func() -> int:
	var some_var = randi_range(1, 6)
	
	match some_var:
  • On a match value, writing "" instead of : triggers a modules/gdscript/gdscript_parser.cpp:4337 - Parser bug: Mismatch in extents tracking stack. error:
Peek.2023-08-08.15-39.mp4
  • Code completion on a return value of an enum triggers Parser bug (please report): Trying to check compatibility of unset value type error. If the function's return type is omitted, the error no longer occurs:
Peek.2023-08-08.15-43.mp4

@ilia-abbasi
Copy link

I have the same problem (Trying to check compatibility of unset value type) on Godot v4.1.1.stable - Windows 10.0.19045.3324 - Compatibility renderer - NVIDIA GeForce 9400 GT - 8 GB RAM - Intel(R) Pentium(R) CPU G4400 3.30GHz

@JMVRy
Copy link

JMVRy commented Oct 8, 2023

Same/similar issue on 4.1.2.stable.mono as well, with the following code:

func example() -> Vector2:
    return Vector2.ZERO

When adding a . to the end, or removing .ZERO and trying to type it back, the "Parser bug (please report)" occurs

@dalexeev
Copy link
Member

  • On a match value, writing "" instead of : triggers a modules/gdscript/gdscript_parser.cpp:4337 - Parser bug: Mismatch in extents tracking stack.
  • Code completion on a return value of an enum triggers

When adding a . to the end, or removing .ZERO and trying to type it back, the "Parser bug (please report)" occurs

@dalexeev dalexeev added this to the 4.2 milestone Oct 13, 2023
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.

6 participants