docs(specs,readme): narrow runtime Type-value support to type_name/type_is_unsigned [F0.8]
The 7 type-only builtins doc claimed all of them accept a runtime Type value, but only type_name and type_is_unsigned do. The other five (size_of, align_of, field_count, type_eq, is_flags) are compile-time-only — a runtime Type value (type_of(x)) yields 'unresolved type' since runtime reflection is deferred. Reword both docs to the accurate scope. Verified: type_name(type_of(x))=u32, type_is_unsigned(type_of(x))=true; size_of(type_of(x)) / align_of(type_of(x)) -> error: unresolved type.
This commit is contained in:
@@ -432,7 +432,7 @@ The standard library (`modules/std.sx`) provides:
|
||||
- **Strings**: `concat`, `substr`, `int_to_string`, `uint_to_string`, `float_to_string`, `cstring`
|
||||
- **Memory**: `Allocator` protocol, `GPA` (general purpose), `Arena` (bump allocator)
|
||||
- **Math**: `sqrt`, `sin`, `cos`
|
||||
- **Introspection**: `type_of`, `type_name`, `type_is_unsigned`, `type_eq`, `field_count`, `field_name`, `field_value`, `size_of`, `align_of`, `is_flags` — the type-only builtins (`size_of`, `align_of`, `field_count`, `type_name`, `type_eq`, `type_is_unsigned`, `is_flags`) require a type argument (a spelled type, a generic `T`, or a runtime `Type` value); passing a value is a compile-time error
|
||||
- **Introspection**: `type_of`, `type_name`, `type_is_unsigned`, `type_eq`, `field_count`, `field_name`, `field_value`, `size_of`, `align_of`, `is_flags` — the type-only builtins (`size_of`, `align_of`, `field_count`, `type_name`, `type_eq`, `type_is_unsigned`, `is_flags`) require a type argument (a spelled type or a generic `T`); passing a value is a compile-time error. A runtime `Type` value (`type_of(x)`) is currently accepted by `type_name` and `type_is_unsigned` only — the other five are compile-time-only (runtime reflection is deferred)
|
||||
|
||||
### Command-line interface (`modules/std/cli.sx`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user