redline-smalltalk/redline-smalltalk — Issue #65: Empty blocks error out
Author: SeanTAllen
Created: 2011-12-23 09:14:16+00:00
State: open

array do: [:each | ].

results in

[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:680)
Caused by: st.redline.RedlineException: java.lang.NullPointerException
at st.redline.RedlineException.withCause(RedlineException.java:15)
at st.redline.ProtoObject.loadObject(ProtoObject.java:126)
at st.redline.ProtoObject.resolveObject0(ProtoObject.java:111)
at st.redline.ProtoObject.resolveObject(ProtoObject.java:93)
at st.redline.ProtoObject.resolveObject(ProtoObject.java:55)
at st.redline.Stic.createClassInstance(Stic.java:73)
at st.redline.Stic.invoke(Stic.java:69)
at st.redline.Stic.invokeWith(Stic.java:26)
at st.redline.Stic.main(Stic.java:12)
... 6 more
Caused by: java.lang.NullPointerException
at java.math.BigInteger.compareTo(BigInteger.java:2460)
at st.redline.Primitives.p25(Primitives.java:95)
at st.redline.Integer$<=.applyTo(st/redline/Integer.st:18)
at st.redline.Primitives.send(Primitives.java:668)
at st.redline.Number$to:do:$B2.applyTo(st/redline/Number.st:13)
at st.redline.Primitives.p201(Primitives.java:203)
at st.redline.BlockClosure$value.applyTo(st/redline/BlockClosure.st:7)
at st.redline.Primitives.send(Primitives.java:656)
at st.redline.Primitives.p210(Primitives.java:228)
at st.redline.BlockClosure$whileTrue:.applyTo(st/redline/BlockClosure.st:45)
at st.redline.Primitives.send(Primitives.java:668)
at st.redline.Number$to:do:.applyTo(st/redline/Number.st:14)
at st.redline.Primitives.send(Primitives.java:680)
at st.redline.SequenceableCollection$do:.applyTo(st/redline/SequenceableCollection.st:7)
at st.redline.Primitives.send(Primitives.java:668)
at st.redline.ArrayTest$testDo.applyTo(st/redline/ArrayTest.st:20)
at st.redline.Primitives.send(Primitives.java:656)
at st.redline.ArrayTest$test.applyTo(st/redline/ArrayTest.st:5)
at st.redline.Primitives.send(Primitives.java:656)
at st.redline.TestSuite$run.applyTo(st/redline/TestSuite.st:4)
at st.redline.Primitives.send(Primitives.java:656)
at st.redline.TestRunner.construct(st/redline/TestRunner.st:1)
at st.redline.TestRunner.(st/redline/TestRunner.st)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at st.redline.ProtoObject.loadObject(ProtoObject.java:124)
... 13 more