@@ -10,8 +10,8 @@ use super::{
10
10
} ,
11
11
InferFailReason , InferResult ,
12
12
} ;
13
+ use crate :: semantic:: generic:: instantiate_doc_function;
13
14
use crate :: semantic:: infer_expr;
14
- use crate :: { semantic:: generic:: instantiate_doc_function, LuaVarRefId } ;
15
15
use crate :: {
16
16
CacheEntry , CacheKey , DbIndex , InFiled , LuaFunctionType , LuaGenericType , LuaInstanceType ,
17
17
LuaOperatorMetaMethod , LuaOperatorOwner , LuaSignatureId , LuaType , LuaTypeDeclId , LuaUnionType ,
@@ -625,7 +625,7 @@ pub fn infer_call_expr(
625
625
626
626
let prefix_expr = call_expr. get_prefix_expr ( ) . ok_or ( InferFailReason :: None ) ?;
627
627
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 (
629
629
db,
630
630
cache,
631
631
call_expr. clone ( ) ,
@@ -636,15 +636,15 @@ pub fn infer_call_expr(
636
636
. get_ret ( )
637
637
. clone ( ) ;
638
638
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
+ // }
648
648
649
649
Ok ( ret_type)
650
650
}
0 commit comments