Roldak / SFSL

Statically typed Functionnal Scripting Language
1 stars 0 forks source link

Type bounds don't take environment into account #75

Closed Roldak closed 8 years ago

Roldak commented 8 years ago
module test {
    using sfsl.lang

    type A = class {}
    type B = class : A {}

    type Box[T] => class {
        def f[X: * < T]() => {}
    }

    def main() => {
        x: Box[A];
        x.f[B]();
    }
}

Doesn't compile: Kind mismatch. Expected * < T, found B < * < B