-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
1.1.4
-
generic
-
generic
allan.jacobs@Eng 1997-10-27
The rules for assigning initial values to blank final variables say
that they can be assigned in constructors. Such variables can be
assigned values at most once in every execution path. It is possible
to get one constructor to call another and to have both assign a value
to the same blank final variable.
The following test code is derived from Modena (v 2.2) test
niner117.java.
algol% cat X.java
class X {
final int i;
X() { i = 10; }
X (int j) { X ox = new X(); i = j; }
public static void main( String[] argv ) {
X ox = new X(2);
System.out.println(ox.i);
}
}
algol% java -fullversion
java full version "1.1.4n:1997.10.16"
algol% javac -d . X.java
algol% java X
2
allan.jacobs@Eng 1997-11-04
The test is bad. Please close this bug.