From 90b303fc03c2e701aff754fa0e1a668a4a32a712 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sun, 4 Oct 2020 19:28:22 +0200 Subject: [PATCH] fix error message for invalid number of arguments --- compiler/src/prog8/ast/processing/AstChecker.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/prog8/ast/processing/AstChecker.kt b/compiler/src/prog8/ast/processing/AstChecker.kt index 0c9a1d852..19a2f05b2 100644 --- a/compiler/src/prog8/ast/processing/AstChecker.kt +++ b/compiler/src/prog8/ast/processing/AstChecker.kt @@ -896,7 +896,7 @@ internal class AstChecker(private val program: Program, val error = VerifyFunctionArgTypes.checkTypes(functionCall, functionCall.definingScope(), program) if(error!=null) - errors.err(error, functionCall.args.first().position) + errors.err(error, functionCall.position) super.visit(functionCall) }