> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sifr.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# SIFR-NAME-0006: Variable declaration lacks a required initializer.

> Variable declaration lacks a required initializer.

`SIFR-NAME-0006` belongs to the **Name resolution** diagnostic family. It means: variable declaration lacks a required initializer.

## Why It Happens

A binding, type, function, module, or member name cannot be resolved in the current scope.

<Info>
  Use `sifr --explain SIFR-NAME-0006` locally to see the renderer's exact message template and any machine-applicable suggestions for the compiler version you are running.
</Info>

## Erroneous Code

```python theme={null}
total = subtotal + tax
```

## How To Fix It

Declare or import the name before use, and check whether you meant a module member, type name, or local binding.

## Fixed Code

```python theme={null}
subtotal: int = 10
tax: int = 2
total = subtotal + tax
```

## Details

| Field                  | Value                                                                     |
| ---------------------- | ------------------------------------------------------------------------- |
| Code                   | `SIFR-NAME-0006`                                                          |
| Family                 | `NAME`                                                                    |
| Severity               | Error                                                                     |
| Stability              | stable                                                                    |
| Owner                  | `sifr_lowering::lower::statements`                                        |
| Representative fixture | `crates/sifr/tests/e2e/fail/annotated_variable_requires_initializer.sifr` |

See the [Error Codes index](/diagnostics/error-codes) for the complete catalog.
