aqua/aqua-src/antithesis.aqua

27 lines
509 B
Plaintext
Raw Permalink Normal View History

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