From b8641779bda4e378584969d4d14e4bd1a3f9c999 Mon Sep 17 00:00:00 2001 From: Nicolas Cannasse Date: Mon, 16 Dec 2019 13:28:40 +0100 Subject: [PATCH] added error on missing event args --- hscript/Checker.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hscript/Checker.hx b/hscript/Checker.hx index 27cf2ca..88d9df6 100644 --- a/hscript/Checker.hx +++ b/hscript/Checker.hx @@ -997,6 +997,8 @@ class Checker { } this.locals.set(a.name, a.t); } + if( withArgs != null && targs.length < withArgs.length ) + error("Missing "+(withArgs.length - targs.length)+" arguments ("+[for( i in targs.length...withArgs.length ) typeStr(withArgs[i].t)].join(",")+")", expr); typeExpr(body,NoValue); allowDefine = oldGDef; allowReturn = oldRet;