2017-02-07 14:19:51 -08:00
|
|
|
const assert = @import("std").debug.assert;
|
|
|
|
|
|
|
|
const Foo = struct {
|
|
|
|
a: void,
|
|
|
|
b: i32,
|
|
|
|
c: void,
|
|
|
|
};
|
|
|
|
|
2017-05-23 18:38:31 -07:00
|
|
|
test "compare void with void compile time known" {
|
2017-02-07 14:19:51 -08:00
|
|
|
comptime {
|
2018-05-28 17:23:55 -07:00
|
|
|
const foo = Foo{
|
2017-02-07 14:19:51 -08:00
|
|
|
.a = {},
|
|
|
|
.b = 1,
|
|
|
|
.c = {},
|
|
|
|
};
|
|
|
|
assert(foo.a == {});
|
|
|
|
}
|
|
|
|
}
|