Skip to content

Alias to alias causes compiler to hit unreachable #2131

@Book-reader

Description

@Book-reader
int x = 0;
alias y = x;
alias z = y;

fn int main()
{
	z;
	return 0;
}
⚠️ The compiler encountered an unexpected error: "Should be unreachable".

- Function: sema_cast_ident_rvalue(...)
- Source file: /build/26gndxfq9ad29ypp7f8kyv502afghifq-source/src/compiler/sema_expr.c:803

🙏 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.
C3 Compiler Version:       0.7.2 (Pre-release, Jan  1 1980 00:00:00)
Installed directory:       /nix/store/zqa3bqdpcv478x7q4s58sv50rk3r4x56-c3c-0.7.2/bin/
Git Hash:                  b83e57b952da736cfd46e361b3deed26fbe895b8
Backends:                  LLVM
LLVM version:              19.1.6
LLVM default target:       x86_64-unknown-linux-gnu

Metadata

Metadata

Assignees

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