[Bootstrap]: Fix the error message for mismatch function arguments

This commit is contained in:
Sameer Rahmani 2020-12-25 01:18:46 +00:00
parent 0b56906474
commit a66245adb0
2 changed files with 3 additions and 3 deletions

View File

@ -3,8 +3,8 @@
(def hello-world
(fn (name)
(println "hello " name)))
(println "hello" name)))
(def main
(fn (&args)
(hello-world)))
(hello-world "world")))

View File

@ -173,7 +173,7 @@ func MakeFnScope(rt *Runtime, parent IScope, bindings IColl, values IColl) (*Sco
}
return nil, MakeError(rt,
fmt.Sprintf("'bindings' and 'values' size don't match. '%d' and '%d'", bindings.Count(), values.Count()))
fmt.Sprintf("expected '%d' arguments, got '%d'.", bindings.Count(), values.Count()))
}
for i := 0; i < len(binds); i += 1 {