v2 / vlib / v / checker / tests / comptime_call_no_unused_var.vv
18 lines · 16 sloc · 206 bytes · 43c3a3b08068751a8ca3f81a9aab2b4d6fd9a408
Raw
1struct Test {}
2
3fn (test Test) print() {
4 println('test')
5}
6
7fn main() {
8 test := Test{}
9 abc := 'print'
10 test.$abc() // OK
11 test.$w()
12 v := 4
13 test.$v()
14 s := 'x' + 'y'
15 test.$s()
16 s2 := 'x'
17 test.$s2()
18}
19