JS backend: fixed compiler crash when use compareTo in infix call.

#EA-54661 fixed
This commit is contained in:
Zalim Bashorov
2014-05-08 18:10:54 +04:00
parent a578fc6762
commit 399c9c1175
3 changed files with 32 additions and 5 deletions
@@ -0,0 +1,14 @@
package foo
class A(t: Int) {
var i = t
fun compareTo(other: A) = (this.i - other.i)
}
fun box(): Boolean =
(A(3) compareTo A(2) > 0) &&
(A(2) compareTo A(2) == 0) &&
(A(1) compareTo A(0) > 0) &&
(A(3) compareTo A(4) < 0) &&
(A(0) compareTo A(100) < 0)