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)
commitad0a7692b28db70d9b78736675884250106b9335
treef228e3f1df853928b80faadc78faf6ccab4dec46
parent34685ab5c1ff5ee7e54d0d621850743345a5fc66
parente6863d7b701837658e92c9a4458e1854cdaa839b
Merge: Hint vararg

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>