- Make printing typeids give some helpful typeid data.

This commit is contained in:
Christoffer Lerno
2025-11-24 17:11:19 +01:00
parent 887ed5b9e9
commit 5d468ccbf0
2 changed files with 3 additions and 2 deletions

View File

@@ -141,8 +141,6 @@ fn usz? Formatter.out_str(&self, any arg) @private
{ {
switch (arg.type.kindof) switch (arg.type.kindof)
{ {
case TYPEID:
return self.out_substr("typeid");
case VOID: case VOID:
return self.out_substr("void"); return self.out_substr("void");
case FAULT: case FAULT:
@@ -188,6 +186,8 @@ fn usz? Formatter.out_str(&self, any arg) @private
if (@catch(n) != NOT_FOUND) n!; if (@catch(n) != NOT_FOUND) n!;
switch (arg.type.kindof) switch (arg.type.kindof)
{ {
case TYPEID:
return self.out_substr("typeid[")! + self.ntoa((iptr)*(typeid*)arg, false, 16)! + self.out_substr("]")!;
case ENUM: case ENUM:
usz i = types::any_to_enum_ordinal(arg, usz)!!; usz i = types::any_to_enum_ordinal(arg, usz)!!;
assert(i < arg.type.names.len, "Illegal enum value found, numerical value was %d.", i); assert(i < arg.type.names.len, "Illegal enum value found, numerical value was %d.", i);

View File

@@ -49,6 +49,7 @@
- Deprecate objc enums in favour of const inline enums backed by NS numerical types, and with the NS prefix, to better align with the objc api (macOS). - Deprecate objc enums in favour of const inline enums backed by NS numerical types, and with the NS prefix, to better align with the objc api (macOS).
- Deprecate `event_type_from` function in favour of using NSEvent directly, to better align with the objc api (macOS). - Deprecate `event_type_from` function in favour of using NSEvent directly, to better align with the objc api (macOS).
- Add unit tests for objc and core_foundation (macOS). - Add unit tests for objc and core_foundation (macOS).
- Make printing typeids give some helpful typeid data.
## 0.7.7 Change list ## 0.7.7 Change list