From: Jean Privat Date: Sat, 18 Apr 2015 09:47:00 +0000 (+0700) Subject: Merge: Check operator X-Git-Tag: v0.7.4~20 X-Git-Url: http://nitlanguage.org Merge: Check operator Previously, no checking was done on the signature of operators. While this is not an issue for the model nor the tools this could yield to not POLA error messages when the operator is used. eg. ~~~nit class A fun +(other: A) do print "hello" end var a = new A var b = a + a # Error expected expression a + a # Error unexpected operator + # no way do invoke `+` in fact. ~~~ With the PR, we have ~~~ Error: mandatory return type for `+`. fun +(other: A) do print "hello" ^ ~~~ The following errors are added by the PR: * mandatory return * not enough parameters * too much parameters * illegal variadic parameter Pull-Request: #1269 Reviewed-by: Alexandre Terrasa Reviewed-by: Alexis Laferrière Reviewed-by: Romain Chanoir --- aba22d750b15f3b7a2efc804ee5c7891a9a09add