Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dbarnett opened this issue Mar 18, 2023 · 0 comments

Comments

@dbarnett
Copy link
Contributor

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.

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

No branches or pull requests

1 participant