Skip to content

Subrange types unsafely parse #29

Description

@beef331

With stock Flatty using a subrange type will ignore ranges on parse resulting in invalid values.

import flatty
type MyType = object
  a: 0..3
var str = 10.toFlatty()
echo str.fromFlatty(MyType) # Expect a Flatty exception that the value is not in the range, instead of working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions