Skip to content

Verify that the sum type is never embedded into a struct #1

@vyskocilm

Description

@vyskocilm

Hint from a Reddit

One more thing I'd suggest adding: Verify that the sum type is never embedded into a struct. It can be included as a named member but it should never be embedded as that will generate a new type that will pass the check to be a valid SumFoo interface member but can't be correctly deconstructed by a switch sumVal.(type) call that expects to be able to name all the implementing types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions