---
title: Any
canonical_url: https://mew-lang.org/language/primitives/any/
sidecar_url: https://mew-lang.org/language/primitives/any.md
content_hash: sha256:5c2a9e3ead556a586685cca21f4d973abf4e2bb4037a1b38b9515cbb97997d84
tokens: 337
uid: language.primitives.any
reading_time_minutes: 2
---

Language
# Any

 
`any` holds a value of any type. Every type widens into one on its own, so assigning into an `any` needs nothing written.

 
```mew
let number: any = 32;
let text: any = "hello";
let numbers: any = new i32[] { 1, 2, 3 };
let nothing: any = null;
```

 
The only thing that does not go in is `void`, because a function that returns nothing produces no value to widen.

 
## Nothing is reachable through it

 
An `any` says nothing about what is in there, so no field, method or operator reaches through one.

 
```mew
pub type Point {
    pub field x: i32;
    pub field y: i32;
}
  
let boxed: any = new Point { x: 32, y: 40 };
let x = boxed.x;
```

 
```
Error [MEW2029]: Field does not exist
The field 'x' does not exist within type 'any'
```

 
Getting the value back out is a [cast](https://mew-lang.org/language/type-casting.md), and [is](https://mew-lang.org/language/type-checking.md) is what asks what is in there first.

 
```mew
use std;
  
pub type Point {
    pub field x: i32;
    pub field y: i32;
}
  
let boxed: any = new Point { x: 32, y: 40 };
  
if boxed is Point {
    println($"{(boxed as Point).x}");
}
```

 
[Previous
                
                Text](https://mew-lang.org/language/primitives/text.md)[Next
                    
                Booleans](https://mew-lang.org/language/primitives/bool.md)