diff --git a/vlib/v/tests/c_structs/cstruct_alias_test.v b/vlib/v/tests/c_structs/cstruct_alias_test.v new file mode 100644 index 00000000000000..6084ce4cf06a13 --- /dev/null +++ b/vlib/v/tests/c_structs/cstruct_alias_test.v @@ -0,0 +1,15 @@ +#include "@VMODROOT/cstruct.h" + +struct C.TestAlias { +} + +type Foo = C.TestAlias + +fn call() ?Foo { + return Foo{} +} + +fn test_main() { + a := call() + assert a?.str() == 'Foo(C.TestAlias{})' +}