You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Godot shows an error in console if you're using C# 10 feature "File-Scoped namespaces" (ERROR: Failed to determine namespace and class for script)
#61485
Closed
valkyrienyanko opened this issue
May 28, 2022
· 1 comment
If you try to use this feature you will get a error that will flash before your eyes just before the game is done building but you can see the error clearly in VSCode console. (I opened Godot through VSCode)
ERROR: Failed to determine namespace and class for script: res://Scripts/UI/Inventory/ControlInventory.cs.
Parse error: Unexpected token: Symbol
The game seems to run fine. The error is the only annoying thing to see everything the game is started.
Having file-scoped namespaces would make scripts alot easier to read.
Steps to reproduce
Convert any namespace in any script to a file-scoped namespace. Notice the error in the console just before game start.
With file-scoped namespace
Without file-scoped namespace
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered:
Godot version
3.4.4.stable.mono
System information
Windows 10 64-bit
Issue description
C# 10.0 added a new feature "File scoped namespaces"
If you try to use this feature you will get a error that will flash before your eyes just before the game is done building but you can see the error clearly in VSCode console. (I opened Godot through VSCode)
The game seems to run fine. The error is the only annoying thing to see everything the game is started.
Having file-scoped namespaces would make scripts alot easier to read.
Steps to reproduce
Convert any namespace in any script to a file-scoped namespace. Notice the error in the console just before game start.
With file-scoped namespace
Without file-scoped namespace
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: