[vim/vim] Add vim9 union types (PR #20223)

3 views
Skip to first unread message

Foxe Chen

unread,
May 14, 2026, 10:43:01 PM (14 hours ago) May 14
to vim/vim, Subscribed

Resolves #18735. Right now the syntax is <type1 | type2 | ...>, but I plan on removing the angle brackets. To preserve backwards compatibility, union types cannot be inferred, they must be explicitly declared.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20223

Commit Summary

File Changes

(6 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20223@github.com>

Foxe Chen

unread,
12:08 AM (13 hours ago) 12:08 AM
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20223/before/84b700f992a194ea85e2d2b425e0a388ebe8f05f/after/9de72e6ef6ab275352d38798739bcf0c6c4254fb@github.com>

Foxe Chen

unread,
12:13 AM (12 hours ago) 12:13 AM
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20223/before/9de72e6ef6ab275352d38798739bcf0c6c4254fb/after/66c5404c98ee22579ac9f207e4a7e8e2571d1ca0@github.com>

Foxe Chen

unread,
12:37 AM (12 hours ago) 12:37 AM
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20223/before/66c5404c98ee22579ac9f207e4a7e8e2571d1ca0/after/73c62741987964ddbc80a9d3f7aba9a0df8f17a1@github.com>

Foxe Chen

unread,
12:42 AM (12 hours ago) 12:42 AM
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20223/before/73c62741987964ddbc80a9d3f7aba9a0df8f17a1/after/3ddad0239110d8a14ab1c569278b4479b9b5c5db@github.com>

Foxe Chen

unread,
12:48 AM (12 hours ago) 12:48 AM
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20223/before/3ddad0239110d8a14ab1c569278b4479b9b5c5db/after/2bba71a471eaa7b49aeda30e995b43b8991b00b8@github.com>

Yegappan Lakshmanan

unread,
11:31 AM (1 hour ago) 11:31 AM
to vim/vim, Subscribed

@yegappan commented on this pull request.


In src/structs.h:

> @@ -1637,6 +1640,8 @@ typedef struct {
 #define TTFLAG_SUPER	    0x40    // object from "super".
 #define TTFLAG_GENERIC	    0x80    // generic type
 #define TTFLAG_TUPLE_OK	    0x100   // tuple can be used for a list
+#define	TTFLAG_UNION	    0x200   // First type in union type
+#define	TTFLAG_UNION	    0x200   // First type in union type

This is a duplicate definition.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20223/review/4299317875@github.com>

Reply all
Reply to author
Forward
0 new messages