-
Notifications
You must be signed in to change notification settings - Fork 1
Interface
justinmann edited this page Dec 24, 2017
·
12 revisions
#control(
layout(x: 'i32, y: 'i32)'void
)
#button(
click()'void
)
button #button #control (
click() {
console.writeLine("clicked")
void
}
layout(x : 'i32, y : 'i32) { void }
) { this }
b : button()
ib : b as #button
ib.click()
ic : ib as #control?
// when casting from between interfaces you will receive
// an option because the underlying class may not implement this interface
ic?.layout(0, 0)