beanshell2
beanshell2 copied to clipboard
class13 unit tests fail
Run the unit test for class13.bsh
[java] Running test: class13.bsh
[java] Test FAILED: Line: 35 : assert ( isEvalError ( "new
TestInner1.InstanceInner1().go()" ) ) : while evaluating file: class13.bsh
The comment for this failure indicats that while it is wrong, its "OK"
// This should really not work... but it's actually ok unless we try to
// access instance stuff
I actually cannot see why it is expecting to fail.
Original issue reported on code.google.com by [email protected] on 6 May 2007 at 2:06
This bug is real because the super of a nonstatic inner class should be an
instance
of the super class, not the super class itself. Here is the relevant comment
from
BSHAllocationExpression:
// Change the parent (which was the class static) to the class instance
// We really need to check if we're a static inner class here first...
// but for some reason Java won't show the static modifier on our
// fake inner classes... could generate a flag field.
This isn't easy to fix, and it doesn't affect me, so I will pass for now.
Original comment by [email protected] on 8 May 2007 at 5:58
Isn't this a duplicate of issue 8 (or vice versa, but issue 8 has more infos).
Original comment by [email protected] on 21 Feb 2011 at 12:04
sorry, my fault. "class13.bsh" vs. "class3.bsh". Extracted unit test classes
with issue number in name.
Original comment by [email protected] on 24 Feb 2011 at 4:33