Merge: Advice on useless repeated types
authorJean Privat <jean@pryen.org>
Fri, 29 May 2015 01:38:22 +0000 (21:38 -0400)
committerJean Privat <jean@pryen.org>
Fri, 29 May 2015 01:38:22 +0000 (21:38 -0400)
commitb5cd4c722ff50fa9239aa9f52c4e63ba175b05d0
treea9aba6e3e10e771de6bc0783779189bb8db6df18
parent3bf3c96cae15eb7b6292db88567cdc4884e6d882
parent1a2a9f4655ea72ba4c51698fe6bf500165e4f8b0
Merge: Advice on useless repeated types

With this PR, nitpick and other tools are able to suggest to remove useless types in signature redefinition with the option `-W`.

Example:

~~~nit
class A
fun foo(a: Bool) do end
end

class B
super A

redef fun foo(a: Bool) do end
end
~~~

~~~
$ nitc test.nit -W
test.nit:8,19--22: Warning: useless type repetition on parameter `a` for redefined method `foo` (useless-signature)
redef fun foo(a: Bool) do end
                 ^
Errors: 0. Warnings: 1.
~~~

Pull-Request: #1373
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>