Skip to content

compiler assert when assigning to Type[*] struct member #2497

@Book-reader

Description

@Book-reader
struct OwnedString
{
	usz len;
	char[*] data;
}

fn int main(String[] args)
{
	OwnedString owned;
	owned.data = {};
	return 0;
}
⚠️ The compiler encountered an unexpected error: "Should be unreachable".

- Function: expr_rewrite_to_const_zero(...)
- Source file: /build/45lfmbsavq2y7fc11airk0njnnp5j808-source/src/compiler/expr.c:706

🙏 Please consider taking the time to file an issue on GitHub, so that we can get it fixed:

https://github.com/c3lang/c3c/issues/new so that we can get it fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingFixed needs testingNeeds verification / testing that it now works

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions