union/enum Foo {
lol: Bar;
kek: Baz;
}
let foo: Foo = ...;
// I want to be able to get some kind of tag to know wether `Bar` or `Baz` in `Foo`
if foo.(inner_type) == Baz
sizeof
operator: it would take only types or only expressions. what is better? xdif @foo == Baz
sizeof
operator: it would take only types or only expressions. what is better? xd typeof (expr)
to compliment itif @foo == Baz
if @foo == Baz
struct Bar {}
struct Baz {}
union Foo = Bar | Baz;
let foo: Foo = Bar {};
if @foo == Bar {
...
}
is that ok? :DDstruct Bar {}
struct Baz {}
union Foo = Bar | Baz;
let foo: Foo = Bar {};
if @foo == Bar {
...
}
is that ok? :DD Bar::x
e.g.?union Foo {
bar: Bar;
baz: Baz;
}
union Foo {
bar: Bar;
baz: Baz;
}
.
with ->
when accessing fields of a struct