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

Fix C# glue generation for enums with negative values #77018

Merged
merged 1 commit into from
May 12, 2023

Conversation

RedworkDE
Copy link
Member

Fixes #73004

The error can also happen with 4.x, not just on 3.x.

Test patch I used to trigger this error:

diff --git a/servers/text_server.h b/servers/text_server.h
index af6efb8c7dd..0cb1103722d 100644
--- a/servers/text_server.h
+++ b/servers/text_server.h
@@ -70,7 +70,7 @@ public:
 	};
 
 	enum Orientation {
-		ORIENTATION_HORIZONTAL,
+		ORIENTATION_HORIZONTAL = -1,
 		ORIENTATION_VERTICAL
 	};

Cherry-picks fairly cleanly onto 3.x (it's just a small fix)

@RedworkDE RedworkDE requested a review from a team as a code owner May 12, 2023 20:08
@akien-mga akien-mga added bug topic:buildsystem topic:dotnet cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:4.0 labels May 12, 2023
@akien-mga akien-mga added this to the 4.1 milestone May 12, 2023
@akien-mga akien-mga added the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label May 12, 2023
@akien-mga akien-mga merged commit c64afeb into godotengine:master May 12, 2023
@RedworkDE RedworkDE deleted the net-glue-neg-enum branch May 12, 2023 21:32
@akien-mga
Copy link
Member

Thanks!

@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.4.

@akien-mga
Copy link
Member

There are some conflicts when cherry-picking, I prefer not to hazard resolving them without fully understanding the code, so a dedicated PR would be welcome for 3.x if this is an important bugfix.

@akien-mga akien-mga removed cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release labels Aug 28, 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 this pull request may close these issues.

Mono glue generates invalid code when casting negative number
3 participants