add(view): View type for composing view modules
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 22s
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 22s
This commit is contained in:
@@ -12,6 +12,7 @@ pub const Error = struct {
|
||||
};
|
||||
|
||||
// System events available to every application.
|
||||
// TODO: should this also already include the .view enum option?
|
||||
pub const SystemEvent = union(enum) {
|
||||
quit,
|
||||
err: Error,
|
||||
@@ -21,6 +22,7 @@ pub const SystemEvent = union(enum) {
|
||||
};
|
||||
|
||||
pub fn mergeTaggedUnions(comptime A: type, comptime B: type) type {
|
||||
// TODO: should this expect one of the unions to contain the .view value option with its corresponding associated type?
|
||||
if (!isTaggedUnion(A) or !isTaggedUnion(B)) {
|
||||
@compileError("Both types for merging tagged unions need to be of type `union(enum)`.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user