Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
»

type_of

type_of

(T 
type
, _ Lazy T)
 => 
Type
[Contains abstract features]
universe feature to determine the compile-time type of an expression.

This is to be called without an actual type passed to `T`, but `T` should be
inferred from the actual value argument `_`.

The value argument is evaluated and ignored.

The result is the type of the value argument boxed into a ref value and returned
as a value of type `Type`.

examples:

`type_of "bla"` is `String`
`type_of (panic "***")` will terminate

Type Parameters

0.094dev (2025-06-18 15:08:51 GIT hash 89cffc23ae669b0898a5564fefbf793fcb8e5ca7 built by fridi@fzen)