Xo is experimental. The source code is not public yet; it will be soon. Read the release notes
Menu · XO0603

Docs

XO0603: name declared twice in one scope, or a predeclared name redefined

error · reported by the checker

A name may be declared once per scope: top level declarations, fields, variants, methods, parameters, imports, and bindings in one block. Shadowing is allowed only in a nested block. Predeclared names (Option, Result, true, dbg, builtin types, …) cannot be redefined at top level, and a type cannot have a field and a method with the same name. See core 1.4 and 3.1.

Example

fn f() -> Int {
  let x = 1
  let x = 2
  x
}

Fix

fn f() -> Int {
  let x = 1
  let y = 2
  x + y
}

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