ceremonyclient/bedlam/testsuite/lang/ptr.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

21 lines
215 B
Go

// -*- go -*-
package main
func bar(val *int32) int {
*val = int32(42)
return 7
}
// @Test 0 0 = 49
// @Test 1 2 = 52
func main(a, b int32) int {
var c int32
sum := a + b
sum += bar(&c)
return sum + c
}