r/odinlang•
Salt_Tart_8539

Inferring type of variable from usage

init :: proc() -> GameState {
  gs := {}
  reset(&gs)
  return gs
}

In this case you can infer the type of gs from the signature of the resetfunction and return statement. But it doesn't work in Odin.

Is this intentional?

Posted Sep 28, 2026, 4:34 AM UTC

89
Loading comments…