mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
22 lines
185 B
V
22 lines
185 B
V
[heap]
|
|
struct Aa {
|
|
mut:
|
|
bs []Bb
|
|
}
|
|
|
|
struct Bb {
|
|
mut:
|
|
a &Aa
|
|
}
|
|
|
|
fn test_circular() {
|
|
mut b := Bb{
|
|
a: &Aa{
|
|
bs: []Bb{cap: 1}
|
|
}
|
|
}
|
|
b.a.bs << b
|
|
s := b.str()
|
|
assert s.len < 3500
|
|
}
|