v2 / vlib / v / gen / c / testdata / c_alias_redeclaration.vv
11 lines · 9 sloc · 344 bytes · 476486007164a36917687b6c6d195faba990c93f
Raw
1// Regression: redeclaring a C alias must not set the alias TypeSymbol's
2// language to .c. If it does, the C backend emits the raw C name instead of
3// the `C__Name` cname for any later use of the alias.
4
5type C.RedeclareLong = int
6type C.RedeclareLong = int
7
8@[markused]
9fn use_redeclare_long(x C.RedeclareLong) C.RedeclareLong {
10 return x
11}
12