Message1901

Author cgroves
Recipients
Date 2007-10-06.17:27:28
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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?
History
Date User Action Args
2008-02-20 17:18:01adminlinkissue1789561 messages
2008-02-20 17:18:01admincreate