prakhar1989 / JSJS

A strongly typed language for the web!
http://jsjs-lang.org
MIT License
40 stars 5 forks source link

Bug in string_of_type for generic placeholders #80

Open gaurangsadekar opened 8 years ago

gaurangsadekar commented 8 years ago

Remembered this issue right now, I had found it yesterday. This was working correctly earlier, before the pretty placeholders commit (8e5d6ea).

Expressions and incorrect outputs:

/\(x, y) => x;
/\ (x : A, y : A) : A = { { (x: A) } }

/\(x, y) => y;
/\ (x : A, y : A) : A = { { (y: A) } }

/\(x: B, y: A) => y;
/\ (x : A, y : A) : A = { { (y: A) } }

/\(x: T, y: U) => y;
/\ (x : A, y : A) : A = { { (y: A) } }

Seems like there is some problem with the naming of place holders, given that they always start with A.