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