v2 / vlib / v / tests / reserved_keyword_asm_test.v
26 lines · 22 sloc · 252 bytes · 2e0fa12261532de74652252eb9035d74b3ed7ecc
Raw
1struct Abc {
2 @asm string
3}
4
5enum Enum {
6 @asm
7 end
8}
9
10fn test_struct() {
11 dump(Abc{})
12 assert true
13}
14
15fn test_local() {
16 @asm := 12
17 dump(@asm)
18 assert true
19}
20
21fn test_enum() {
22 dump(unsafe { Enum(0) })
23 dump(Enum.@asm)
24 dump(Enum.end)
25 assert true
26}
27