class foo {} class bar extends foo {} class baz extends bar {} // Method class MethodTest { bar overrideTest(bar a, bar b) { return new bar() } // success of clause 3 bar overrideTest(baz a, bar b) { // 4/5 failure of clauses 3 and 4 (parameter type not supertype of bar) return new bar() } } 0