Strange, elusive bug in boolean return values with latest fetch from cvs

Tom Tromey tromey@redhat.com
Mon Jun 7 21:27:00 GMT 2004


>>>>> "Scott" == Scott Gilbertson <scottg@mantatest.com> writes:

Scott> Does anybody know of a bug injected since about mid-March which
Scott> might cause this sort of problem, or how to characterize and/or
Scott> diagnose it so I can report it properly?
Among other things, the tree-ssa branch was merged to mainline since
then. So, many things have changed.
Simplest for us would be if you made a small self-contained program
which we could run which prints a clearly incorrect result.
I tried a simple program with a recent-ish cvs head and couldn't
reproduce. This program prints "true" as expected.
public class t
{
 public boolean T = true;
 t group;
 public static final boolean isSelected (t arg)
 {
 return arg.T;
 }
 public final boolean isSelected()
 {
 return group == null ? false : group.isSelected (this);
 }
 public static void main(String[] args)
 {
 t z = new t();
 z.group = z;
 System.out.println(z.isSelected());
 }
}
Tom


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /