static public int test_0_npe_still_happens() { OpenFinal x = null; SealedFinal y = null; try { y.method1(); return(1); } catch (NullReferenceException e) { ;//ok } try { y.method2(); return(2); } catch (NullReferenceException e) { ;//ok } try { y.method3(); return(3); } catch (NullReferenceException e) { ;//ok } try { x.method4(); return(4); } catch (NullReferenceException e) { ;//ok } try { x.method5(); return(5); } catch (NullReferenceException e) { ;//ok } return(0); }
static public int test_0_sealed_method_devirt_right_method() { OpenFinal x = new OpenFinal(); if (x.method4() != 3) { return(1); } if (x.method5() != 2) { return(2); } return(0); }
static public int test_0_sealed_method_devirt_right_method () { OpenFinal x = new OpenFinal (); if (x.method4 () != 3) return 1; if (x.method5 () != 2) return 2; return 0; }