Skip to content

Commit

Permalink
Fix expression type reported for Wimplicit-port-type-mismatch message
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePopoloski committed Jul 26, 2023
1 parent 3c9604c commit 8c89745
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/ast/symbols/PortSymbols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1667,6 +1667,7 @@ const Expression* PortConnection::getExpression() const {

if (!e->type->isEquivalent(*type)) {
auto& comp = context.getCompilation();
auto exprType = e->type;
if (direction == ArgumentDirection::In) {
e = &Expression::convertAssignment(context, *type, *e,
implicitNameRange.start());
Expand All @@ -1685,7 +1686,7 @@ const Expression* PortConnection::getExpression() const {
implicitNameRange);
diag << port.name;
diag << *type;
diag << *e->type;
diag << *exprType;

// There's no way to represent this expression for the ref case.
if (direction == ArgumentDirection::Ref)
Expand Down

0 comments on commit 8c89745

Please sign in to comment.