summaryrefslogtreecommitdiff
path: root/exercises
diff options
context:
space:
mode:
authorPaul Ebose <pebose@proton.me>2026-02-27 03:55:37 +0100
committerPaul Ebose <pebose@proton.me>2026-02-27 03:55:37 +0100
commit686342375ed3f6ccd80b8483d37817d5a7bc8d8e (patch)
treee29fd2d7fc7d0d85f1e2d1696d7f306d10743730 /exercises
parent3ecaa34271da0c0c41926ff604f9419e0b492bb3 (diff)
improve comment stating 'Zig 0.10.0' @typeName change
Diffstat (limited to 'exercises')
-rw-r--r--exercises/065_builtins2.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/exercises/065_builtins2.zig b/exercises/065_builtins2.zig
index 2d13994..0fde989 100644
--- a/exercises/065_builtins2.zig
+++ b/exercises/065_builtins2.zig
@@ -137,12 +137,13 @@ pub fn main() void {
}
// NOTE: This exercise did not originally include the function below.
-// But a change after Zig 0.10.0 added the source file name to the
-// type. "Narcissus" became "065_builtins2.Narcissus".
+// After Zig 0.10.0, `@typeName` began prefixing the returned type name
+// with the source file name. For example, "Narcissus" became
+// "065_builtins2.Narcissus".
//
// To fix this, we've added this function to strip the filename from
// the front of the type name. (It returns a slice of the type name
-// starting at the index + 1 of character ".")
+// starting just after the ".")
//
// We'll be seeing @typeName again in Exercise 070. For now, you can
// see that it takes a Type and returns a u8 "string".