Refactor type checker for series and overloads
Introduce `unify_matched_overload` to handle type variable propagation for overloaded functions. This ensures that when an overload is chosen, its concrete parameter types are unified with the actual argument types. This is crucial for resolving type variables nested within closures called through overloaded functions. Additionally, this commit: - Allows `series` to infer schema type from `push` calls, simplifying its signature. - Adds a fallback to `ValueSeries` in `rtl::series` if schema injection fails. - Updates `StaticType::TypeVar` to return `Any` when accessed, simplifying field access logic. - Adjusts tests to reflect the simplified `series` signature.
This commit is contained in:
@@ -578,6 +578,9 @@ impl StaticType {
|
||||
}
|
||||
}
|
||||
StaticType::Any => return Some(StaticType::Any),
|
||||
// TypeVar is unresolved — field access returns Any for now.
|
||||
// The type is concretized when the lambda is specialized.
|
||||
StaticType::TypeVar(_) => return Some(StaticType::Any),
|
||||
_ => {}
|
||||
}
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user