Xo is experimental. The source is now public on GitHub, or try Xo in your browser.
Menu · XO0179

Docs

XO0179: retired: `var` with a tuple or list pattern

error · reported by the parser

XO0179 reported var followed by a pattern, which only let took then, with a fix that wrote let. Decision 0384 (the owner, 2026-10-26) made var PATTERN = e bind every name of an irrefutable pattern as a var (core 3.1, 3.5), so the error is gone. The code stays reserved.

Example

fn f() -> (Int, Int) { (1, 2) }

fn main(os: Os) {
  var (a, b) = f()
  a += b
  os.stdio.println("${a}")
}

Fix

// no change needed: a and b are var

Run xo explain XO0179 for this text in a terminal, or see section 10.6 of the specification.