Hi,
Compiling this program with jikes 1.21
/*
* Test various definitions of the semi-magical 'serialPersistentFields' field.
*
* Copyright (c) 2002 Pat Tullmann
* All Rights Reserved.
*
* This file is released into the public domain.
*
* @author Pat Tullmann <pat_kaffe@tullmann.org>
*/
public class TestSerialPersistent
{
private static class Subset
{
private static final int I = 0;
}
private static class Subclass
extends Subset
{
private static final int I = 0;
}
}
results in a warning from jikes:
bash-2.05a$ jikes -cp /tmp/topic/current/jre/lib/rt.jar TestSerialPersistent.java
Issued 1 semantic warning compiling "TestSerialPersistent.java":
21. private static final int I = 0;
^
*** Semantic Warning: Field "I" shadows a field of the same name in "TestSerialPersistent$Subset".
I doubt it shadows the name of a private field :)
This comes up in the context of using serialPersistentFields , which are ocassionally useful for serialization.
cheers,
dalibor topic
Elliott, weren't you looking at the serial* magic fields?
why does MemberAccessCheck think Subset.I is accessible?