File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1133,7 +1133,7 @@ ASTGateNode::ASTGateNode(const ASTIdentifierNode *Id,
1133
1133
1134
1134
if (C != Params.size ()) {
1135
1135
std::stringstream M;
1136
- M << " Inconsistent number of Params. " << C;
1136
+ M << " Inconsistent number of parameters in the gate call for the corresponding gate definition " << C;
1137
1137
QasmDiagnosticEmitter::Instance ().EmitDiagnostic (
1138
1138
DIAGLineCounter::Instance ().GetLocation (), M.str (), DiagLevel::Error);
1139
1139
return ;
@@ -1369,7 +1369,13 @@ ASTGateNode::ASTGateNode(const ASTIdentifierNode *Id,
1369
1369
++C;
1370
1370
}
1371
1371
1372
- assert (C == Params.size () && " Inconsistent number of Params!" );
1372
+ if (C != Params.size ()) {
1373
+ std::stringstream M;
1374
+ M << " Inconsistent number of parameters in the gate call for the corresponding gate definition" << C;
1375
+ QasmDiagnosticEmitter::Instance ().EmitDiagnostic (
1376
+ DIAGLineCounter::Instance ().GetLocation (), M.str (), DiagLevel::Error);
1377
+ return ;
1378
+ }
1373
1379
1374
1380
for (std::vector<ASTAngleNode *>::const_iterator I = Params.begin ();
1375
1381
I != Params.end (); ++I) {
You can’t perform that action at this time.
0 commit comments