/** * @constraint 4.8.2.14 * @title assignment incompatible references */ @SuppressWarnings("cast") public void testVFE7() { // @uses dxc.junit.opcodes.areturn.jm.TSuper2 // @uses dxc.junit.opcodes.areturn.Runner // @uses dxc.junit.opcodes.areturn.RunnerGenerator try { RunnerGenerator rg = (RunnerGenerator) Class.forName("dxc.junit.opcodes.areturn.jm.T_areturn_15").newInstance(); Runner r = rg.run(); assertFalse(r instanceof Runner); assertFalse(Runner.class.isAssignableFrom(r.getClass())); // only upon invocation of a concrete method, // a java.lang.IncompatibleClassChangeError is thrown r.doit(); fail("expected a verification exception"); } catch (Throwable t) { DxUtil.checkVerifyException(t); } }