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

Unity 2022.2.12 IL2CPP android build failed #67

Closed
shpitsmedia opened this issue Dec 3, 2023 · 3 comments
Closed

Unity 2022.2.12 IL2CPP android build failed #67

shpitsmedia opened this issue Dec 3, 2023 · 3 comments

Comments

@shpitsmedia
Copy link

Unity 2022.2.12 IL2CPP android build failed:

error: cannot convert 'Nullable_***' to 'int32_t' (aka 'int') without a conversion operator
bool L_44 = il2cpp_codegen_enum_has_flag((int32_t)L_40, (int32_t)L_43);

Probably IL2CPP bug but maybe you could point us to the right direction?

Cheers.

@CallumDev
Copy link
Contributor

This does look a little bit like an IL2CPP bug as this is definitely all valid C#.

My guess is this comes from MemberConflicts.cs, on line 16 there is a MemberModifierFlags?. Can you check if removing the question mark from that line fixes your IL2CPP error?

@shpitsmedia
Copy link
Author

Amazing, it works (I guess you meant MemberUtilities.cs)?
I also contacted Unity and submitted a bug but sometimes it takes them a while.

Another little issue, when declaring a private field without an assignment the private flag is ignored, for Ex.
Class A
{
private var a;
}

Maybe this scenario should be handled in ClassDefinitionStatement line No. 185 by adding the field?
case TokenType.SemiColon:
fields.add(...)
break;
The question is how can we add a field with a zero/Nil assignment?

Thanks Callum.

@CallumDev
Copy link
Contributor

Moved second issue to #68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants