package test.cf.newly; class Foo { Foo f; Bar b; public Foo(Foo f) { this.f=f; } public Foo() { super(); } public void test() { return; } public void run() { Bar b= new Bar(); b.test(); f.f.test(); ((BarPrime)this.b).test(); } public static void main(String[] args) { System.out.println("***** A correct implementation should report the following violations:\n"+ "*********Foo.java:22"); Foo aFoo = new Foo(new Foo(new Foo())); aFoo.b=new BarPrime(); aFoo.run(); } } class Bar { void test() { return; } } class BarPrime extends Bar { void test() { } }