language.operators · operator ·
as
Cast a reference to a named type at an admitted dynamic boundary.
A focused reference with a complete example. Numeric widths and experimental types still depend on the selected backend.
asStatus: documented
Complete program
Use a checked class boundary before reading the pilot-specific callsign.
cpu · language · type checked
class Actor { }
class Pilot extends Actor { text callsign = "Nova" }
Actor actor = Pilot()
if actor is Pilot
{
Pilot pilot = actor as Pilot
Console.Log(pilot.callsign)
}
project.mech
manifestVersion = "2"
package = "api.example.language__casts_type_checks"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
Notes and source
demonhunterlabs/app/lib/yeho-language-reference.ts