Newer
Older
zweic / tests / four / method00-4.zwei
@glproj03 glproj03 on 28 Dec 2005 328 bytes wicked cool test file added: script.sh
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