mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-03-28 21:34:52 +00:00
improve comment stating 'Zig 0.10.0' @typeName change
This commit is contained in:
parent
3ecaa34271
commit
686342375e
|
|
@ -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".
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user