| 1 | import v.checker.tests.module_with_deprecated_structs as m |
| 2 | |
| 3 | struct Abc { |
| 4 | mut: |
| 5 | x int |
| 6 | d int @[deprecated] |
| 7 | z int |
| 8 | } |
| 9 | |
| 10 | fn use_m_externally() { |
| 11 | x := m.Xyz{} |
| 12 | dump(x) |
| 13 | } |
| 14 | |
| 15 | fn use_m_externally_and_use_deprecated_fields() { |
| 16 | mut x := m.Xyz{} |
| 17 | dump(x.a) |
| 18 | x.a = 123 |
| 19 | dump(x.b) |
| 20 | x.b = 456 |
| 21 | dump(x.c) |
| 22 | x.c = 11 |
| 23 | dump(x.d) |
| 24 | x.d = 45 |
| 25 | } |
| 26 | |
| 27 | fn main() { |
| 28 | mut a := Abc{} |
| 29 | a.x = 1 |
| 30 | a.d = 1 |
| 31 | a.z = 1 |
| 32 | dump(a) |
| 33 | println(a.d) |
| 34 | x := a.d + 1 |
| 35 | dump(x) |
| 36 | } |
| 37 |