Files
c3c/test/unit/regression/any.c3
Christoffer Lerno 8b49e6c14d Rename def to alias.
2025-03-13 11:22:27 +01:00

25 lines
277 B
Plaintext

module any_tests @test;
fn void any_compare()
{
int x;
any a = &x;
any b = &x;
assert(a == b);
assert(a == a);
}
alias AnyAlias = any;
fn void test_aliasing()
{
int x;
AnyAlias z = &x;
switch (z.type)
{
case int:
assert(true);
default:
assert(false);
}
}