diff --git a/lib/Dialect/FIRRTL/FIRRTLOps.cpp b/lib/Dialect/FIRRTL/FIRRTLOps.cpp index 0b4ca6f76e66..9ca12e4ccad9 100644 --- a/lib/Dialect/FIRRTL/FIRRTLOps.cpp +++ b/lib/Dialect/FIRRTL/FIRRTLOps.cpp @@ -1579,7 +1579,7 @@ LogicalResult FModuleOp::verify() { for (auto [arg, type, loc] : zip(body->getArguments(), portTypes, portLocs)) { if (arg.getType() != cast(type).getValue()) return emitOpError("block argument types should match signature types"); - if (arg.getLoc() != cast(loc)) + if (arg.getLoc() != cast(loc)) return emitOpError( "block argument locations should match signature locations"); }