...
This commit is contained in:
@@ -1,19 +1,30 @@
|
||||
// c
|
||||
extern func puts(text: cstring)
|
||||
|
||||
struct Human {
|
||||
interface Printable
|
||||
{
|
||||
func print()
|
||||
}
|
||||
|
||||
struct Human : Printable
|
||||
{
|
||||
name: cstring
|
||||
age: u32
|
||||
|
||||
func print()
|
||||
{
|
||||
puts(this.name)
|
||||
}
|
||||
}
|
||||
|
||||
func main(args: []cstring): i64
|
||||
{
|
||||
let x: Human = struct {
|
||||
let x: Printable = struct Human {
|
||||
name = "Oliver"
|
||||
age = 23
|
||||
}
|
||||
|
||||
puts(x.name)
|
||||
x.print()
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user