This repository has been archived on 2025-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nub-lang-archive-2/example/src/main.nub
2025-08-13 21:50:42 +02:00

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
}