diff options
| author | gingerBill <bill@gingerbill.org> | 2022-03-24 11:55:03 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-03-24 11:55:03 +0000 |
| commit | 3f935bea2505b3ee7e169a29b7aed50c0e5614b7 (patch) | |
| tree | 3d3886ccfe8146a2226703c1d10b7908f3b54e3b /src/docs_format.cpp | |
| parent | 3e66eec7354a8248fe8e0edfccbdc9e8b203e88a (diff) | |
`union #shared_nil`
This adds a feature to `union` which requires all the variants to have a `nil` value and on assign to the union, checks whether that value is `nil` or not. If the value is `nil`, the union will be `nil` (thus sharing the `nil` value)
Diffstat (limited to 'src/docs_format.cpp')
| -rw-r--r-- | src/docs_format.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/docs_format.cpp b/src/docs_format.cpp index 7ce93d2bf..ee32d0e05 100644 --- a/src/docs_format.cpp +++ b/src/docs_format.cpp @@ -99,6 +99,7 @@ enum OdinDocTypeFlag_Union : u32 { OdinDocTypeFlag_Union_polymorphic = 1<<0, OdinDocTypeFlag_Union_no_nil = 1<<1, OdinDocTypeFlag_Union_maybe = 1<<2, + OdinDocTypeFlag_Union_shared_nil = 1<<3, }; enum OdinDocTypeFlag_Proc : u32 { |