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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [PR6204.java] - Blame information for rev 781

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
class X
2
{
3
  public Y getY()
4
  {
5
    return new Y(1);
6
  }
7
}
8
 
9
class Y extends X
10
{
11
  int i;
12
 
13
  Y(int i)
14
  {
15
    this.i = i;
16
  }
17
 
18
  public Y getY()
19
  {
20
    return new Y(2);
21
  }
22
}
23
 
24
class A
25
{
26
  X x = new Y(-1);
27
  public X getX() { return x; }
28
}
29
 
30
public class PR6204 extends A
31
{
32
  public Y getY() { return super.getX().getY(); }
33
 
34
  public static void main(String[] args)
35
  {
36
    System.out.println (new PR6204().getY().i);
37
  }
38
}

powered by: WebSVN 2.1.0

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