Skip to content

GetPreferredUnits asserts constraints on its region argument instead of expressing them in the parameter type #151

Open

Description

@jessealama

GetPreferredUnits declares its region_ parameter as just "a String", then asserts that it matches the unicode_region_id Unicode locale nonterminal and equals its own ASCII-uppercase. Constraints like these belong in the parameter's type, not in a runtime assertion (raised in #110 (comment)). The value comes from GetLocaleRegion, which 402 itself types as returning just a String.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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