beanshell2 icon indicating copy to clipboard operation
beanshell2 copied to clipboard

class13 unit tests fail

Open GoogleCodeExporter opened this issue 10 years ago • 4 comments

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

GoogleCodeExporter avatar Apr 22 '15 19:04 GoogleCodeExporter

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

GoogleCodeExporter avatar Apr 22 '15 19:04 GoogleCodeExporter

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

GoogleCodeExporter avatar Apr 22 '15 19:04 GoogleCodeExporter

I don't think 7 and 8 are related.

Original comment by [email protected] on 21 Feb 2011 at 3:58

GoogleCodeExporter avatar Apr 22 '15 19:04 GoogleCodeExporter

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

GoogleCodeExporter avatar Apr 22 '15 19:04 GoogleCodeExporter