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
But I suppose insofar as it uses PrivateImplementationDetails, solving string switching would be a simpler introduction, and maybe another solution would manifest itself. That seems somewhat simpler, as you only have to deal with the munged up awful names
Hi! Yes, the "uggly" approach is made by the C# IL compiler, we are not supporting Array initializators yet, I suggest you to create, in the C# side, the array as follows:
Instead of:
class foo {
void baz() {
float[] bar = { 1, 2, 3 };
}
};
Use:
class foo {
void baz() {
float[] bar = new float[3];
bar[0] = 1;
bar[1] = 2;
bar[2] = 3;
}
};
Otherwise, C# IL compiler will generate this ugly stuff and then AlterNative will generate something strange that will not compile.
This c# will crash AlterNative:
class foo { float[] bar = { 1,2,3 }; };
It's easier to see why that might be when you try this:
which results in
For 1 or 2 elements, the c# compiler will emit array stores. For the 3rd element it begins emitting that ugly hacky approach.
The text was updated successfully, but these errors were encountered: