Commit 7bb36ce2 authored by Luca Bruno's avatar Luca Bruno Committed by Jürg Billeter

Fix ellipsis parameter position in generated methods

Fixes bug 620673.
parent 98aa9f05
......@@ -788,9 +788,9 @@ public class Vala.CCodeMethodModule : CCodeStructModule {
param.ccodenode = new CCodeFormalParameter.with_ellipsis ();
}
cparam_map.set (get_param_pos (param.cparameter_position), (CCodeFormalParameter) param.ccodenode);
cparam_map.set (get_param_pos (param.cparameter_position, param.ellipsis), (CCodeFormalParameter) param.ccodenode);
if (carg_map != null && !param.ellipsis) {
carg_map.set (get_param_pos (param.cparameter_position), get_variable_cexpression (param.name));
carg_map.set (get_param_pos (param.cparameter_position, param.ellipsis), get_variable_cexpression (param.name));
}
}
......
......@@ -32,6 +32,7 @@ TESTS = \
methods/bug598738.vala \
methods/bug599892.vala \
methods/bug613483.vala \
methods/bug620673.vala \
control-flow/break.vala \
control-flow/expressions-conditional.vala \
control-flow/for.vala \
......
void foo (int bar, ...) throws Error {
}
void main () {
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment