Message1901
I changed that code to the following so it would compile:
public class MyClass {
private int myValue;
public int set(int value) {
myValue = value;
return myValue;
}
}
Here's the results in Jython:
Jython 2.2.1rc2 on java1.5.0_07
Type "copyright", "credits" or "license" for more information.
>>> import MyClass
>>> m = MyClass()
>>> m.set(7)
7
>>>
If I change the return type to void, I can call it equally well. I tried code like that and several other variations, and it's always callable. Is there some difference in the actual code where you saw this fail? |
|
Date |
User |
Action |
Args |
2008-02-20 17:18:01 | admin | link | issue1789561 messages |
2008-02-20 17:18:01 | admin | create | |
|