Skip to content

Commit da17507

Browse files
committed
Fix #597
1 parent 8a629f2 commit da17507

File tree

1 file changed

+7
-2
lines changed
  • crates/emmylua_code_analysis/src/compilation/analyzer/flow/bind_analyze

1 file changed

+7
-2
lines changed

crates/emmylua_code_analysis/src/compilation/analyzer/flow/bind_analyze/comment.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
use emmylua_parser::{LuaAstNode, LuaComment, LuaDocTag};
22

3-
use crate::{compilation::analyzer::flow::binder::FlowBinder, FlowId, FlowNodeKind};
3+
use crate::{
4+
compilation::analyzer::flow::{bind_analyze::exprs::bind_expr, binder::FlowBinder},
5+
FlowId, FlowNodeKind,
6+
};
47

58
pub fn bind_comment(binder: &mut FlowBinder, lua_comment: LuaComment, current: FlowId) -> FlowId {
69
let cast_tags = lua_comment.get_doc_tags().filter_map(|it| match it {
@@ -11,7 +14,9 @@ pub fn bind_comment(binder: &mut FlowBinder, lua_comment: LuaComment, current: F
1114
let mut parent = current;
1215
for cast in cast_tags {
1316
let expr = cast.get_key_expr();
14-
if expr.is_some() {
17+
if let Some(expr) = expr {
18+
bind_expr(binder, expr, current);
19+
1520
let flow_id = binder.create_node(FlowNodeKind::TagCast(cast.to_ptr()));
1621
binder.add_antecedent(flow_id, parent);
1722
parent = flow_id;

0 commit comments

Comments
 (0)