thp-lang.org/md/learn/classes/interfaces.md
2023-11-04 07:17:32 -05:00

258 B

Interfaces

interface Serializable
{
    // Methods are always public in interfaces
    fun serialize() -> String
}



class Cat -> Serializable
{
    pub fun Serializable() -> String
    {
        // code
    }
}

No interface inheritance.