gcc/libjava/testsuite/libjava.compile/final_initialization_in_ctor.java
Alexandre Petit-Bianco 5952078834 final_initialization_in_ctor.java: New file
2001-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>

	* libjava.compile/final_initialization_in_ctor.java: New file

( http://gcc.gnu.org/ml/gcc-patches/2001-09/msg01160.html )

From-SVN: r45843
2001-09-27 12:17:16 -07:00

22 lines
422 B
Java

// This test case was insipred by
// http://gcc.gnu.org/ml/java/2001-09/msg00181.html
class M {
int size () { return 3; }
}
class final_initialization_in_ctor {
final float loadFactor;
public final_initialization_in_ctor(M m)
{
this(Math.max(m.size() * 2, 30), (float)40.0);
}
public final_initialization_in_ctor(int initialCapacity, float loadFactor)
{
this.loadFactor = loadFactor;
}
}