Skip to content

Commit

Permalink
Only check for functions in select labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihai Budiu committed May 19, 2020
1 parent ab6c453 commit cb3acf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontends/p4/typeChecking/typeChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3183,7 +3183,7 @@ const IR::Node* TypeInference::postorder(IR::MethodCallExpression* expression) {
checkCorelibMethods(mi->to<ExternMethod>());

auto bi = mi->to<BuiltInMethod>();
if ((findContext<IR::SelectCase>() || findContext<IR::Key>()) &&
if ((findContext<IR::SelectCase>()) &&
(!bi || (bi->name == IR::Type_Stack::pop_front ||
bi->name == IR::Type_Stack::push_front))) {
typeError("%1%: no function calls allowed in this context", expression);
Expand Down

0 comments on commit cb3acf3

Please sign in to comment.