Fix correct ? after optional function name when reporting type errors.

This commit is contained in:
Christoffer Lerno
2025-08-27 09:33:25 +02:00
parent f7143c1852
commit 04cc34f12e
2 changed files with 2 additions and 1 deletions

View File

@@ -72,6 +72,7 @@
- Inlining a const as an lvalue would take the wrong path and corrupt the expression node.
- Grabbing (missing) methods on function pointers would cause crash #2434.
- Fix alignment on jump table.
- Fix correct `?` after optional function name when reporting type errors.
### Stdlib changes
- Add `==` to `Pair`, `Triple` and TzDateTime. Add print to `Pair` and `Triple`.

View File

@@ -138,7 +138,7 @@ void type_append_name_to_scratch(Type *type)
{
scratch_buffer_append("void");
}
scratch_buffer_append_char('!');
scratch_buffer_append_char('?');
break;
case TYPE_SLICE:
type_append_name_to_scratch(type->array.base);