• Mormegil's avatar
    Union accessors in C# should use generic type for the table · 221193ea
    Mormegil authored
    When accessing a union field, we should return the same object type
    as was given to the method, i.e. the parameter should have a generic
    type for any Table-derived type. This way, we do not need to make
    superfluous casts (which also reduce type safety) like
    
    var myUnionType = (MyUnionType)buff.GetUnionField(new MyUnionType());
    
    when we can do just
    var myUnionType = buff.GetUnionField(new MyUnionType());
    
    Change-Id: Idac1b638e46cc50b1f2dc19f10741481202b1515
    221193ea
Name
Last commit
Last update
..
Any.cs Loading commit data...
Any.go Loading commit data...
Any.java Loading commit data...
Color.cs Loading commit data...
Color.go Loading commit data...
Color.java Loading commit data...
Monster.cs Loading commit data...
Monster.go Loading commit data...
Monster.java Loading commit data...
Stat.cs Loading commit data...
Stat.go Loading commit data...
Stat.java Loading commit data...
Test.cs Loading commit data...
Test.go Loading commit data...
Test.java Loading commit data...
Vec3.cs Loading commit data...
Vec3.go Loading commit data...
Vec3.java Loading commit data...