[#541] | project: nsc | priority: medium | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Stephane | Nikolay | won't fix | 2006-03-01 15:37:34.0 | |
subject | java.rmi.Remote as parameter type | |||
code |
import java.rmi.server.UnicastRemoteObject [remote] class Foo { def foo(): Int } object test { val obj = UnicastRemoteObject.exportObject(new Foo) } |
|||
what happened | test.scala:7 error: type mismatch; found : Foo required: java.rmi.Remote val obj = UnicastRemoteObject.exportObject(new Foo) ^ one error found |
|||
what expected | Same code works fine in Java:import java.rmi.server.UnicastRemoteObject; class Foo implements java.rmi.Remote { int foo() { return 0; } } public class test { public static void main(String[] args) throws Exception { Object obj = UnicastRemoteObject.exportObject(new Foo()); } } |
|||
[back to overview] |
Stephane edited on 2006-03-01 15:38:00.0 |
Stephane edited on 2006-03-01 15:38:31.0 |
Martin edited on 2006-03-11 23:29:38.0 |
I think Nick added the [remote] attribute (correct me if I'm wrong). I think when the attribute is set one should also add the inheritance to the Remote interface. Nock waht do you think? |
Iulian edited on 2006-04-04 10:02:11.0 |
Although the email exchange had no definite conclusion, I think this behavior will remain unchanged (it is similar to how [serializable] works), so I changed the status to won't fix. |