program main
  struct Point
    field x: i32
    field y: i32
  fn make_point(x: i32, y: i32) -> Point
    construct Point
      field x
        var x
      field y
        var y
  fn point_x(p: Point) -> i32
    field-access x
      var p
  fn point_sum(p: Point) -> i32
    binary +
      field-access x
        var p
      field-access y
        var p
  fn local_point_sum() -> i32
    local let p: Point
      call make_point
        int 20
        int 22
    call point_sum
      var p
  fn main() -> i32
    call local_point_sum
  test "struct local value flow"
    binary =
      call local_point_sum
      int 42
  test "struct parameter value flow"
    binary =
      call point_x
        call make_point
          int 7
          int 9
      int 7
  test "stored struct field access"
    local let p: Point
      call make_point
        int 3
        int 4
    binary =
      field-access y
        var p
      int 4
