Newer
Older
zweic / tests / 4 / method00-4.zwei
@ajaggi ajaggi on 26 Dec 2005 328 bytes Added some test cases
  1. class foo {}
  2. class bar extends foo {}
  3. class baz extends bar {}
  4.  
  5. // Method
  6.  
  7. class MethodTest {
  8. bar overrideTest(bar a, bar b) { return new bar() } // success of clause 3
  9. bar overrideTest(baz a, bar b) { // 4/5 failure of clauses 3 and 4 (parameter type not supertype of bar)
  10. return new bar()
  11. }
  12.  
  13. }
  14.  
  15. 0