nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
126b442
)
typing: handle multiple vararg
author
Jean Privat
<jean@pryen.org>
Tue, 10 Nov 2015 14:47:42 +0000
(09:47 -0500)
committer
Jean Privat
<jean@pryen.org>
Tue, 10 Nov 2015 14:47:42 +0000
(09:47 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>
src/semantize/typing.nit
patch
|
blob
|
history
diff --git
a/src/semantize/typing.nit
b/src/semantize/typing.nit
index
bd855b9
..
aeb3b7e
100644
(file)
--- a/
src/semantize/typing.nit
+++ b/
src/semantize/typing.nit
@@
-490,8
+490,12
@@
private class TypeVisitor
continue # skip the vararg
end
continue # skip the vararg
end
- var paramtype = param.mtype
- self.visit_expr_subtype(arg, paramtype)
+ if not param.is_vararg then
+ var paramtype = param.mtype
+ self.visit_expr_subtype(arg, paramtype)
+ else
+ check_one_vararg(arg, param)
+ end
end
if min_arity > 0 then
end
if min_arity > 0 then