@@ -10,8 +10,8 @@ use super::{
1010 } ,
1111 InferFailReason , InferResult ,
1212} ;
13+ use crate :: semantic:: generic:: instantiate_doc_function;
1314use crate :: semantic:: infer_expr;
14- use crate :: { semantic:: generic:: instantiate_doc_function, LuaVarRefId } ;
1515use crate :: {
1616 CacheEntry , CacheKey , DbIndex , InFiled , LuaFunctionType , LuaGenericType , LuaInstanceType ,
1717 LuaOperatorMetaMethod , LuaOperatorOwner , LuaSignatureId , LuaType , LuaTypeDeclId , LuaUnionType ,
@@ -625,7 +625,7 @@ pub fn infer_call_expr(
625625
626626 let prefix_expr = call_expr. get_prefix_expr ( ) . ok_or ( InferFailReason :: None ) ?;
627627 let prefix_type = infer_expr ( db, cache, prefix_expr) ?;
628- let mut ret_type = infer_call_expr_func (
628+ let ret_type = infer_call_expr_func (
629629 db,
630630 cache,
631631 call_expr. clone ( ) ,
@@ -636,15 +636,15 @@ pub fn infer_call_expr(
636636 . get_ret ( )
637637 . clone ( ) ;
638638
639- let file_id = cache. get_file_id ( ) ;
640- let var_ref_id = LuaVarRefId :: SyntaxId ( InFiled :: new ( file_id, call_expr. get_syntax_id ( ) ) ) ;
641- let flow_chain = db. get_flow_index ( ) . get_flow_chain ( file_id, var_ref_id) ;
642- if let Some ( flow_chain) = flow_chain {
643- let root = call_expr. get_root ( ) ;
644- for type_assert in flow_chain. get_all_type_asserts ( ) {
645- ret_type = type_assert. tighten_type ( db, cache, & root, ret_type) ?;
646- }
647- }
639+ // let file_id = cache.get_file_id();
640+ // let var_ref_id = LuaVarRefId::SyntaxId(InFiled::new(file_id, call_expr.get_syntax_id()));
641+ // let flow_chain = db.get_flow_index().get_flow_chain(file_id, var_ref_id);
642+ // if let Some(flow_chain) = flow_chain {
643+ // let root = call_expr.get_root();
644+ // for type_assert in flow_chain.get_all_type_asserts() {
645+ // ret_type = type_assert.tighten_type(db, cache, &root, ret_type)?;
646+ // }
647+ // }
648648
649649 Ok ( ret_type)
650650}
0 commit comments