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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

public class PR7482
{
  private interface I { }
  private static class B { }
  private static class U extends B implements I { }
  private static class V extends B implements I { }
 
  static I field;
 
  private static void g1(Object o)
  {
    I val;
    if (o == null)
      val = new U();
    else
      val = new V();
    field = val;
  }
 
  private static I g2(Object o)
  {
    I val;
    if (o == null)
      val = new U();
    else
      val = new V();
    return val;
  }
 
  public static void main(String[] args)
  {
    g1(null);
    g2(null);
  }
}
 

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.