| 1 | // This file is used as a text file |
| 2 | module main |
| 3 | |
| 4 | import v.tests.vls.sample_mod1 as s |
| 5 | import v.tests.vls.sample_mod2 |
| 6 | |
| 7 | struct MyS{ |
| 8 | mut: |
| 9 | a int |
| 10 | b string |
| 11 | } |
| 12 | |
| 13 | // add add `val` to `a` |
| 14 | fn (mut m MyS) add(val int) { |
| 15 | m.a += val |
| 16 | } |
| 17 | |
| 18 | fn main() { |
| 19 | s. |
| 20 | sample_mod2. |
| 21 | mut k := MyS{} |
| 22 | k. |
| 23 | s. |
| 24 | mut str := 'hello' |
| 25 | x := str.all_before_last( |
| 26 | j := str.all_before_last(s. |
| 27 | strings. |
| 28 | builtin. |
| 29 | v := 1 |
| 30 | s.public_fn1(1) |
| 31 | s.PublicStruct1{} |
| 32 | s.PublicAlias1_1{} |
| 33 | s.PublicAlias1_2{} |
| 34 | s.public_const1 |
| 35 | } |
| 36 | |
| 37 | // ensure we can jump to `public_fn1()` even in `NotExistStruct` method |
| 38 | fn (mut x NotExistStruct) add(val int) { |
| 39 | s.public_fn1(1) |
| 40 | } |
| 41 | |