| 1 | pub struct Boundary {} |
| 2 | |
| 3 | pub fn (b Boundary) contains(x int, y int) bool { |
| 4 | return false |
| 5 | } |
| 6 | |
| 7 | pub struct Base { |
| 8 | Boundary |
| 9 | } |
| 10 | |
| 11 | pub fn (mut b Base) on_event(x int, y int) { |
| 12 | if b.Boundary.contains(x, y) { |
| 13 | } |
| 14 | if b.contains(x, y) { |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | pub struct ListBox { |
| 19 | Base |
| 20 | } |
| 21 | |
| 22 | pub fn (mut lb ListBox) on_event(x int, y int) { |
| 23 | if lb.Base.Boundary.contains(x, y) { |
| 24 | } |
| 25 | if lb.contains(x, y) { |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | fn test_struct_multi_embed_method_call() { |
| 30 | mut list_box := ListBox{} |
| 31 | list_box.on_event(11, 22) |
| 32 | assert true |
| 33 | } |
| 34 | |