icerpc / slicec

The Slice compiler library
Apache License 2.0
13 stars 5 forks source link

Add Support for Compact Enums #686

Closed InsertCreativityHere closed 9 months ago

InsertCreativityHere commented 9 months ago

This PR implements #681 by adding support for compact enums. Compact enums work just like compact structs: we don't encode TagEndMarker, and tags cannot be used within the enum.

A compact enum cannot have an underlying type (since they're already 'compact') nor can it be unchecked (since we already don't encode TagEndMarker then).