diff --git a/Caprica/papyrus/expressions/PapyrusFunctionCallExpression.cpp b/Caprica/papyrus/expressions/PapyrusFunctionCallExpression.cpp index 3f3339d..49a09e5 100644 --- a/Caprica/papyrus/expressions/PapyrusFunctionCallExpression.cpp +++ b/Caprica/papyrus/expressions/PapyrusFunctionCallExpression.cpp @@ -413,7 +413,13 @@ void PapyrusFunctionCallExpression::semantic(PapyrusResolutionContext* ctx, Papy auto a = *iter; ++iter; a->argIndex = p->index; - newArgs.insertBefore(newArgsIter, a); + if (newArgsIter != newArgs.endInsertable() && idEq(newArgsIter->name, a->name)) { + ctx->reportingContext.error(a->value->location, + "Duplicate named parameter provided '{}'!", + a->name); + } else { + newArgs.insertBefore(newArgsIter, a); + } goto ContinueOuterLoop; } if (newArgsIter != newArgs.endInsertable() && newArgsIter->argIndex <= p->index)