# inherits

Alternative base-class connector

Last updated: 2026-09-09

Package: language | Status: generated-cpp-only

Tags: cpu, data, keyword, language, yeho

Prefer thing and ordinary functions for Kyber-ready programs. Use class and interface only while evaluating the explicit oracle route.

```yh
inherits
```


## Complete program

A complete example you can paste into start.yh.

Verification: type checked

```yh
class Pilot
{
    Name() -> text { return "Pilot" }
}
class Scout inherits Pilot
{
    override Name() -> text { return "Scout" }
}
Scout pilot = Scout()
Console.Log(pilot.Name())

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.word__inherits"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/word--inherits/complete --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Class and interface dispatch is generated-C++ only in Yeho Core 2026.1.

Generic classes and interfaces are not admitted even though the parser reserves research syntax.

Source: yeho/docs/language/conformance-2026.1.json: class-and-interface-dispatch; parser_declarations.cpp

AI training permission: https://demonhunterlabs.com/ai-use
