icerpc / icerpc-csharp

A C# RPC framework built for QUIC, with bidirectional streaming, first-class async/await, and Protobuf support.
https://docs.icerpc.dev
Apache License 2.0
101 stars 13 forks source link

Fix Tagged Custom Types with Slice1 #3919

Closed InsertCreativityHere closed 6 months ago

InsertCreativityHere commented 7 months ago

This PR adds more comprehensive testing for custom types in Slice1 contexts and fixes #3918, which caused slicec-cs to treat tagged custom types as optional (untagged) custom types.

The only way to test this was with classes (the only Slice1 type that can hold tags). But, this means the class encoding bleeds into what should be a test purely for custom types. Maybe this is just how it is, but if anyone has any ideas to avoid this, they'd be welcome!

InsertCreativityHere commented 6 months ago

I fixed the formatting for the 4 braces you mentioned.