Skip to content

Protobuf allow field number to be set to value non in specification #1566

@DaviDeMeo

Description

@DaviDeMeo

Describe the bug
E.g.: it allow to set a field number to 0.

To Reproduce

@Serializable
data class Box(@ProtoNumber(0) val number: Int)

Expected behavior
Shoud throw an error, this is not spec compliant as it should only allow value between 1 and 229 - 1.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions