module main

// has `typedef`
@[typedef]
struct C.Foo1 {}

type AliasFoo1 = C.Foo1

// no `typedef`
struct C.Foo2 {}

type AliasFoo2 = C.Foo2

struct Bar {}

type AliasBar = Bar

fn main() {
	// test cast `voidptr/nil` to `alias`
	_ = AliasFoo1(unsafe { nil })
	_ = AliasFoo2(unsafe { nil })
	_ = AliasBar(unsafe { nil })

	// test cast `voidptr/nil` to `non-alias` and has `typedef`
	_ = C.Foo1(unsafe { nil })
	// test cast `voidptr/nil` to `non-alias` and no `typedef`
	_ = C.Foo2(unsafe { nil })
}
