sbox-issues icon indicating copy to clipboard operation
sbox-issues copied to clipboard

Allow `[Sync]` to support the new `field` attribute

Open matekdev opened this issue 1 month ago • 0 comments

What can't you do?

C# added field backed properties https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-14#the-field-keyword

[Sync]
public ItemState State
{
	get => field;
	set
	{
		field = value;
		UpdateState();
	}
}

This actually ends up failing to compile which I'm a bit surprised, looks like you guys will have to do something on your end to support it. It works completely fine when the [Sync] attribute is removed.

How would you like it to work?

^

What have you tried?

^

Additional context

Image

matekdev avatar Nov 14 '25 08:11 matekdev