Skip to content

Commit 526a573

Browse files
committed
opX in linking/
This improves type safety.
1 parent b718418 commit 526a573

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/linking/linking.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,14 @@ void linkingt::detailed_conflict_report_rec(
201201
e.id()==ID_index)
202202
{
203203
parent_types.insert(e.type());
204-
e=e.op0();
204+
if(e.id() == ID_dereference)
205+
e = to_dereference_expr(e).pointer();
206+
else if(e.id() == ID_member)
207+
e = to_member_expr(e).compound();
208+
else if(e.id() == ID_index)
209+
e = to_index_expr(e).array();
210+
else
211+
UNREACHABLE;
205212
}
206213

207214
conflict_path=conflict_path_before;

0 commit comments

Comments
 (0)