Closed InsertCreativityHere closed 11 months ago
Actually, I don't think this is specific to collections, even this produces uncompilable code:
compact struct MyCompactStructWithNullableProxy {
i: PingableProxy?
}
I ran into this when updating the tests in icerpc-csharp
to use the new interface-proxy-custom logic.
Everything ran fine, except this one test:
https://github.com/icerpc/icerpc-csharp/blob/main/tests/IceRpc.Slice.Tests/StructTests.Slice1.slice
everything in that test produces uncompilable code.
For now, I'm just going to uncomment it.
Description
For collection types, we need to generate EncodeAction functions, and the implementation of this function depends on whether the collection is of value or reference types.
For custom types, the generated code assumes it's always backed by a reference type. If the custom type you map to is actually a value type,
slicec-cs
produces code that doesn't compile.Reproduction steps
For example:
Produces the following code:
Instead of: