mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 14:40:17 +00:00
27 lines
509 B
Plaintext
27 lines
509 B
Plaintext
aqua M
|
|
|
|
export getObj
|
|
|
|
service OpNum("op"):
|
|
identity(n: u32) -> u32
|
|
|
|
service OpStr("op"):
|
|
identity(n: string) -> string
|
|
|
|
service OpArr("op"):
|
|
identity(arr: []string) -> []string
|
|
|
|
data InnerObj:
|
|
arr: []string
|
|
num: u32
|
|
|
|
data SomeObj:
|
|
str: string
|
|
num: u64
|
|
inner: InnerObj
|
|
|
|
func getObj() -> SomeObj:
|
|
b = SomeObj(str = OpStr.identity("some str"), num = 5, inner = InnerObj(arr = ["a", "b", "c"], num = 6))
|
|
c = b.copy(str = "new str", inner = b.inner.copy(num = 3))
|
|
<- c
|