Replace compile_assert with #assert

This commit is contained in:
gingerBill
2018-02-24 19:03:29 +00:00
parent b2461f7192
commit 35ba5771a5
17 changed files with 96 additions and 69 deletions
+4 -3
View File
@@ -101,13 +101,13 @@ general_stuff :: proc() {
// If the type expression is `struct`, `union`, `enum`, `proc`, or `bit_field`, the types will always been distinct.
Int32 :: i32;
compile_assert(Int32 == i32);
#assert(Int32 == i32);
My_Int32 :: distinct i32;
compile_assert(My_Int32 != i32);
#assert(My_Int32 != i32);
My_Struct :: struct{x: int};
compile_assert(My_Struct != struct{x: int});
#assert(My_Struct != struct{x: int});
}
}
@@ -760,6 +760,7 @@ complete_switch :: proc() {
}
}
main :: proc() {
when true {
general_stuff();