Hi,

currently it is by design. Other than that that's a great question.

I personally thought about that as well a while ago. The thing is, that we also support langauge versions that do not implement the new nullable stuff so we already have a number of different cases in the code which tend to become awkward to handle. However, from a users perspective there are arguments for it, indeed.

Have fun,
JensG


PS: If you feel like contributing a patch I would happily review it.



Am 19.06.2025 um 16:03 schrieb Brubaker, Matthew L.:
Hi all,
I'm not sure if this is a bug or me not understanding something. When I define a field as 
required list<double> in my Thrift file, the generated C# class has a nullable list 
property, like List<double>?, instead of a non-nullable list.
Example Thrift:
struct TTest {
   1: required list<double> myList = []
}
Generated C#:
public List<double>? MyList { get; set; }
I expected a non-nullable List<double> property for required fields. Is this 
intentional, or a bug?
Thrift version: 0.21.0
Thanks for your help!
Matt


Reply via email to