Skip to content
ZOLO / TE838 Type · error

unchecked cast from a dynamic value

A bare `as` cast from `Any` cannot prove the runtime value actually has the requested type, so Zolo rejects it. Use a checked cast (`as?`) or flow narrowing (`is`) instead.

Why this fires

A bare cast from Any cannot prove that the runtime value has the requested type, so Zolo rejects it.

let user = value as User // error[TE838]

Fix it

Use a checked cast or flow narrowing:

if let user = value as? User { render(user) }
if value is User { render(value) }

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

enespt-br