forked from M-Labs/nac3
format typevars consistently
This commit is contained in:
parent
93e9a6a38a
commit
ca07cb66cd
@ -367,7 +367,7 @@ impl dyn SymbolResolver + Send + Sync {
|
|||||||
unreachable!("expected class definition")
|
unreachable!("expected class definition")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
&mut |id| format!("var{}", id),
|
&mut |id| format!("typevar{}", id),
|
||||||
&mut None,
|
&mut None,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1906,7 +1906,7 @@ impl TopLevelComposer {
|
|||||||
unreachable!("must be class id here")
|
unreachable!("must be class id here")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
&mut |id| format!("tvar{}", id),
|
&mut |id| format!("typevar{}", id),
|
||||||
&mut None,
|
&mut None,
|
||||||
);
|
);
|
||||||
return Err(format!(
|
return Err(format!(
|
||||||
|
@ -763,7 +763,7 @@ fn make_internal_resolver_with_tvar(
|
|||||||
(name, {
|
(name, {
|
||||||
let (ty, id) = unifier.get_fresh_var_with_range(range.as_slice(), None, None);
|
let (ty, id) = unifier.get_fresh_var_with_range(range.as_slice(), None, None);
|
||||||
if print {
|
if print {
|
||||||
println!("{}: {:?}, tvar{}", name, ty, id);
|
println!("{}: {:?}, typevar{}", name, ty, id);
|
||||||
}
|
}
|
||||||
ty
|
ty
|
||||||
})
|
})
|
||||||
@ -791,7 +791,7 @@ impl<'a> Fold<Option<Type>> for TypeToStringFolder<'a> {
|
|||||||
self.unifier.internal_stringify(
|
self.unifier.internal_stringify(
|
||||||
ty,
|
ty,
|
||||||
&mut |id| format!("class{}", id.to_string()),
|
&mut |id| format!("class{}", id.to_string()),
|
||||||
&mut |id| format!("tvar{}", id.to_string()),
|
&mut |id| format!("typevar{}", id.to_string()),
|
||||||
&mut None,
|
&mut None,
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
@ -356,7 +356,7 @@ pub fn get_type_from_type_annotation_kinds(
|
|||||||
unifier.internal_stringify(
|
unifier.internal_stringify(
|
||||||
p,
|
p,
|
||||||
&mut |id| format!("class{}", id),
|
&mut |id| format!("class{}", id),
|
||||||
&mut |id| format!("tvar{}", id),
|
&mut |id| format!("typevar{}", id),
|
||||||
&mut None
|
&mut None
|
||||||
),
|
),
|
||||||
*id
|
*id
|
||||||
|
@ -830,7 +830,7 @@ impl Unifier {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
&mut |id| format!("var{}", id),
|
&mut |id| format!("typevar{}", id),
|
||||||
notes,
|
notes,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user