keid-lang / keid

Central repository for the Keid programming language
0 stars 1 forks source link

Implement interface intersection types #36

Open lucasbaizer2 opened 1 year ago

lucasbaizer2 commented 1 year ago

Behaviors defined between multiple interfaces should be supported to be intersected as one type.

For example:

interface Foo {
  doFoo();
}

interface Bar {
  doBar();
}

function main() {
    let x: Foo + Bar = // ...
    x.doFoo();
    x.doBar();
}