ceremonyclient/bedlam/testsuite/lang/ptr_struct_field.qcl
Cassandra Heart dbd95bd9e9
v2.1.0 (#439)
* v2.1.0 [omit consensus and adjacent] - this commit will be amended with the full release after the file copy is complete

* 2.1.0 main node rollup
2025-09-30 02:48:15 -05:00

25 lines
257 B
Go

// -*- go -*-
package main
type Foo struct {
A int32
B int32
}
func Set(ptr *int32, val int32) {
*ptr = val
}
var f Foo
// @Test 0 0 = 0
// @Test 1 2 = 3
// @Test 7 4 = 11
func main(a, b int32) int {
Set(&f.A, a)
Set(&f.B, b)
return f.A + f.B
}