aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-08-31 22:45:26 +0100
committergingerBill <bill@gingerbill.org>2021-08-31 22:45:26 +0100
commit72a741554c8905b5d2a618368e4c65c1ea45a9b7 (patch)
tree07b90131a42f8f7ecf4fd12cb8b87b0dd47ed7b9 /examples
parentcd09068e335c8446a9d48dd1bd9868989e531c5e (diff)
Remove unneeded semicolons from demo
Diffstat (limited to 'examples')
-rw-r--r--examples/demo/demo.odin12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin
index 949be3273..235ee2bdf 100644
--- a/examples/demo/demo.odin
+++ b/examples/demo/demo.odin
@@ -1364,7 +1364,7 @@ bit_set_type :: proc() {
}
{
x: bit_set['A'..='Z']
- #assert(size_of(x) == size_of(u32));
+ #assert(size_of(x) == size_of(u32))
y: bit_set[0..=8; u16]
fmt.println(typeid_of(type_of(x))) // bit_set[A..=Z]
fmt.println(typeid_of(type_of(y))) // bit_set[0..=8; u16]
@@ -1601,7 +1601,7 @@ where_clauses :: proc() {
T :: i32
N :: 5
f: Foo(T, N)
- #assert(size_of(f) == (N+N-2)*size_of(T));
+ #assert(size_of(f) == (N+N-2)*size_of(T))
}
}
@@ -1671,7 +1671,7 @@ ranged_fields_for_array_compound_literals :: proc() {
5..=9 = 54,
10..<16 = i*3 + (i-1)*2,
}
- #assert(len(foo) == 16);
+ #assert(len(foo) == 16)
fmt.println(foo) // [123, 0, 0, 0, 0, 54, 54, 54, 54, 54, 8, 8, 8, 8, 8]
}
{ // Slice and Dynamic Array support
@@ -1922,7 +1922,7 @@ constant_literal_expressions :: proc() {
fmt.println("-------")
Partial_Baz :: enum{A=5, B, C, D=16}
- #assert(len(Partial_Baz) < len(#partial [Partial_Baz]int));
+ #assert(len(Partial_Baz) < len(#partial [Partial_Baz]int))
PARTIAL_ENUM_ARRAY_CONST :: #partial [Partial_Baz]int{.A ..= .C = 1, .D = 16}
fmt.println(PARTIAL_ENUM_ARRAY_CONST[.A])
@@ -1952,8 +1952,8 @@ union_maybe :: proc() {
i: Maybe(u8)
p: Maybe(^u8) // No tag is stored for pointers, nil is the sentinel value
- #assert(size_of(i) == size_of(u8) + size_of(u8));
- #assert(size_of(p) == size_of(^u8));
+ #assert(size_of(i) == size_of(u8) + size_of(u8))
+ #assert(size_of(p) == size_of(^u8))
i = 123
x := i.?