28 lines
302 B
Plaintext
28 lines
302 B
Plaintext
extern func puts(text: cstring)
|
|
|
|
interface Test
|
|
{
|
|
func print()
|
|
}
|
|
|
|
struct Human : Test
|
|
{
|
|
name: cstring
|
|
|
|
func print()
|
|
{
|
|
puts(this.name)
|
|
}
|
|
}
|
|
|
|
func main(args: []cstring): i64
|
|
{
|
|
let human: Test = alloc Human {
|
|
name = "oliver"
|
|
}
|
|
|
|
human.print()
|
|
|
|
return 0
|
|
}
|