OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [PR6204.java] - Rev 765

Compare with Previous | Blame | View Log

class X
{
  public Y getY()
  {
    return new Y(1);
  } 
}
 
class Y extends X
{
  int i;
 
  Y(int i)
  {
    this.i = i;
  }
 
  public Y getY()
  {
    return new Y(2);
  } 
}
 
class A
{
  X x = new Y(-1);
  public X getX() { return x; }
}
 
public class PR6204 extends A
{
  public Y getY() { return super.getX().getY(); }
 
  public static void main(String[] args)
  {
    System.out.println (new PR6204().getY().i);
  }
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.