---
title: "U0002: Tab in indentation"
url: https://una-lang.org/en/docs/errors/U0002/
release: v0.4.0
source: https://github.com/una-lang/una/blob/v0.4.0/crates/una-explain/explain/U0002.md
---

# U0002: Tab in indentation

U0002 reports a tab in the leading whitespace of a line. Tabs inside text literals and comments are not indentation and are allowed.

## Why Una rejects it

Una uses significant indentation made of spaces only, two per level (`spec/01 §2`). A tab in the leading whitespace of a line is rejected, because its width depends on the editor and would make the block structure ambiguous.

## How to fix it

The diagnostic carries a mechanical edit that replaces the indentation with spaces.

## The repair at a glance

```diff
  module demo

  pub double(x: Int) -> Int
    requires x >= 0
  =
- 	x * 2
+   x * 2
```

## Failing example

The body line starts with a tab.

```una
module demo

pub double(x: Int) -> Int
  requires x >= 0
=
	x * 2
```

## Fixed example

```una
module demo

pub double(x: Int) -> Int
  requires x >= 0
=
  x * 2
```
