From b757f1447bbb991a52dffa792017662fec08437d Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Sat, 30 Aug 2025 13:22:10 +0200 Subject: [PATCH] Fix incorrect priority filtering. Move ??? to features. --- lib/std/core/logging.c3 | 2 +- releasenotes.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/core/logging.c3 b/lib/std/core/logging.c3 index 892e59597..f6ef28dea 100644 --- a/lib/std/core/logging.c3 +++ b/lib/std/core/logging.c3 @@ -137,7 +137,7 @@ macro void init() fn void call_log(LogPriority prio, LogCategory category, String fmt, args...) { LogPriority priority = mem::@atomic_load(config_priorities[category], UNORDERED); - if (priority < prio) return; + if (priority > prio) return; init(); bool locked = logger_mutex.is_initialized() && @ok(logger_mutex.lock()); Logger logger = current_logger; diff --git a/releasenotes.md b/releasenotes.md index c9cd2e022..534aaea24 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -35,6 +35,7 @@ - Deprecated `@typeis` macro in favour of `$typeof(#foo) == int`. - `$defined(#hash)` will not check the internal expression, just that `#hash` exists. Use `$defined((void)#hash)` for the old behaviour. - Added optional macro arguments using `macro foo(int x = ...)` which can be checked using `$defined(x)`. +- Add compile time ternary `$val ??? : `. ### Fixes - List.remove_at would incorrectly trigger ASAN. @@ -84,7 +85,6 @@ - Fix correct `?` after optional function name when reporting type errors. - Make `log` and `exp` no-strip. - `@test`/`@benchmark` on module would attach to interface and regular methods. -- Add compile time ternary `$val ??? : `. - Deprecated `@select` in favor of `???`. ### Stdlib changes