aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-09-24 10:22:22 +0100
committergingerBill <bill@gingerbill.org>2018-09-24 10:22:22 +0100
commit597fb452b199f97e20abae260551056302412d39 (patch)
tree48694ce8634191790a401b39c29b84d87ea1e055 /examples
parent9f3e42e4ef830fde91cc91a557dc6ca01fe3d337 (diff)
Minor fixes
Diffstat (limited to 'examples')
-rw-r--r--examples/demo/demo.odin5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin
index 9dab8b4d7..55ca5feb6 100644
--- a/examples/demo/demo.odin
+++ b/examples/demo/demo.odin
@@ -492,6 +492,9 @@ parametric_polymorphism :: proc() {
{ // Polymorphic names
foo :: proc($N: $I, $T: typeid) -> (res: [N]T) {
+ // `N` is the constant value passed
+ // `I` is the type of N
+ // `T` is the type passed
fmt.printf("Generating an array of type %v from the value %v of type %v\n",
typeid_of(type_of(res)), N, typeid_of(I));
for i in 0..N-1 {
@@ -790,7 +793,7 @@ bit_set_type :: proc() {
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..8l u16]
+ fmt.println(typeid_of(type_of(y))); // bit_set[0..8; u16]
incl(&x, 'F');
assert('F' in x);