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
+2 -2
View File
@@ -43,7 +43,7 @@ syntax :: proc() {
Thing2 :: struct {x: f32, y: int, z: ^[]int};
// Slice interals are now just a `ptr+len+cap`
slice: []int; compile_assert(size_of(slice) == 3*size_of(int));
slice: []int; #assert(size_of(slice) == 3*size_of(int));
// Helper type - Help the reader understand what it is quicker
My_Int :: #type int;
@@ -218,7 +218,7 @@ loops :: proc() {
name := "你好,世界";
fmt.println(name);
for r in name {
compile_assert(type_of(r) == rune);
#assert(type_of(r) == rune);
fmt.printf("%r\n", r);
}