 |
返回原文..
Listing
% jacks javac
....
tests/jls/classes/class-declaration/class-modifiers
tests/jls/classes/class-declaration/class-modifiers/abstract-classes
tests/jls/classes/class-members
tests/jls/classes/constructor-declarations
tests/jls/classes/constructor-declarations/constructor-body
tests/jls/classes/constructor-declarations/constructor-body/explicit-constructor-invocations
==== 8.8.5.1-multiple-this-invocations-2 It is
a compile-time error for a constructor to indirectly
invoke itself through a series of one or more
explicit constructor invocations involving this FAILED
==== Contents of test case:
saveas T8851mti2.java {
class T8851mti2 {
T8851mti2() { this(0); }
T8851mti2(int i) { this(); }
}
}
compile T8851mti2.java
---- Result was:
PASS
---- Result should have been:
FAIL
==== 8.8.5.1-multiple-this-invocations-2 FAILED |
返回原文.
|  |
|