v2 / vlib / v / tests / aliases / c_alias_redeclaration_test.c.v
11 lines · 9 sloc · 408 bytes · 24ec3966dcc0246f92c8ade4638bbfa1f70fb07e
Raw
1// Redeclaring an existing C type alias should be accepted. Before the
2// parser was setting TypeSymbol.language=.c for C aliases, the table's
3// "Allow C type aliases to override existing C types" override never fired
4// and the second declaration failed with `cannot register alias`.
5
6type C.RedeclareU16Alias = u16
7type C.RedeclareU16Alias = u16
8
9fn test_c_alias_redeclaration_compiles() {
10 assert true
11}
12