From 2fd9d1ff2e16de5116c14608dce2e9233c560094 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Tue, 7 Feb 2023 21:57:05 -0600 Subject: [PATCH] bugfix with (*foo)->bar(); changed date format --- compiler/src/checker.c | 5 ----- core/time/date.onyx | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/compiler/src/checker.c b/compiler/src/checker.c index ae5cdbde..fefc3ba7 100644 --- a/compiler/src/checker.c +++ b/compiler/src/checker.c @@ -1823,11 +1823,6 @@ CheckStatus check_field_access(AstFieldAccess** pfield) { return Check_Return_To_Symres; } - // Optimization for (*foo).member. - if (field->expr->kind == Ast_Kind_Dereference) { - field->expr = ((AstDereference *) field->expr)->expr; - } - if (field->token != NULL && field->field == NULL) { token_toggle_end(field->token); field->field = bh_strdup(context.ast_alloc, field->token->text); diff --git a/core/time/date.onyx b/core/time/date.onyx index 0323e827..8d83c3a7 100644 --- a/core/time/date.onyx +++ b/core/time/date.onyx @@ -79,7 +79,7 @@ Date :: struct { } _format :: (output: ^conv.Format_Output, format: ^conv.Format, date: ^Date) { - conv.format(output, "{}-{}-{}", date.year, date.month + 1, date.day + 1); + conv.format(output, "{}-{w2}-{w2}", date.year, date.month + 1, date.day + 1); } } -- 2.25.1