~sircmpwn/hare#700: 
Assertion failed on array allocation pointer/value mismatch

See this simple example:

fn test() void = {
	let arr: [64][]int = alloc([[]...]);
};

I should presumably get an error saying that the types do not match - alloc returns a pointer while the variable is expecting a value. However, I instead see the compiler error

Assertion failed: htype->array.members == atype->array.members (src/check.c: check_expr_alloc_init: 320)
Error: harec: exited with signal 6
2022-05-14T18:53:45.987021200Z hare test: build failed
Status
RESOLVED FIXED
Submitter
~gbear605
Assigned to
No-one
Submitted
2 years ago
Updated
1 year, 11 months ago
Labels
bug harec

~pierrec 2 years ago

with the current version of harec, I get a proper (although not very clear) error: "Initializer is not assignable to binding type".

~sebsite REPORTED FIXED 1 year, 11 months ago

Register here or Log in to comment, or comment via email.