Merge: Hint vararg
authorJean Privat <jean@pryen.org>
Fri, 24 Apr 2015 06:02:47 +0000 (13:02 +0700)
committerJean Privat <jean@pryen.org>
Fri, 24 Apr 2015 06:02:47 +0000 (13:02 +0700)
Improve the error message so that user that try to pass an array as is instead of elements is hinted about the `...` reverse-vararg operator.

~~~
fun foo(xs: Int...) do end
foo(1,2,3) # OK
var a = [1,2,3]
foo(a) # Error, expected `Int`; got `Array[Int]`. Is `...` missing?
foo(a...) # OK
~~~

![](http://i.imgur.com/zmyi8GR.jpg)

close #98 (quite old bug)

Pull-Request: #1294
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>


Trivial merge