[vim/vim] Vim9 union types would be convenient (Issue #18735)

6 views
Skip to first unread message

Brian Carbone

unread,
Nov 12, 2025, 4:31:53 PM (12 hours ago) Nov 12
to vim/vim, Subscribed
briancarbone created an issue (vim/vim#18735)

Is your feature request about something that is currently impossible or hard to do? Please describe the problem.
Currently, the only way to represent a union type is with any. A more specific type where each permitted type is separated by | would help a good deal.

Describe the solution you'd like
Built-in vim9 script support for union types. It's not very difficult to represent any other type; product types can be represented using classes that implement multiple interfaces. I suppose an & operator for product types wouldn't hurt, but union types don't really exist in any reasonable form (from what I can tell).


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18735@github.com>

Reply all
Reply to author
Forward
0 new messages