-
Notifications
You must be signed in to change notification settings - Fork 39
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 issue with empty initializer #632
Conversation
For
|
I think @kant2002 mentioned he still works on this one. |
9ff8b19
to
9eb0563
Compare
if (i != 0) | ||
{ | ||
instructions.Add(Instruction.Create(OpCodes.Ldc_I4, i)); | ||
instructions.Add(Instruction.Create(OpCodes.Sizeof, element)); // size = sizeof(array element) | ||
instructions.Add(Instruction.Create(OpCodes.Mul)); // offset = id * size | ||
instructions.Add(Instruction.Create(OpCodes.Add)); // offset = id * size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like the comment is wrong. What does this actually do?
instructions.Add(Instruction.Create(OpCodes.Ldloc, newobj)); // push new object | ||
if (_prefixAction is not null) | ||
{ | ||
_prefixAction(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it okay that _prefixAction
gets called twice? Let's maybe write some comment about its purpose and possible behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to say that I don't like the business around prefixAction
and postfixAction
boo much, but if it works, then it works.
Thanks!
No description provided.