# XO0606: method declared outside the module of its type

Methods may be declared only in the module that declares the type, so a type's method set is fixed by its owner and two modules cannot add conflicting methods. For a builtin or imported type, write a plain function instead. See core 3.4.

## Example

```xo
fn (s: Str) shout() -> Str { s.to_upper() }
```

## Fix

```xo
fn shout(s: Str) -> Str { s.to_upper() }
```

Run `xo explain XO0606` for this text in a terminal, or see
[section 10.6 of the specification](../../spec/core/#106-diagnostic-codes).

