Renamed 'unseed' -> 'not_yet_inferred'

This commit is contained in:
KtorZ 2024-05-16 23:33:23 +02:00
parent 27b3536f09
commit ea3e79c132
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
1 changed files with 4 additions and 4 deletions

View File

@ -88,7 +88,7 @@ pub(crate) fn infer_function(
let mut expr_typer = ExprTyper::new(environment, lines, tracing);
expr_typer.hydrator = hydrator;
expr_typer.unseen = BTreeSet::from_iter(hydrators.keys().cloned());
expr_typer.not_yet_inferred = BTreeSet::from_iter(hydrators.keys().cloned());
// Infer the type using the preregistered args + return types as a starting point
let inferred =
@ -199,7 +199,7 @@ pub(crate) struct ExprTyper<'a, 'b> {
pub(crate) hydrator: Hydrator,
// A static set of remaining function names that are known but not yet inferred
pub(crate) unseen: BTreeSet<String>,
pub(crate) not_yet_inferred: BTreeSet<String>,
// We keep track of whether any ungeneralised functions have been used
// to determine whether it is safe to generalise this expression after
@ -215,7 +215,7 @@ impl<'a, 'b> ExprTyper<'a, 'b> {
) -> Self {
Self {
hydrator: Hydrator::new(),
unseen: BTreeSet::new(),
not_yet_inferred: BTreeSet::new(),
environment,
tracing,
ungeneralised_function_used: false,
@ -2390,7 +2390,7 @@ impl<'a, 'b> ExprTyper<'a, 'b> {
// NOTE: Recursive functions should not run into this multiple time.
// If we have no hydrator for this function, it means that we have already
// encountered it.
if self.unseen.contains(&fun.name) {
if self.not_yet_inferred.contains(&fun.name) {
return Err(Error::MustInferFirst {
function: fun.clone(),
location: *location,