Dear Konstantin,

I think I have encountered a (weird) JEL bug.

If I compile and run the following program against (e.g.) JEL 2.1.1:

    import gnu.jel.Evaluator;
    import gnu.jel.Library;

    public class Jelly3 {

        public static void main(String[] args) throws Throwable {
            Library lib = new Library(new Class[] {Jelly3.ALib.class},
                                      null, null, null, null);

            // These calls work OK:
            Evaluator.compile("dx==1", lib, null);
            Evaluator.compile("dx==1", lib, Boolean.class);
            Evaluator.compile("ix==1", lib, null);

            // But this one causes a java.lang.VerifyError:
            Evaluator.compile("ix==1", lib, Boolean.class);
        }

        public static class ALib {
            public static double dx() {
                return 1.0;
            }
            public static int ix() {
                return 1;
            }
        }
    }

I see this error:

    Exception in thread "main" java.lang.VerifyError: (class: dump, method: 
evaluate signature: ([Ljava/lang/Object;)Ljava/lang/Object;) Expecting to find 
unitialized object on stack
            at java.lang.Class.getDeclaredConstructors0(Native Method)
            at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
            at java.lang.Class.getConstructor0(Class.java:3075)
            at java.lang.Class.newInstance(Class.java:412)
            at gnu.jel.Evaluator.compile(Evaluator.java:158)
            at Jelly3.main(Jelly3.java:16)

Any ideas?

Many thanks,

Mark

--
Mark Taylor   Astronomical Programmer   Physics, Bristol University, UK
[email protected] +44-117-9288776  http://www.star.bris.ac.uk/~mbt/

_______________________________________________
Bug-jel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-jel

Reply via email to