From 04cc34f12e7f48dc06d96d2a3ffdfde94c3b5e57 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Wed, 27 Aug 2025 09:33:25 +0200 Subject: [PATCH] Fix correct `?` after optional function name when reporting type errors. --- releasenotes.md | 1 + src/compiler/types.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/releasenotes.md b/releasenotes.md index 7d412c306..6090e3768 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -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`. diff --git a/src/compiler/types.c b/src/compiler/types.c index e1fd23611..fad03941d 100644 --- a/src/compiler/types.c +++ b/src/compiler/types.c @@ -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);