Skip to content

fixes failures on expression-bodied constructors#145

Closed
ghost wants to merge 4 commits intomasterfrom
unknown repository
Closed

fixes failures on expression-bodied constructors#145
ghost wants to merge 4 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Sep 28, 2025

these changes enable support for expression-bodied constructors, such as:

public class UserDefinedClass
{
    private readonly int _value;

    // NOTE: this now compiles
    public CustomUserClass(int value) => _value = value;
}

the above code as is fails in the current implementation, the proposed modification fixes the failure.

additionally, I further proposed other changes regarding the internal UdonSharpInternalUtility.GetTypeID utilitarian subroutine, those changes preserve the previous behaviour of the subroutine; therefore the changes are benign. it is mainly for modernization reasons (although it is slightly more performant).

is SHA256 really needed for the purpose of hashing? if not, will it be a breaking change to use a much more efficient algorithm?
I had XxHash64.HashToUInt64 (from System.IO.Hashing) in mind as a much, much faster and memory efficient alternative; if there isn't much interest in improving performance, then don't mind my suggestion.

Copy link
Copy Markdown

@Deantwo Deantwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

Not sure why you changed // to /* */ though.

@ghost
Copy link
Copy Markdown
Author

ghost commented Oct 1, 2025

@Deantwo I don't exactly remember... I think I tried to uncomment it to see what the IDE (VS) had to suggest, and then reapplied the comment using CTRL + SHIFT + / once I was done with it. the /* ... */ comment style was the one pick by the IDE... yeah, that's probably what happened. I can revert it to the more idiomatic commenting style if it's necessary.

@ghost ghost closed this by deleting the head repository Apr 14, 2026
This pull request was closed.
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

Successfully merging this pull request may close these issues.

1 participant