mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Replace compile_assert with #assert
This commit is contained in:
+4
-3
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user