KeliLanguage / compiler

The compiler for Keli
https://keli-language.gitbook.io/doc/specification/
Apache License 2.0
171 stars 1 forks source link

Error reporting bug for bounded type variables lambda #68

Open wongjiahau opened 5 years ago

wongjiahau commented 5 years ago

t## Input

// entry.keli
List.of(A Type) = choice
    .Nil    
    .Cons($.value(A) next(List.of(A)))

{A Type}
(this List.of(A)).append(element A) | List.of(A) = List.Nil

{A Type}
(this $.x(List.of(A))).yo =
    this.x(.append(0))

Expected output

ERROR at ./test/specs/execute/@type-mismatch-1/entry.keli:11:25

    Expected `A` but got `Int` around `.append(0)`