Skip to content

Commit

Permalink
set PathExpression type in ExpandLookahead (p4lang#4959)
Browse files Browse the repository at this point in the history
Don't leave the PathExpression as Type_Unknown when expanding a
lookahead.

Signed-off-by: Glen Gibb <[email protected]>
  • Loading branch information
grg authored Oct 11, 2024
1 parent 1e9e0fb commit 9d1f746
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion midend/expandLookahead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ DoExpandLookahead::ExpansionInfo *DoExpandLookahead::convertLookahead(
ta->push_back(bittype);
auto mc = new IR::MethodCallExpression(expression->srcInfo, expression->method->clone(), ta,
expression->arguments);
auto pathe = new IR::PathExpression(name);
auto pathe = new IR::PathExpression(bittype, name);
auto lookupCall = new IR::AssignmentStatement(expression->srcInfo, pathe, mc);
auto result = new ExpansionInfo;
result->statement = lookupCall;
Expand Down

0 comments on commit 9d1f746

Please sign in to comment.