Background and motivation
The runtime ignores FixedAddressValueType/ThreadStatic if the field isn't static, this might lead to unexpected GC holes/logic bugs if the programmer doesn't know this.
API Proposal
Warn on FixedAddressValueType/ThreadStatic if the field isn't static.
API Usage
class C
{
[FixedAddressValueType]
public Int128 S; // Warns
[ThreadStatic]
public int I; // Warns
}
Alternative Designs
See #129664 for discussion about this.
Risks
No response
Background and motivation
The runtime ignores
FixedAddressValueType/ThreadStaticif the field isn't static, this might lead to unexpected GC holes/logic bugs if the programmer doesn't know this.API Proposal
Warn on
FixedAddressValueType/ThreadStaticif the field isn't static.API Usage
Alternative Designs
See #129664 for discussion about this.
Risks
No response