~sircmpwn/hare-users

2 2

Type assertion failure in time::date::new

Details
Message ID
<CVOJ97RZJT78.26QEDLU4ZAHM6@taiga>
DKIM signature
missing
Download raw message
use time::chrono;
use time::date;

export fn main() void = {
	date::new(chrono::UTC, void, 2023, 9, 7)!;
};

// Abort: time/date/date.ha:156:36: type assertion failed
// Aborted

Not reproducible if 0 is used instead of void.
Details
Message ID
<CVPL8E9COCHE.168ZA2O7BRDQ8@nova>
In-Reply-To
<CVOJ97RZJT78.26QEDLU4ZAHM6@taiga> (view parent)
DKIM signature
missing
Download raw message
On Thu Sep 21, 2023 at 11:46 AM BST, Drew DeVault wrote:
> use time::chrono;
> use time::date;
>
> export fn main() void = {
> 	date::new(chrono::UTC, void, 2023, 9, 7)!;
> };
>
> // Abort: time/date/date.ha:156:36: type assertion failed
> // Aborted
>
> Not reproducible if 0 is used instead of void.

The functionality for deducing omitted zone offsets was never properly
implemented in new() or its subroutines (which have changed throughout
its git history). The current area of code responsible for this feature,
were it implemented today, is either within new() or realize().

I suggest we remove this "feature" to avoid confusion for now. Shall we?
Details
Message ID
<CVPLJ2C47EKH.1CY3IRCZSA4NP@taiga>
In-Reply-To
<CVPL8E9COCHE.168ZA2O7BRDQ8@nova> (view parent)
DKIM signature
missing
Download raw message
Fine with me
Reply to thread Export thread (mbox)