|
From: | Per Bothner |
Subject: | [Bug-kawa] [bug #16515] Overriding a method with incompatible return types should result in compile-time error |
Date: | Tue, 17 Mar 2009 16:54:37 +0000 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2) Gecko/20090227 Fedora/3.1-0.7.beta2.fc11 Minefield/3.1b2 |
Follow-up Comment #2, bug #16515 (project kawa): We now get a warning: /tmp/foo.scm:2:3: warning - cannot convert literal (of type java.lang.String) to long But if you add an explicit return type: (define-simple-class <MySchemeClass> (<java.util.Date>) ((getTime) :: String "a string")) you silently get an invalid override. Now that Java 5 supports co-variant return types we should support those - and check when the return type is incompatible. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?16515> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |