From: Brendan Hansen Date: Wed, 8 Feb 2023 03:57:05 +0000 (-0600) Subject: bugfix with (*foo)->bar(); changed date format X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=2fd9d1ff2e16de5116c14608dce2e9233c560094;p=onyx.git bugfix with (*foo)->bar(); changed date format --- 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); } }