forked from M-Labs/nac3
core/typecheck/typedef: Add vararg to Unifier::stringify
This commit is contained in:
parent
e57133e96f
commit
95998ca3a1
|
@ -1390,17 +1390,21 @@ impl Unifier {
|
|||
.args
|
||||
.iter()
|
||||
.map(|arg| {
|
||||
let vararg_prefix = if arg.is_vararg { "*" } else { "" };
|
||||
|
||||
if let Some(dv) = &arg.default_value {
|
||||
format!(
|
||||
"{}:{}={}",
|
||||
"{}:{}{}={}",
|
||||
arg.name,
|
||||
vararg_prefix,
|
||||
self.internal_stringify(arg.ty, obj_to_name, var_to_name, notes),
|
||||
dv
|
||||
)
|
||||
} else {
|
||||
format!(
|
||||
"{}:{}",
|
||||
"{}:{}{}",
|
||||
arg.name,
|
||||
vararg_prefix,
|
||||
self.internal_stringify(arg.ty, obj_to_name, var_to_name, notes)
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue