Fix type inference bug

This commit is contained in:
Jeff 2024-06-19 00:09:47 -04:00
parent aa79bea9a7
commit 69da32d414

View File

@ -137,17 +137,17 @@ impl ExpectedType for FunctionCall {
.. ..
} = function_node_type } = function_node_type
{ {
for (constructor, identifier) in self if let Type::Generic {
.type_arguments identifier: return_identifier,
.as_ref() ..
.unwrap() } = *return_type.clone()
.into_iter()
.zip(type_parameters.unwrap().into_iter())
{ {
if let Type::Generic { for (constructor, identifier) in self
identifier: return_identifier, .type_arguments
.. .as_ref()
} = *return_type.clone() .unwrap()
.into_iter()
.zip(type_parameters.unwrap().into_iter())
{ {
if return_identifier == identifier { if return_identifier == identifier {
let concrete_type = constructor.clone().construct(&context)?; let concrete_type = constructor.clone().construct(&context)?;