Skip to content

matkaba#value#TypeMatches and friends should support recursively checking nested list element types #256

Description

@dbarnett

When checking collection types, it would be handy if maktaba#value#TypeMatches (and #TypeMatchesOneOf and their maktaba#ensure# variants) would recursively consider nested types to simplify checking for types like list-of-strings:

:echo maktaba#value#TypeMatches([1], [''])
0
:echo maktaba#ensure#TypeMatchesOneOf([''], [ 0, [[]] ])

E605: Exception not caught: ERROR(WrongType): Expected a number or list of lists. Got a list.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions