1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/compiler/tests/repl/chained_fields/c2.repl

6 lines
165 B
Plaintext
Raw Normal View History

struct A { mut: v int } struct B { a A } struct C { mut: b B } struct D { mut: c C }
c2 := C{}
c2.b = B{} // Error (c2 immutable)
===output===
`c2` is immutable