View | Details | Raw Unified | Return to bug 170181 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/InitializationTest.java (-16 / +56 lines)
Lines 791-807 Link Here
791
		"	      ^^^^^^^\n" + 
791
		"	      ^^^^^^^\n" + 
792
		"The blank final field a may not have been initialized\n" + 
792
		"The blank final field a may not have been initialized\n" + 
793
		"----------\n" + 
793
		"----------\n" + 
794
		"2. ERROR in CheckBlankFinals.java (at line 11)\n" + 
794
		"2. WARNING in CheckBlankFinals.java (at line 11)\n" +
795
		"	class LocA {	\n" +
796
		"	      ^^^^\n" +
797
		"The type LocA is never used locally\n" +
798
		"----------\n" +
799
		"3. ERROR in CheckBlankFinals.java (at line 11)\n" + 
795
		"	class LocA {	\n" + 
800
		"	class LocA {	\n" + 
796
		"	      ^^^^\n" + 
801
		"	      ^^^^\n" + 
797
		"The blank final field a may not have been initialized\n" + 
802
		"The blank final field a may not have been initialized\n" + 
798
		"----------\n" + 
803
		"----------\n" + 
799
		"3. WARNING in CheckBlankFinals.java (at line 12)\n" + 
804
		"4. WARNING in CheckBlankFinals.java (at line 12)\n" + 
800
		"	final int a;	//  never initialized	\n" + 
805
		"	final int a;	//  never initialized	\n" + 
801
		"	          ^\n" + 
806
		"	          ^\n" + 
802
		"The field LocA.a is never read locally\n" + 
807
		"The field LocA.a is never read locally\n" + 
803
		"----------\n" + 
808
		"----------\n" + 
804
		"4. WARNING in CheckBlankFinals.java (at line 14)\n" + 
809
		"5. WARNING in CheckBlankFinals.java (at line 13)\n" +
810
		"	class LocB {	\n" +
811
		"	      ^^^^\n" +
812
		"The type LocA.LocB is never used locally\n" +
813
		"----------\n" +
814
		"6. WARNING in CheckBlankFinals.java (at line 14)\n" + 
805
		"	final int b; 	\n" + 
815
		"	final int b; 	\n" + 
806
		"	          ^\n" + 
816
		"	          ^\n" + 
807
		"The field LocA.LocB.b is never read locally\n" + 
817
		"The field LocA.LocB.b is never read locally\n" + 
Lines 836-852 Link Here
836
			"}\n"
846
			"}\n"
837
		},
847
		},
838
		"----------\n" + 
848
		"----------\n" + 
839
		"1. ERROR in CheckBlankFinals1.java (at line 8)\n" + 
849
		"1. WARNING in CheckBlankFinals1.java (at line 8)\n" +
850
		"	class LocA {\n" +
851
		"	      ^^^^\n" +
852
		"The type LocA is never used locally\n" +
853
		"----------\n" +
854
		"2. ERROR in CheckBlankFinals1.java (at line 8)\n" + 
840
		"	class LocA {\n" + 
855
		"	class LocA {\n" + 
841
		"	      ^^^^\n" + 
856
		"	      ^^^^\n" + 
842
		"The blank final field a may not have been initialized\n" + 
857
		"The blank final field a may not have been initialized\n" + 
843
		"----------\n" + 
858
		"----------\n" + 
844
		"2. WARNING in CheckBlankFinals1.java (at line 9)\n" + 
859
		"3. WARNING in CheckBlankFinals1.java (at line 9)\n" + 
845
		"	final int a;	//  never initialized\n" + 
860
		"	final int a;	//  never initialized\n" + 
846
		"	          ^\n" + 
861
		"	          ^\n" + 
847
		"The field LocA.a is never read locally\n" + 
862
		"The field LocA.a is never read locally\n" + 
848
		"----------\n" + 
863
		"----------\n" + 
849
		"3. WARNING in CheckBlankFinals1.java (at line 11)\n" + 
864
		"4. WARNING in CheckBlankFinals1.java (at line 10)\n" +
865
		"	class LocB {\n" +
866
		"	      ^^^^\n" +
867
		"The type LocA.LocB is never used locally\n" +
868
		"----------\n" +
869
		"5. WARNING in CheckBlankFinals1.java (at line 11)\n" + 
850
		"	final int b; \n" + 
870
		"	final int b; \n" + 
851
		"	          ^\n" + 
871
		"	          ^\n" + 
852
		"The field LocA.LocB.b is never read locally\n" + 
872
		"The field LocA.LocB.b is never read locally\n" + 
Lines 874-895 Link Here
874
			"}	\n"
894
			"}	\n"
875
		},
895
		},
876
		"----------\n" + 
896
		"----------\n" + 
877
		"1. ERROR in CheckBlankFinals2.java (at line 5)\n" + 
897
		"1. WARNING in CheckBlankFinals2.java (at line 5)\n" +
898
		"	class LocA {\n" +
899
		"	      ^^^^\n" +
900
		"The type LocA is never used locally\n" +
901
		"----------\n" +
902
		"2. ERROR in CheckBlankFinals2.java (at line 5)\n" + 
878
		"	class LocA {\n" + 
903
		"	class LocA {\n" + 
879
		"	      ^^^^\n" + 
904
		"	      ^^^^\n" + 
880
		"The blank final field a may not have been initialized\n" + 
905
		"The blank final field a may not have been initialized\n" + 
881
		"----------\n" + 
906
		"----------\n" + 
882
		"2. WARNING in CheckBlankFinals2.java (at line 6)\n" + 
907
		"3. WARNING in CheckBlankFinals2.java (at line 6)\n" + 
883
		"	final int a;	//  never initialized\n" + 
908
		"	final int a;	//  never initialized\n" + 
884
		"	          ^\n" + 
909
		"	          ^\n" + 
885
		"The field LocA.a is never read locally\n" + 
910
		"The field LocA.a is never read locally\n" + 
886
		"----------\n" + 
911
		"----------\n" + 
887
		"3. ERROR in CheckBlankFinals2.java (at line 7)\n" + 
912
		"4. WARNING in CheckBlankFinals2.java (at line 7)\n" +
913
		"	class LocB {\n" +
914
		"	      ^^^^\n" +
915
		"The type LocA.LocB is never used locally\n" +
916
		"----------\n" +
917
		"5. ERROR in CheckBlankFinals2.java (at line 7)\n" + 
888
		"	class LocB {\n" + 
918
		"	class LocB {\n" + 
889
		"	      ^^^^\n" + 
919
		"	      ^^^^\n" + 
890
		"The blank final field b may not have been initialized\n" + 
920
		"The blank final field b may not have been initialized\n" + 
891
		"----------\n" + 
921
		"----------\n" + 
892
		"4. WARNING in CheckBlankFinals2.java (at line 8)\n" + 
922
		"6. WARNING in CheckBlankFinals2.java (at line 8)\n" + 
893
		"	final int b; 	// never initialized\n" + 
923
		"	final int b; 	// never initialized\n" + 
894
		"	          ^\n" + 
924
		"	          ^\n" + 
895
		"The field LocA.LocB.b is never read locally\n" + 
925
		"The field LocA.LocB.b is never read locally\n" + 
Lines 920-927 Link Here
920
		"	class MemberA {\n" + 
950
		"	class MemberA {\n" + 
921
		"	      ^^^^^^^\n" + 
951
		"	      ^^^^^^^\n" + 
922
		"The blank final field a may not have been initialized\n" + 
952
		"The blank final field a may not have been initialized\n" + 
923
		"----------\n" + 
953
		"----------\n" +
924
		"2. WARNING in CheckBlankFinals3.java (at line 6)\n" + 
954
		"2. WARNING in CheckBlankFinals3.java (at line 5)\n" +
955
		"	class MemberB {\n" +
956
		"	      ^^^^^^^\n" +
957
		"The type MemberB is never used locally\n" +
958
		"----------\n" +
959
		"3. WARNING in CheckBlankFinals3.java (at line 6)\n" + 
925
		"	final int b; \n" + 
960
		"	final int b; \n" + 
926
		"	          ^\n" + 
961
		"	          ^\n" + 
927
		"The field MemberB.b is never read locally\n" + 
962
		"The field MemberB.b is never read locally\n" + 
Lines 1101-1118 Link Here
1101
		"	void g() {\n" + 
1136
		"	void g() {\n" + 
1102
		"	     ^^^\n" + 
1137
		"	     ^^^\n" + 
1103
		"The method g() from the type Local is never used locally\n" + 
1138
		"The method g() from the type Local is never used locally\n" + 
1104
		"----------\n" + 
1139
		"----------\n" +
1105
		"2. WARNING in Outer12.java (at line 8)\n" + 
1140
		"2. WARNING in Outer12.java (at line 7)\n" +
1141
		"	class Local2 {\n" +
1142
		"	      ^^^^^^\n" +
1143
		"The type Local2 is never used locally\n" +
1144
		"----------\n" +
1145
		"3. WARNING in Outer12.java (at line 8)\n" + 
1106
		"	int n = count + count; // another compiler rejects\n" + 
1146
		"	int n = count + count; // another compiler rejects\n" + 
1107
		"	    ^\n" + 
1147
		"	    ^\n" + 
1108
		"The field Local2.n is never read locally\n" + 
1148
		"The field Local2.n is never read locally\n" + 
1109
		"----------\n" + 
1149
		"----------\n" + 
1110
		"3. ERROR in Outer12.java (at line 8)\n" + 
1150
		"4. ERROR in Outer12.java (at line 8)\n" + 
1111
		"	int n = count + count; // another compiler rejects\n" + 
1151
		"	int n = count + count; // another compiler rejects\n" + 
1112
		"	        ^^^^^\n" + 
1152
		"	        ^^^^^\n" + 
1113
		"The local variable count may not have been initialized\n" + 
1153
		"The local variable count may not have been initialized\n" + 
1114
		"----------\n" + 
1154
		"----------\n" + 
1115
		"4. ERROR in Outer12.java (at line 8)\n" + 
1155
		"5. ERROR in Outer12.java (at line 8)\n" + 
1116
		"	int n = count + count; // another compiler rejects\n" + 
1156
		"	int n = count + count; // another compiler rejects\n" + 
1117
		"	                ^^^^^\n" + 
1157
		"	                ^^^^^\n" + 
1118
		"The local variable count may not have been initialized\n" + 
1158
		"The local variable count may not have been initialized\n" + 
(-)Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/FromJikesPRs.java (-1 / +6 lines)
Lines 271-277 Link Here
271
			"}\n"
271
			"}\n"
272
		},
272
		},
273
		"----------\n" + 
273
		"----------\n" + 
274
		"1. ERROR in Outer.java (at line 5)\n" + 
274
		"1. WARNING in Outer.java (at line 5)\n" +
275
		"	class Local extends Inner {\n" +
276
		"	      ^^^^^\n" +
277
		"The type Local is never used locally\n" +
278
		"----------\n" +
279
		"2. ERROR in Outer.java (at line 5)\n" + 
275
		"	class Local extends Inner {\n" + 
280
		"	class Local extends Inner {\n" + 
276
		"	      ^^^^^\n" + 
281
		"	      ^^^^^\n" + 
277
		"No enclosing instance of type Outer is accessible to invoke the super constructor. Must define a constructor and explicitly qualify its super constructor invocation with an instance of Outer (e.g. x.super() where x is an instance of Outer).\n" + 
282
		"No enclosing instance of type Outer is accessible to invoke the super constructor. Must define a constructor and explicitly qualify its super constructor invocation with an instance of Outer (e.g. x.super() where x is an instance of Outer).\n" + 
(-)Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/NegativeTest.java (-46 / +354 lines)
Lines 3109-3130 Link Here
3109
		"	      ^^^^^^^\n" + 
3109
		"	      ^^^^^^^\n" + 
3110
		"The blank final field a may not have been initialized\n" + 
3110
		"The blank final field a may not have been initialized\n" + 
3111
		"----------\n" + 
3111
		"----------\n" + 
3112
		"2. ERROR in p\\CheckBlankFinals.java (at line 13)\n" + 
3112
		"2. WARNING in p\\CheckBlankFinals.java (at line 13)\n" +
3113
		"	class LocA {\n" +
3114
		"	      ^^^^\n" +
3115
		"The type LocA is never used locally\n" +
3116
		"----------\n" +
3117
		"3. ERROR in p\\CheckBlankFinals.java (at line 13)\n" + 
3113
		"	class LocA {\n" + 
3118
		"	class LocA {\n" + 
3114
		"	      ^^^^\n" + 
3119
		"	      ^^^^\n" + 
3115
		"The blank final field a may not have been initialized\n" + 
3120
		"The blank final field a may not have been initialized\n" + 
3116
		"----------\n" + 
3121
		"----------\n" + 
3117
		"3. WARNING in p\\CheckBlankFinals.java (at line 14)\n" + 
3122
		"4. WARNING in p\\CheckBlankFinals.java (at line 14)\n" + 
3118
		"	final int a;  //  never initialized\n" + 
3123
		"	final int a;  //  never initialized\n" + 
3119
		"	          ^\n" + 
3124
		"	          ^\n" + 
3120
		"The field LocA.a is never read locally\n" + 
3125
		"The field LocA.a is never read locally\n" + 
3121
		"----------\n" + 
3126
		"----------\n" + 
3122
		"4. ERROR in p\\CheckBlankFinals.java (at line 15)\n" + 
3127
		"5. WARNING in p\\CheckBlankFinals.java (at line 15)\n" +
3128
		"	class LocB {\n" +
3129
		"	      ^^^^\n" +
3130
		"The type LocA.LocB is never used locally\n" +
3131
		"----------\n" +
3132
		"6. ERROR in p\\CheckBlankFinals.java (at line 15)\n" + 
3123
		"	class LocB {\n" + 
3133
		"	class LocB {\n" + 
3124
		"	      ^^^^\n" + 
3134
		"	      ^^^^\n" + 
3125
		"The blank final field b may not have been initialized\n" + 
3135
		"The blank final field b may not have been initialized\n" + 
3126
		"----------\n" + 
3136
		"----------\n" + 
3127
		"5. WARNING in p\\CheckBlankFinals.java (at line 16)\n" + 
3137
		"7. WARNING in p\\CheckBlankFinals.java (at line 16)\n" + 
3128
		"	final int b; \n" + 
3138
		"	final int b; \n" + 
3129
		"	          ^\n" + 
3139
		"	          ^\n" + 
3130
		"The field LocA.LocB.b is never read locally\n" + 
3140
		"The field LocA.LocB.b is never read locally\n" + 
Lines 3840-3854 Link Here
3840
		"	                       ^^^^^^^^^^^\n" + 
3850
		"	                       ^^^^^^^^^^^\n" + 
3841
		"SuperLokcal cannot be resolved to a type\n" + 
3851
		"SuperLokcal cannot be resolved to a type\n" + 
3842
		"----------\n" + 
3852
		"----------\n" + 
3843
		"3. WARNING in p\\TheSub.java (at line 16)\n" + 
3853
		"3. WARNING in p\\TheSub.java (at line 12)\n" +
3854
		"	class SubLocal extends MidLocal {}\n" +
3855
		"	      ^^^^^^^^\n" +
3856
		"The type SubLocal is never used locally\n" +
3857
		"----------\n" +
3858
		"4. WARNING in p\\TheSub.java (at line 16)\n" + 
3844
		"	int y = x;  }\n" + 
3859
		"	int y = x;  }\n" + 
3845
		"	    ^\n" + 
3860
		"	    ^\n" + 
3846
		"The field SuperLocal.y is never read locally\n" + 
3861
		"The field SuperLocal.y is never read locally\n" + 
3847
		"----------\n" + 
3862
		"----------\n" + 
3848
		"4. WARNING in p\\TheSub.java (at line 22)\n" + 
3863
		"5. WARNING in p\\TheSub.java (at line 18)\n" +
3864
		"	class SubLocal extends MidLocal {}\n" +
3865
		"	      ^^^^^^^^\n" +
3866
		"The type SubLocal is never used locally\n" +
3867
		"----------\n" +
3868
		"6. WARNING in p\\TheSub.java (at line 22)\n" + 
3849
		"	Object o = TheSub.this; }\n" + 
3869
		"	Object o = TheSub.this; }\n" + 
3850
		"	       ^\n" + 
3870
		"	       ^\n" + 
3851
		"The field SuperLocal.o is never read locally\n" + 
3871
		"The field SuperLocal.o is never read locally\n" + 
3872
		"----------\n" +
3873
		"7. WARNING in p\\TheSub.java (at line 24)\n" +
3874
		"	class SubLocal extends MidLocal {}\n" +
3875
		"	      ^^^^^^^^\n" +
3876
		"The type SubLocal is never used locally\n" +
3877
		"----------\n" +
3878
		"8. WARNING in p\\TheSub.java (at line 29)\n" +
3879
		"	class SubLocal extends MidLocal {}\n" +
3880
		"	      ^^^^^^^^\n" +
3881
		"The type SubLocal is never used locally\n" +
3852
		"----------\n"
3882
		"----------\n"
3853
	);
3883
	);
3854
}
3884
}
Lines 3880-3896 Link Here
3880
			"}",
3910
			"}",
3881
		}, 
3911
		}, 
3882
		"----------\n" + 
3912
		"----------\n" + 
3883
		"1. ERROR in p\\CheckBlankFinals1.java (at line 11)\n" + 
3913
		"1. WARNING in p\\CheckBlankFinals1.java (at line 11)\n" +
3914
		"	class LocA {\n" +
3915
		"	      ^^^^\n" +
3916
		"The type LocA is never used locally\n" +
3917
		"----------\n" +
3918
		"2. ERROR in p\\CheckBlankFinals1.java (at line 11)\n" + 
3884
		"	class LocA {\n" + 
3919
		"	class LocA {\n" + 
3885
		"	      ^^^^\n" + 
3920
		"	      ^^^^\n" + 
3886
		"The blank final field a may not have been initialized\n" + 
3921
		"The blank final field a may not have been initialized\n" + 
3887
		"----------\n" + 
3922
		"----------\n" + 
3888
		"2. WARNING in p\\CheckBlankFinals1.java (at line 12)\n" + 
3923
		"3. WARNING in p\\CheckBlankFinals1.java (at line 12)\n" + 
3889
		"	final int a;  //  never initialized\n" + 
3924
		"	final int a;  //  never initialized\n" + 
3890
		"	          ^\n" + 
3925
		"	          ^\n" + 
3891
		"The field LocA.a is never read locally\n" + 
3926
		"The field LocA.a is never read locally\n" + 
3892
		"----------\n" + 
3927
		"----------\n" + 
3893
		"3. WARNING in p\\CheckBlankFinals1.java (at line 14)\n" + 
3928
		"4. WARNING in p\\CheckBlankFinals1.java (at line 13)\n" +
3929
		"	class LocB {\n" +
3930
		"	      ^^^^\n" +
3931
		"The type LocA.LocB is never used locally\n" +
3932
		"----------\n" +
3933
		"5. WARNING in p\\CheckBlankFinals1.java (at line 14)\n" + 
3894
		"	final int b; \n" + 
3934
		"	final int b; \n" + 
3895
		"	          ^\n" + 
3935
		"	          ^\n" + 
3896
		"The field LocA.LocB.b is never read locally\n" + 
3936
		"The field LocA.LocB.b is never read locally\n" + 
Lines 3914-3936 Link Here
3914
			"  }    \n" + 
3954
			"  }    \n" + 
3915
			"}  ",
3955
			"}  ",
3916
		}, 
3956
		}, 
3917
		"----------\n" + 
3957
		"----------\n" +
3918
		"1. ERROR in p\\CheckBlankFinals2.java (at line 6)\n" + 
3958
		"1. WARNING in p\\CheckBlankFinals2.java (at line 6)\n" +
3959
		"	class LocA {\n" +
3960
		"	      ^^^^\n" +
3961
		"The type LocA is never used locally\n" +
3962
		"----------\n" +
3963
		"2. ERROR in p\\CheckBlankFinals2.java (at line 6)\n" + 
3919
		"	class LocA {\n" + 
3964
		"	class LocA {\n" + 
3920
		"	      ^^^^\n" + 
3965
		"	      ^^^^\n" + 
3921
		"The blank final field a may not have been initialized\n" + 
3966
		"The blank final field a may not have been initialized\n" + 
3922
		"----------\n" + 
3967
		"----------\n" + 
3923
		"2. WARNING in p\\CheckBlankFinals2.java (at line 7)\n" + 
3968
		"3. WARNING in p\\CheckBlankFinals2.java (at line 7)\n" + 
3924
		"	final int a;  //  never initialized\n" + 
3969
		"	final int a;  //  never initialized\n" + 
3925
		"	          ^\n" + 
3970
		"	          ^\n" + 
3926
		"The field LocA.a is never read locally\n" + 
3971
		"The field LocA.a is never read locally\n" + 
3927
		"----------\n" + 
3972
		"----------\n" + 
3928
		"3. ERROR in p\\CheckBlankFinals2.java (at line 8)\n" + 
3973
		"4. WARNING in p\\CheckBlankFinals2.java (at line 8)\n" +
3974
		"	class LocB {\n" +
3975
		"	      ^^^^\n" +
3976
		"The type LocA.LocB is never used locally\n" +
3977
		"----------\n" +
3978
		"5. ERROR in p\\CheckBlankFinals2.java (at line 8)\n" + 
3929
		"	class LocB {\n" + 
3979
		"	class LocB {\n" + 
3930
		"	      ^^^^\n" + 
3980
		"	      ^^^^\n" + 
3931
		"The blank final field b may not have been initialized\n" + 
3981
		"The blank final field b may not have been initialized\n" + 
3932
		"----------\n" + 
3982
		"----------\n" + 
3933
		"4. WARNING in p\\CheckBlankFinals2.java (at line 9)\n" + 
3983
		"6. WARNING in p\\CheckBlankFinals2.java (at line 9)\n" + 
3934
		"	final int b;   // never initialized\n" + 
3984
		"	final int b;   // never initialized\n" + 
3935
		"	          ^\n" + 
3985
		"	          ^\n" + 
3936
		"The field LocA.LocB.b is never read locally\n" + 
3986
		"The field LocA.LocB.b is never read locally\n" + 
Lines 3960-3966 Link Here
3960
		"	      ^^^^^^^\n" + 
4010
		"	      ^^^^^^^\n" + 
3961
		"The blank final field a may not have been initialized\n" + 
4011
		"The blank final field a may not have been initialized\n" + 
3962
		"----------\n" + 
4012
		"----------\n" + 
3963
		"2. WARNING in p\\CheckBlankFinals3.java (at line 7)\n" + 
4013
		"2. WARNING in p\\CheckBlankFinals3.java (at line 6)\n" +
4014
		"	class MemberB {\n" +
4015
		"	      ^^^^^^^\n" +
4016
		"The type MemberB is never used locally\n" +
4017
		"----------\n" +
4018
		"3. WARNING in p\\CheckBlankFinals3.java (at line 7)\n" + 
3964
		"	final int b; \n" + 
4019
		"	final int b; \n" + 
3965
		"	          ^\n" + 
4020
		"	          ^\n" + 
3966
		"The field MemberB.b is never read locally\n" + 
4021
		"The field MemberB.b is never read locally\n" + 
Lines 4383-4399 Link Here
4383
		"	     ^^^\n" + 
4438
		"	     ^^^\n" + 
4384
		"The method g() from the type Local is never used locally\n" + 
4439
		"The method g() from the type Local is never used locally\n" + 
4385
		"----------\n" + 
4440
		"----------\n" + 
4386
		"2. WARNING in p\\Outer12.java (at line 9)\n" + 
4441
		"2. WARNING in p\\Outer12.java (at line 8)\n" +
4442
		"	class Local2 {\n" +
4443
		"	      ^^^^^^\n" +
4444
		"The type Local2 is never used locally\n" +
4445
		"----------\n" +
4446
		"3. WARNING in p\\Outer12.java (at line 9)\n" + 
4387
		"	int n = count + count; // another compiler rejects\n" + 
4447
		"	int n = count + count; // another compiler rejects\n" + 
4388
		"	    ^\n" + 
4448
		"	    ^\n" + 
4389
		"The field Local2.n is never read locally\n" + 
4449
		"The field Local2.n is never read locally\n" + 
4390
		"----------\n" + 
4450
		"----------\n" + 
4391
		"3. ERROR in p\\Outer12.java (at line 9)\n" + 
4451
		"4. ERROR in p\\Outer12.java (at line 9)\n" + 
4392
		"	int n = count + count; // another compiler rejects\n" + 
4452
		"	int n = count + count; // another compiler rejects\n" + 
4393
		"	        ^^^^^\n" + 
4453
		"	        ^^^^^\n" + 
4394
		"The local variable count may not have been initialized\n" + 
4454
		"The local variable count may not have been initialized\n" + 
4395
		"----------\n" + 
4455
		"----------\n" + 
4396
		"4. ERROR in p\\Outer12.java (at line 9)\n" + 
4456
		"5. ERROR in p\\Outer12.java (at line 9)\n" + 
4397
		"	int n = count + count; // another compiler rejects\n" + 
4457
		"	int n = count + count; // another compiler rejects\n" + 
4398
		"	                ^^^^^\n" + 
4458
		"	                ^^^^^\n" + 
4399
		"The local variable count may not have been initialized\n" + 
4459
		"The local variable count may not have been initialized\n" + 
Lines 5793-5809 Link Here
5793
		"	       ^\n" + 
5853
		"	       ^\n" + 
5794
		"Cannot define static initializer in inner type B\n" + 
5854
		"Cannot define static initializer in inner type B\n" + 
5795
		"----------\n" + 
5855
		"----------\n" + 
5796
		"2. WARNING in p\\A11.java (at line 11)\n" + 
5856
		"2. WARNING in p\\A11.java (at line 10)\n" +
5857
		"	class A {\n" +
5858
		"	      ^\n" +
5859
		"The type A is never used locally\n" +
5860
		"----------\n" +
5861
		"3. WARNING in p\\A11.java (at line 11)\n" + 
5797
		"	void f()\n" + 
5862
		"	void f()\n" + 
5798
		"	     ^^^\n" + 
5863
		"	     ^^^\n" + 
5799
		"The method f() from the type A is never used locally\n" + 
5864
		"The method f() from the type A is never used locally\n" + 
5800
		"----------\n" + 
5865
		"----------\n" + 
5801
		"3. ERROR in p\\A11.java (at line 13)\n" + 
5866
		"4. ERROR in p\\A11.java (at line 13)\n" + 
5802
		"	b=3; // B has not been definitely assigned!\n" + 
5867
		"	b=3; // B has not been definitely assigned!\n" + 
5803
		"	^\n" + 
5868
		"	^\n" + 
5804
		"The final local variable b cannot be assigned, since it is defined in an enclosing type\n" + 
5869
		"The final local variable b cannot be assigned, since it is defined in an enclosing type\n" + 
5805
		"----------\n" + 
5870
		"----------\n" + 
5806
		"4. ERROR in p\\A11.java (at line 17)\n" + 
5871
		"5. ERROR in p\\A11.java (at line 17)\n" + 
5807
		"	System.out.println(b);\n" + 
5872
		"	System.out.println(b);\n" + 
5808
		"	                   ^\n" + 
5873
		"	                   ^\n" + 
5809
		"The local variable b may not have been initialized\n" + 
5874
		"The local variable b may not have been initialized\n" + 
Lines 6502-6513 Link Here
6502
			"}",
6567
			"}",
6503
		}, 
6568
		}, 
6504
		"----------\n" + 
6569
		"----------\n" + 
6505
		"1. WARNING in p\\ASB.java (at line 9)\n" + 
6570
		"1. WARNING in p\\ASB.java (at line 8)\n" +
6571
		"	class L {\n" +
6572
		"	      ^\n" +
6573
		"The type L is never used locally\n" +
6574
		"----------\n" +
6575
		"2. WARNING in p\\ASB.java (at line 9)\n" + 
6506
		"	int l = ASB.this.x;  // no enclosing instance of type X is available\n" + 
6576
		"	int l = ASB.this.x;  // no enclosing instance of type X is available\n" + 
6507
		"	    ^\n" + 
6577
		"	    ^\n" + 
6508
		"The field L.l is never read locally\n" + 
6578
		"The field L.l is never read locally\n" + 
6509
		"----------\n" + 
6579
		"----------\n" + 
6510
		"2. ERROR in p\\ASB.java (at line 9)\n" + 
6580
		"3. ERROR in p\\ASB.java (at line 9)\n" + 
6511
		"	int l = ASB.this.x;  // no enclosing instance of type X is available\n" + 
6581
		"	int l = ASB.this.x;  // no enclosing instance of type X is available\n" + 
6512
		"	        ^^^^^^^^\n" + 
6582
		"	        ^^^^^^^^\n" + 
6513
		"No enclosing instance of the type ASB is accessible in scope\n" + 
6583
		"No enclosing instance of the type ASB is accessible in scope\n" + 
Lines 8912-8918 Link Here
8912
		"	             ^\n" + 
8982
		"	             ^\n" + 
8913
		"X cannot be resolved to a type\n" + 
8983
		"X cannot be resolved to a type\n" + 
8914
		"----------\n" + 
8984
		"----------\n" + 
8915
		"9. WARNING in p\\h\\X1.java (at line 30)\n" + 
8985
		"9. WARNING in p\\h\\X1.java (at line 29)\n" +
8986
		"	class Local {\n" +
8987
		"	      ^^^^^\n" +
8988
		"The type Local is never used locally\n" +
8989
		"----------\n" +
8990
		"10. WARNING in p\\h\\X1.java (at line 30)\n" + 
8916
		"	void foo() {\n" + 
8991
		"	void foo() {\n" + 
8917
		"	     ^^^^^\n" + 
8992
		"	     ^^^^^\n" + 
8918
		"The method foo() from the type Local is never used locally\n" + 
8993
		"The method foo() from the type Local is never used locally\n" + 
Lines 9227-9249 Link Here
9227
		"	Object myself() {\n" + 
9302
		"	Object myself() {\n" + 
9228
		"	       ^^^^^^^^\n" + 
9303
		"	       ^^^^^^^^\n" + 
9229
		"The method myself() from the type new Object(){} is never used locally\n" + 
9304
		"The method myself() from the type new Object(){} is never used locally\n" + 
9230
		"----------\n" + 
9305
		"----------\n" +
9231
		"7. WARNING in p\\d\\JE_5_AWT.java (at line 44)\n" + 
9306
		"7. WARNING in p\\d\\JE_5_AWT.java (at line 43)\n" +
9307
		"	class Local {\n" +
9308
		"	      ^^^^^\n" +
9309
		"The type Local is never used locally\n" +
9310
		"----------\n" +
9311
		"8. WARNING in p\\d\\JE_5_AWT.java (at line 44)\n" + 
9232
		"	JE_5_AWT obj = JE_5_AWT.this;\n" + 
9312
		"	JE_5_AWT obj = JE_5_AWT.this;\n" + 
9233
		"	         ^^^\n" + 
9313
		"	         ^^^\n" + 
9234
		"The field Local.obj is never read locally\n" + 
9314
		"The field Local.obj is never read locally\n" + 
9235
		"----------\n" + 
9315
		"----------\n" + 
9236
		"8. WARNING in p\\d\\JE_5_AWT.java (at line 49)\n" + 
9316
		"9. WARNING in p\\d\\JE_5_AWT.java (at line 49)\n" + 
9237
		"	Object outer() {\n" + 
9317
		"	Object outer() {\n" + 
9238
		"	       ^^^^^^^\n" + 
9318
		"	       ^^^^^^^\n" + 
9239
		"The method outer() from the type new Object(){} is never used locally\n" + 
9319
		"The method outer() from the type new Object(){} is never used locally\n" + 
9240
		"----------\n" + 
9320
		"----------\n" + 
9241
		"9. ERROR in p\\d\\JE_5_AWT.java (at line 50)\n" + 
9321
		"10. ERROR in p\\d\\JE_5_AWT.java (at line 50)\n" + 
9242
		"	return JE_5_AWT.this; //<---- KO\n" + 
9322
		"	return JE_5_AWT.this; //<---- KO\n" + 
9243
		"	       ^^^^^^^^^^^^^\n" + 
9323
		"	       ^^^^^^^^^^^^^\n" + 
9244
		"No enclosing instance of the type JE_5_AWT is accessible in scope\n" + 
9324
		"No enclosing instance of the type JE_5_AWT is accessible in scope\n" + 
9245
		"----------\n" + 
9325
		"----------\n" + 
9246
		"10. WARNING in p\\d\\JE_5_AWT.java (at line 56)\n" + 
9326
		"11. WARNING in p\\d\\JE_5_AWT.java (at line 55)\n" + 
9327
		"	class Local extends Thread {\n" + 
9328
		"	      ^^^^^\n" + 
9329
		"The type Local is never used locally\n" + 
9330
		"----------\n" + 
9331
		"12. WARNING in p\\d\\JE_5_AWT.java (at line 56)\n" + 
9247
		"	Local() {\n" + 
9332
		"	Local() {\n" + 
9248
		"	^^^^^^^\n" + 
9333
		"	^^^^^^^\n" + 
9249
		"The constructor Local() is never used locally\n" + 
9334
		"The constructor Local() is never used locally\n" + 
Lines 10217-10248 Link Here
10217
			"}	\n"
10302
			"}	\n"
10218
		},
10303
		},
10219
		"----------\n" + 
10304
		"----------\n" + 
10220
		"1. WARNING in p1\\X.java (at line 8)\n" + 
10305
		"1. WARNING in p1\\X.java (at line 5)\n" +
10306
		"	class Local extends C {	\n" +
10307
		"	      ^^^^^\n" +
10308
		"The type Local is never used locally\n" +
10309
		"----------\n" +
10310
		"2. WARNING in p1\\X.java (at line 8)\n" + 
10221
		"	public final int CST2 = 12;	\n" + 
10311
		"	public final int CST2 = 12;	\n" + 
10222
		"	                 ^^^^\n" + 
10312
		"	                 ^^^^\n" + 
10223
		"The field Local.CST2 is hiding a field from type C\n" + 
10313
		"The field Local.CST2 is hiding a field from type C\n" + 
10224
		"----------\n" + 
10314
		"----------\n" + 
10225
		"2. WARNING in p1\\X.java (at line 8)\n" + 
10315
		"3. WARNING in p1\\X.java (at line 8)\n" + 
10226
		"	public final int CST2 = 12;	\n" + 
10316
		"	public final int CST2 = 12;	\n" + 
10227
		"	                 ^^^^\n" + 
10317
		"	                 ^^^^\n" + 
10228
		"The field Local.CST2 is never read locally\n" + 
10318
		"The field Local.CST2 is never read locally\n" + 
10229
		"----------\n" + 
10319
		"----------\n" + 
10230
		"3. WARNING in p1\\X.java (at line 9)\n" + 
10320
		"4. WARNING in p1\\X.java (at line 9)\n" + 
10231
		"	void foo(int i){	\n" + 
10321
		"	void foo(int i){	\n" + 
10232
		"	     ^^^^^^^^^^\n" + 
10322
		"	     ^^^^^^^^^^\n" + 
10233
		"The method foo(int) from the type Local is never used locally\n" + 
10323
		"The method foo(int) from the type Local is never used locally\n" + 
10234
		"----------\n" + 
10324
		"----------\n" + 
10235
		"4. ERROR in p1\\X.java (at line 11)\n" + 
10325
		"5. ERROR in p1\\X.java (at line 11)\n" + 
10236
		"	case this.CST : 	\n" + 
10326
		"	case this.CST : 	\n" + 
10237
		"	     ^^^^^^^^\n" + 
10327
		"	     ^^^^^^^^\n" + 
10238
		"case expressions must be constant expressions\n" + 
10328
		"case expressions must be constant expressions\n" + 
10239
		"----------\n" + 
10329
		"----------\n" + 
10240
		"5. ERROR in p1\\X.java (at line 15)\n" + 
10330
		"6. ERROR in p1\\X.java (at line 15)\n" + 
10241
		"	case super.CST2 : 	\n" + 
10331
		"	case super.CST2 : 	\n" + 
10242
		"	     ^^^^^^^^^^\n" + 
10332
		"	     ^^^^^^^^^^\n" + 
10243
		"case expressions must be constant expressions\n" + 
10333
		"case expressions must be constant expressions\n" + 
10244
		"----------\n" + 
10334
		"----------\n" + 
10245
		"6. ERROR in p1\\X.java (at line 17)\n" + 
10335
		"7. ERROR in p1\\X.java (at line 17)\n" + 
10246
		"	case X.this.CST3 : 	\n" + 
10336
		"	case X.this.CST3 : 	\n" + 
10247
		"	     ^^^^^^^^^^^\n" + 
10337
		"	     ^^^^^^^^^^^\n" + 
10248
		"case expressions must be constant expressions\n" + 
10338
		"case expressions must be constant expressions\n" + 
Lines 13352-13358 Link Here
13352
		"	     ^\n" + 
13442
		"	     ^\n" + 
13353
		"Unnecessary semicolon\n" + 
13443
		"Unnecessary semicolon\n" + 
13354
		"----------\n" + 
13444
		"----------\n" + 
13355
		"11. WARNING in p\\X.java (at line 13)\n" + 
13445
		"11. WARNING in p\\X.java (at line 13)\n" +
13446
		"	class Object { };	\n" +
13447
		"	      ^^^^^^\n" +
13448
		"The type Object is never used locally\n" +
13449
		"----------\n" +
13450
		"12. WARNING in p\\X.java (at line 13)\n" + 
13356
		"	class Object { };	\n" + 
13451
		"	class Object { };	\n" + 
13357
		"	                ^\n" + 
13452
		"	                ^\n" + 
13358
		"Unnecessary semicolon\n" + 
13453
		"Unnecessary semicolon\n" + 
Lines 13410-13426 Link Here
13410
		"	^\n" + 
13505
		"	^\n" + 
13411
		"Unnecessary semicolon\n" + 
13506
		"Unnecessary semicolon\n" + 
13412
		"----------\n" + 
13507
		"----------\n" + 
13413
		"6. WARNING in X.java (at line 10)\n" + 
13508
		"6. WARNING in X.java (at line 9)\n" +
13509
		"	class L {\n" +
13510
		"	      ^\n" +
13511
		"The type L is never used locally\n" +
13512
		"----------\n" +
13513
		"7. WARNING in X.java (at line 10)\n" + 
13414
		"	};//6\n" + 
13514
		"	};//6\n" + 
13415
		"	 ^\n" + 
13515
		"	 ^\n" + 
13416
		"Unnecessary semicolon\n" + 
13516
		"Unnecessary semicolon\n" + 
13417
		"----------\n" + 
13517
		"----------\n" + 
13418
		"7. WARNING in X.java (at line 11)\n" + 
13518
		"8. WARNING in X.java (at line 11)\n" + 
13419
		"	};//7\n" + 
13519
		"	};//7\n" + 
13420
		"	 ^\n" + 
13520
		"	 ^\n" + 
13421
		"Unnecessary semicolon\n" + 
13521
		"Unnecessary semicolon\n" + 
13422
		"----------\n" + 
13522
		"----------\n" + 
13423
		"8. WARNING in X.java (at line 12)\n" + 
13523
		"9. WARNING in X.java (at line 12)\n" + 
13424
		"	};//8\n" + 
13524
		"	};//8\n" + 
13425
		"	 ^\n" + 
13525
		"	 ^\n" + 
13426
		"Unnecessary semicolon\n" + 
13526
		"Unnecessary semicolon\n" + 
Lines 15873-15905 Link Here
15873
		"	void foo1() {}\n" + 
15973
		"	void foo1() {}\n" + 
15874
		"	     ^^^^^^\n" + 
15974
		"	     ^^^^^^\n" + 
15875
		"The method foo1() from the type new Object(){} is never used locally\n" + 
15975
		"The method foo1() from the type new Object(){} is never used locally\n" + 
15876
		"----------\n" + 
15976
		"----------\n" +
15877
		"3. WARNING in X.java (at line 10)\n" + 
15977
		"3. WARNING in X.java (at line 8)\n" +
15978
		"	class Local {\n" +
15979
		"	      ^^^^^\n" +
15980
		"The type Local is never used locally\n" +
15981
		"----------\n" +
15982
		"4. WARNING in X.java (at line 9)\n" +
15983
		"	class LMember implements Runnable {\n" +
15984
		"	      ^^^^^^^\n" +
15985
		"The type Local.LMember is never used locally\n" +
15986
		"----------\n" +
15987
		"5. WARNING in X.java (at line 10)\n" + 
15878
		"	LMember(int i) {}\n" + 
15988
		"	LMember(int i) {}\n" + 
15879
		"	^^^^^^^^^^^^^^\n" + 
15989
		"	^^^^^^^^^^^^^^\n" + 
15880
		"The constructor Local.LMember(int) is never used locally\n" + 
15990
		"The constructor Local.LMember(int) is never used locally\n" + 
15881
		"----------\n" + 
15991
		"----------\n" + 
15882
		"4. WARNING in X.java (at line 11)\n" + 
15992
		"6. WARNING in X.java (at line 11)\n" + 
15883
		"	int unused2;\n" + 
15993
		"	int unused2;\n" + 
15884
		"	    ^^^^^^^\n" + 
15994
		"	    ^^^^^^^\n" + 
15885
		"The field Local.LMember.unused2 is never read locally\n" + 
15995
		"The field Local.LMember.unused2 is never read locally\n" + 
15886
		"----------\n" + 
15996
		"----------\n" + 
15887
		"5. WARNING in X.java (at line 12)\n" + 
15997
		"7. WARNING in X.java (at line 12)\n" + 
15888
		"	void foo2() {}\n" + 
15998
		"	void foo2() {}\n" + 
15889
		"	     ^^^^^^\n" + 
15999
		"	     ^^^^^^\n" + 
15890
		"The method foo2() from the type Local.LMember is never used locally\n" + 
16000
		"The method foo2() from the type Local.LMember is never used locally\n" + 
15891
		"----------\n" + 
16001
		"----------\n" + 
15892
		"6. WARNING in X.java (at line 15)\n" + 
16002
		"8. WARNING in X.java (at line 15)\n" + 
15893
		"	Local(int i) {}\n" + 
16003
		"	Local(int i) {}\n" + 
15894
		"	^^^^^^^^^^^^\n" + 
16004
		"	^^^^^^^^^^^^\n" + 
15895
		"The constructor Local(int) is never used locally\n" + 
16005
		"The constructor Local(int) is never used locally\n" + 
15896
		"----------\n" + 
16006
		"----------\n" + 
15897
		"7. WARNING in X.java (at line 16)\n" + 
16007
		"9. WARNING in X.java (at line 16)\n" + 
15898
		"	int unused3;\n" + 
16008
		"	int unused3;\n" + 
15899
		"	    ^^^^^^^\n" + 
16009
		"	    ^^^^^^^\n" + 
15900
		"The field Local.unused3 is never read locally\n" + 
16010
		"The field Local.unused3 is never read locally\n" + 
15901
		"----------\n" + 
16011
		"----------\n" + 
15902
		"8. WARNING in X.java (at line 17)\n" + 
16012
		"10. WARNING in X.java (at line 17)\n" + 
15903
		"	void foo3() {}\n" + 
16013
		"	void foo3() {}\n" + 
15904
		"	     ^^^^^^\n" + 
16014
		"	     ^^^^^^\n" + 
15905
		"The method foo3() from the type Local is never used locally\n" + 
16015
		"The method foo3() from the type Local is never used locally\n" + 
Lines 15926-15930 Link Here
15926
		"	^^^^^^^^^^^^\n" + 
16036
		"	^^^^^^^^^^^^\n" + 
15927
		"The label label2 is missing\n" + 
16037
		"The label label2 is missing\n" + 
15928
		"----------\n");
16038
		"----------\n");
16039
}
16040
16041
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=170181
16042
public void test442() {
16043
	this.runNegativeTest(
16044
		new String[] {
16045
			"X.java",
16046
			"public class X {\n" + 
16047
			"	private class M { \n" +
16048
			"		private class Member1 {} \n" +
16049
			"		private class Member2 extends M { \n" +
16050
			"		}\n" +
16051
			"	}\n" +
16052
			"	public static void main(String[] args) {\n" +
16053
			"		class Local1 {} \n" +
16054
			"		class Local2 { \n" +
16055
			"    		class LMember1 {} \n" +
16056
			"    		class LMember2 extends Local2 { \n" +
16057
			"    		}\n" +
16058
			"   		LMember1 m1;\n" +
16059
			"		}\n" +
16060
			"		int i = 0;\n" +
16061
			"	}\n" +
16062
			"} \n" 
16063
		}, 
16064
		"----------\n" +
16065
		"1. WARNING in X.java (at line 2)\n" +
16066
		"	private class M { \n" +
16067
		"	              ^\n" +
16068
		"The type X.M is never used locally\n" +
16069
		"----------\n" +
16070
		"2. WARNING in X.java (at line 3)\n" +
16071
		"	private class Member1 {} \n" +
16072
		"	              ^^^^^^^\n" +
16073
		"The type X.M.Member1 is never used locally\n" +
16074
		"----------\n" +
16075
		"3. WARNING in X.java (at line 4)\n" +
16076
		"	private class Member2 extends M { \n" +
16077
		"	              ^^^^^^^\n" +
16078
		"The type X.M.Member2 is never used locally\n" +
16079
		"----------\n" +
16080
		"4. WARNING in X.java (at line 4)\n" +
16081
		"	private class Member2 extends M { \n" +
16082
		"	              ^^^^^^^\n" +
16083
		"Access to enclosing constructor X.M() is emulated by a synthetic accessor method. Increasing its visibility will improve your performance\n" +
16084
		"----------\n" +
16085
		"5. WARNING in X.java (at line 8)\n" +
16086
		"	class Local1 {} \n" +
16087
		"	      ^^^^^^\n" +
16088
		"The type Local1 is never used locally\n" +
16089
		"----------\n" +
16090
		"6. WARNING in X.java (at line 9)\n" +
16091
		"	class Local2 { \n" +
16092
		"	      ^^^^^^\n" +
16093
		"The type Local2 is never used locally\n" +
16094
		"----------\n" +
16095
		"7. WARNING in X.java (at line 11)\n" +
16096
		"	class LMember2 extends Local2 { \n" +
16097
		"	      ^^^^^^^^\n" +
16098
		"The type Local2.LMember2 is never used locally\n" +
16099
		"----------\n" +
16100
		"8. WARNING in X.java (at line 13)\n" +
16101
		"	LMember1 m1;\n" +
16102
		"	         ^^\n" +
16103
		"The field Local2.m1 is never read locally\n" +
16104
		"----------\n" 
16105
16106
	);
16107
16108
}
16109
16110
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=170181
16111
public void test443() {
16112
	this.runNegativeTest(
16113
		new String[] {
16114
			"X.java",
16115
			"public class X {\n" + 
16116
			"	private class M { \n" +
16117
			"		private class Member1 {} \n" +
16118
			"		private class Member2 extends M { \n" +
16119
			"		}\n" +
16120
			"		M.Member2 m2;\n" +
16121
			"	}\n" +
16122
			"	public static void main(String[] args) {\n" +
16123
			"		class Local1 {} \n" +
16124
			"		class Local2 { \n" +
16125
			"    		class LMember1 {} \n" +
16126
			"    		class LMember2 extends Local2 { \n" +
16127
			"    		}\n" +
16128
			"   		// LMember1 m1;\n" +
16129
			"		}\n" +
16130
			"		int i = 0;\n" +
16131
			"	}\n" +
16132
			"} \n" 
16133
		}, 
16134
		"----------\n" +
16135
		"1. WARNING in X.java (at line 2)\n" +
16136
		"	private class M { \n" +
16137
		"	              ^\n" +
16138
		"The type X.M is never used locally\n" +
16139
		"----------\n" +
16140
		"2. WARNING in X.java (at line 3)\n" +
16141
		"	private class Member1 {} \n" +
16142
		"	              ^^^^^^^\n" +
16143
		"The type X.M.Member1 is never used locally\n" +
16144
		"----------\n" +
16145
		"3. WARNING in X.java (at line 4)\n" +
16146
		"	private class Member2 extends M { \n" +
16147
		"	              ^^^^^^^\n" +
16148
		"Access to enclosing constructor X.M() is emulated by a synthetic accessor method. Increasing its visibility will improve your performance\n" +
16149
		"----------\n" +
16150
		"4. WARNING in X.java (at line 9)\n" +
16151
		"	class Local1 {} \n" +
16152
		"	      ^^^^^^\n" +
16153
		"The type Local1 is never used locally\n" +
16154
		"----------\n" +
16155
		"5. WARNING in X.java (at line 10)\n" +
16156
		"	class Local2 { \n" +
16157
		"	      ^^^^^^\n" +
16158
		"The type Local2 is never used locally\n" +
16159
		"----------\n" +
16160
		"6. WARNING in X.java (at line 11)\n" +
16161
		"	class LMember1 {} \n" +
16162
		"	      ^^^^^^^^\n" +
16163
		"The type Local2.LMember1 is never used locally\n" +
16164
		"----------\n" +
16165
		"7. WARNING in X.java (at line 12)\n" +
16166
		"	class LMember2 extends Local2 { \n" +
16167
		"	      ^^^^^^^^\n" +
16168
		"The type Local2.LMember2 is never used locally\n" +
16169
		"----------\n"
16170
	);
16171
16172
}
16173
16174
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=170181
16175
public void test444() {
16176
	this.runNegativeTest(
16177
		new String[] {
16178
				"X.java",
16179
				"public class X {\n" + 
16180
				"	private class M { \n" +
16181
				"		private class Member1 { \n" +
16182
				"			static{} \n" +
16183
				"		} \n" +
16184
				"		private class Member2 extends M { \n" +
16185
				"			static{} \n" +
16186
				"		}\n" +
16187
				"	}\n" +
16188
				"	public static void main(String[] args) {\n" +
16189
				"		class Local1 { \n" +
16190
				"			static{} \n" +
16191
				"		} \n" +
16192
				"		class Local2 { \n" +
16193
				"    		class LMember1 { \n" +
16194
				"				static{} \n" +
16195
				"			} \n" +
16196
				"    		class LMember2 extends Local2 { \n" +
16197
				"				static{} \n" +
16198
				"    		}\n" +
16199
				"		}\n" +
16200
				"		int i = 0;\n" +
16201
				"	}\n" +
16202
				"} \n" 
16203
			}, 
16204
		"----------\n" +
16205
		"1. WARNING in X.java (at line 2)\n" +
16206
		"	private class M { \n" +
16207
		"	              ^\n" +
16208
		"The type X.M is never used locally\n" +
16209
		"----------\n" +
16210
		"2. ERROR in X.java (at line 4)\n" +
16211
		"	static{} \n" +
16212
		"	      ^\n" +
16213
		"Cannot define static initializer in inner type X.M.Member1\n" +
16214
		"----------\n" +
16215
		"3. ERROR in X.java (at line 7)\n" +
16216
		"	static{} \n" +
16217
		"	      ^\n" +
16218
		"Cannot define static initializer in inner type X.M.Member2\n" +
16219
		"----------\n" +
16220
		"4. ERROR in X.java (at line 12)\n" +
16221
		"	static{} \n" +
16222
		"	      ^\n" +
16223
		"Cannot define static initializer in inner type Local1\n" +
16224
		"----------\n" +
16225
		"5. ERROR in X.java (at line 16)\n" +
16226
		"	static{} \n" +
16227
		"	      ^\n" +
16228
		"Cannot define static initializer in inner type Local2.LMember1\n" +
16229
		"----------\n" +
16230
		"6. ERROR in X.java (at line 19)\n" +
16231
		"	static{} \n" +
16232
		"	      ^\n" +
16233
		"Cannot define static initializer in inner type Local2.LMember2\n" +
16234
		"----------\n"
16235
	);
16236
15929
}
16237
}
15930
}
16238
}
(-)compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java (-1 / +1 lines)
Lines 398-404 Link Here
398
398
399
		ReferenceBinding refType = (ReferenceBinding) type;
399
		ReferenceBinding refType = (ReferenceBinding) type;
400
400
401
		if ((refType.isPrivate() /*|| refType.isLocalType()*/) && !scope.isDefinedInType(refType)) {
401
		if ((refType.isPrivate() || refType.isLocalType()) && !scope.isDefinedInType(refType)) {
402
			// ignore cases where type is used from within inside itself 
402
			// ignore cases where type is used from within inside itself 
403
			((ReferenceBinding)refType.erasure()).modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
403
			((ReferenceBinding)refType.erasure()).modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
404
		}
404
		}
(-)compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java (-1 / +1 lines)
Lines 589-595 Link Here
589
 *	Common flow analysis for all types
589
 *	Common flow analysis for all types
590
 */
590
 */
591
private void internalAnalyseCode(FlowContext flowContext, FlowInfo flowInfo) {
591
private void internalAnalyseCode(FlowContext flowContext, FlowInfo flowInfo) {
592
	if ((this.binding.isPrivate()/* || (this.binding.tagBits & (TagBits.IsAnonymousType|TagBits.IsLocalType)) == TagBits.IsLocalType*/) && !this.binding.isUsed()) {
592
	if ((this.binding.isPrivate() || (this.binding.tagBits & (TagBits.IsAnonymousType|TagBits.IsLocalType)) == TagBits.IsLocalType) && !this.binding.isUsed()) {
593
		if (!this.scope.referenceCompilationUnit().compilationResult.hasSyntaxError) {
593
		if (!this.scope.referenceCompilationUnit().compilationResult.hasSyntaxError) {
594
			this.scope.problemReporter().unusedPrivateType(this);
594
			this.scope.problemReporter().unusedPrivateType(this);
595
		}
595
		}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java (-18 / +63 lines)
Lines 2999-3016 Link Here
2999
				"} 	\n"
2999
				"} 	\n"
3000
			},
3000
			},
3001
			"----------\n" + 
3001
			"----------\n" + 
3002
			"1. WARNING in X.java (at line 8)\n" + 
3002
			"1. WARNING in X.java (at line 7)\n" +
3003
			"	class B extends X {	\n" +
3004
			"	      ^\n" +
3005
			"The type B is never used locally\n" +
3006
			"----------\n" +
3007
			"2. WARNING in X.java (at line 8)\n" + 
3003
			"	B() {	\n" + 
3008
			"	B() {	\n" + 
3004
			"	^^^\n" + 
3009
			"	^^^\n" + 
3005
			"The constructor B() is never used locally\n" + 
3010
			"The constructor B() is never used locally\n" + 
3006
			"----------\n" + 
3011
			"----------\n" + 
3007
			"2. ERROR in X.java (at line 9)\n" + 
3012
			"3. ERROR in X.java (at line 9)\n" + 
3008
			"	super(new A(){	\n" + 
3013
			"	super(new A(){	\n" + 
3009
			"				});	\n" + 
3014
			"				});	\n" + 
3010
			"	      ^^^^^^^^^^^^^^^\n" + 
3015
			"	      ^^^^^^^^^^^^^^^\n" + 
3011
			"No enclosing instance of type X is available due to some intermediate constructor invocation\n" + 
3016
			"No enclosing instance of type X is available due to some intermediate constructor invocation\n" + 
3012
			"----------\n" + 
3017
			"----------\n" + 
3013
			"3. WARNING in X.java (at line 9)\n" + 
3018
			"4. WARNING in X.java (at line 9)\n" + 
3014
			"	super(new A(){	\n" + 
3019
			"	super(new A(){	\n" + 
3015
			"	          ^^^\n" + 
3020
			"	          ^^^\n" + 
3016
			"Access to enclosing constructor A() is emulated by a synthetic accessor method. Increasing its visibility will improve your performance\n" + 
3021
			"Access to enclosing constructor A() is emulated by a synthetic accessor method. Increasing its visibility will improve your performance\n" + 
Lines 3037-3048 Link Here
3037
				"} 	\n"
3042
				"} 	\n"
3038
			},
3043
			},
3039
			"----------\n" + 
3044
			"----------\n" + 
3040
			"1. WARNING in X.java (at line 8)\n" + 
3045
			"1. WARNING in X.java (at line 7)\n" +
3046
			"	class B extends X {	\n" +
3047
			"	      ^\n" +
3048
			"The type B is never used locally\n" +
3049
			"----------\n" +
3050
			"2. WARNING in X.java (at line 8)\n" + 
3041
			"	B() {	\n" + 
3051
			"	B() {	\n" + 
3042
			"	^^^\n" + 
3052
			"	^^^\n" + 
3043
			"The constructor B() is never used locally\n" + 
3053
			"The constructor B() is never used locally\n" + 
3044
			"----------\n" + 
3054
			"----------\n" + 
3045
			"2. ERROR in X.java (at line 9)\n" + 
3055
			"3. ERROR in X.java (at line 9)\n" + 
3046
			"	super(new A(){	\n" + 
3056
			"	super(new A(){	\n" + 
3047
			"				});	\n" + 
3057
			"				});	\n" + 
3048
			"	      ^^^^^^^^^^^^^^^\n" + 
3058
			"	      ^^^^^^^^^^^^^^^\n" + 
Lines 3129-3157 Link Here
3129
				"} 	\n"
3139
				"} 	\n"
3130
			},
3140
			},
3131
			"----------\n" + 
3141
			"----------\n" + 
3132
			"1. WARNING in X.java (at line 8)\n" + 
3142
			"1. WARNING in X.java (at line 7)\n" +
3143
			"	class B extends X {	\n" +
3144
			"	      ^\n" +
3145
			"The type B is never used locally\n" +
3146
			"----------\n" +
3147
			"2. WARNING in X.java (at line 8)\n" + 
3133
			"	B() {	\n" + 
3148
			"	B() {	\n" + 
3134
			"	^^^\n" + 
3149
			"	^^^\n" + 
3135
			"The constructor B() is never used locally\n" + 
3150
			"The constructor B() is never used locally\n" + 
3136
			"----------\n" + 
3151
			"----------\n" + 
3137
			"2. ERROR in X.java (at line 9)\n" + 
3152
			"3. ERROR in X.java (at line 9)\n" + 
3138
			"	super(new A(){	\n" + 
3153
			"	super(new A(){	\n" + 
3139
			"					void foo() { System.out.println(X.this);	} \n" + 
3154
			"					void foo() { System.out.println(X.this);	} \n" + 
3140
			"				});	\n" + 
3155
			"				});	\n" + 
3141
			"	      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
3156
			"	      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
3142
			"No enclosing instance of type X is available due to some intermediate constructor invocation\n" + 
3157
			"No enclosing instance of type X is available due to some intermediate constructor invocation\n" + 
3143
			"----------\n" + 
3158
			"----------\n" + 
3144
			"3. WARNING in X.java (at line 9)\n" + 
3159
			"4. WARNING in X.java (at line 9)\n" + 
3145
			"	super(new A(){	\n" + 
3160
			"	super(new A(){	\n" + 
3146
			"	          ^^^\n" + 
3161
			"	          ^^^\n" + 
3147
			"Access to enclosing constructor A() is emulated by a synthetic accessor method. Increasing its visibility will improve your performance\n" + 
3162
			"Access to enclosing constructor A() is emulated by a synthetic accessor method. Increasing its visibility will improve your performance\n" + 
3148
			"----------\n" + 
3163
			"----------\n" + 
3149
			"4. WARNING in X.java (at line 10)\n" + 
3164
			"5. WARNING in X.java (at line 10)\n" + 
3150
			"	void foo() { System.out.println(X.this);	} \n" + 
3165
			"	void foo() { System.out.println(X.this);	} \n" + 
3151
			"	     ^^^^^\n" + 
3166
			"	     ^^^^^\n" + 
3152
			"The method foo() from the type new A(){} is never used locally\n" + 
3167
			"The method foo() from the type new A(){} is never used locally\n" + 
3153
			"----------\n" + 
3168
			"----------\n" + 
3154
			"5. ERROR in X.java (at line 10)\n" + 
3169
			"6. ERROR in X.java (at line 10)\n" + 
3155
			"	void foo() { System.out.println(X.this);	} \n" + 
3170
			"	void foo() { System.out.println(X.this);	} \n" + 
3156
			"	                                ^^^^^^\n" + 
3171
			"	                                ^^^^^^\n" + 
3157
			"No enclosing instance of the type X is accessible in scope\n" + 
3172
			"No enclosing instance of the type X is accessible in scope\n" + 
Lines 3179-3202 Link Here
3179
				"} 	\n"
3194
				"} 	\n"
3180
			},
3195
			},
3181
			"----------\n" + 
3196
			"----------\n" + 
3182
			"1. WARNING in X.java (at line 8)\n" + 
3197
			"1. WARNING in X.java (at line 7)\n" +
3198
			"	class B extends X {	\n" +
3199
			"	      ^\n" +
3200
			"The type B is never used locally\n" +
3201
			"----------\n" +
3202
			"2. WARNING in X.java (at line 8)\n" + 
3183
			"	B() {	\n" + 
3203
			"	B() {	\n" + 
3184
			"	^^^\n" + 
3204
			"	^^^\n" + 
3185
			"The constructor B() is never used locally\n" + 
3205
			"The constructor B() is never used locally\n" + 
3186
			"----------\n" + 
3206
			"----------\n" + 
3187
			"2. ERROR in X.java (at line 9)\n" + 
3207
			"3. ERROR in X.java (at line 9)\n" + 
3188
			"	super(new A(){	\n" + 
3208
			"	super(new A(){	\n" + 
3189
			"					void foo() { System.out.println(X.this);	} \n" + 
3209
			"					void foo() { System.out.println(X.this);	} \n" + 
3190
			"				});	\n" + 
3210
			"				});	\n" + 
3191
			"	      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
3211
			"	      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
3192
			"No enclosing instance of type X is available due to some intermediate constructor invocation\n" + 
3212
			"No enclosing instance of type X is available due to some intermediate constructor invocation\n" + 
3193
			"----------\n" + 
3213
			"----------\n" + 
3194
			"3. WARNING in X.java (at line 10)\n" + 
3214
			"4. WARNING in X.java (at line 10)\n" + 
3195
			"	void foo() { System.out.println(X.this);	} \n" + 
3215
			"	void foo() { System.out.println(X.this);	} \n" + 
3196
			"	     ^^^^^\n" + 
3216
			"	     ^^^^^\n" + 
3197
			"The method foo() from the type new A(){} is never used locally\n" + 
3217
			"The method foo() from the type new A(){} is never used locally\n" + 
3198
			"----------\n" + 
3218
			"----------\n" + 
3199
			"4. ERROR in X.java (at line 10)\n" + 
3219
			"5. ERROR in X.java (at line 10)\n" + 
3200
			"	void foo() { System.out.println(X.this);	} \n" + 
3220
			"	void foo() { System.out.println(X.this);	} \n" + 
3201
			"	                                ^^^^^^\n" + 
3221
			"	                                ^^^^^^\n" + 
3202
			"No enclosing instance of the type X is accessible in scope\n" + 
3222
			"No enclosing instance of the type X is accessible in scope\n" + 
Lines 3959-3965 Link Here
3959
				"}",
3979
				"}",
3960
			},
3980
			},
3961
			"----------\n" + 
3981
			"----------\n" + 
3962
			"1. ERROR in X.java (at line 5)\n" + 
3982
			"1. WARNING in X.java (at line 5)\n" +
3983
			"	class Local2 extends Local1 {\n" +
3984
			"	      ^^^^^^\n" +
3985
			"The type Local2 is never used locally\n" +
3986
			"----------\n" +
3987
			"2. ERROR in X.java (at line 5)\n" + 
3963
			"	class Local2 extends Local1 {\n" + 
3988
			"	class Local2 extends Local1 {\n" + 
3964
			"	      ^^^^^^\n" + 
3989
			"	      ^^^^^^\n" + 
3965
			"No enclosing instance of type X is available due to some intermediate constructor invocation\n" + 
3990
			"No enclosing instance of type X is available due to some intermediate constructor invocation\n" + 
Lines 4017-4023 Link Here
4017
			"	            ^^^^^\n" + 
4042
			"	            ^^^^^\n" + 
4018
			"The method foo() from the type new X(){} is never used locally\n" + 
4043
			"The method foo() from the type new X(){} is never used locally\n" + 
4019
			"----------\n" + 
4044
			"----------\n" + 
4020
			"3. ERROR in X.java (at line 13)\n" + 
4045
			"3. WARNING in X.java (at line 13)\n" +
4046
			"	class D extends C {\n" +
4047
			"	      ^\n" +
4048
			"The type D is never used locally\n" +
4049
			"----------\n" +
4050
			"4. ERROR in X.java (at line 13)\n" + 
4021
			"	class D extends C {\n" + 
4051
			"	class D extends C {\n" + 
4022
			"	      ^\n" + 
4052
			"	      ^\n" + 
4023
			"No enclosing instance of type X is available due to some intermediate constructor invocation\n" + 
4053
			"No enclosing instance of type X is available due to some intermediate constructor invocation\n" + 
Lines 5335-5349 Link Here
5335
			"}", // =================
5365
			"}", // =================
5336
		},
5366
		},
5337
		"----------\n" + 
5367
		"----------\n" + 
5338
		"1. WARNING in X.java (at line 5)\n" + 
5368
		"1. WARNING in X.java (at line 3)\n" +
5369
		"	class Local {}\n" +
5370
		"	      ^^^^^\n" +
5371
		"The type Local is never used locally\n" +
5372
		"----------\n" +
5373
		"2. WARNING in X.java (at line 4)\n" +
5374
		"	class Foo {\n" +
5375
		"	      ^^^\n" +
5376
		"The type Foo is never used locally\n" +
5377
		"----------\n" +
5378
		"3. WARNING in X.java (at line 5)\n" + 
5339
		"	void foo() {\n" + 
5379
		"	void foo() {\n" + 
5340
		"	     ^^^^^\n" + 
5380
		"	     ^^^^^\n" + 
5341
		"The method foo() from the type Foo is never used locally\n" + 
5381
		"The method foo() from the type Foo is never used locally\n" + 
5342
		"----------\n" + 
5382
		"----------\n" + 
5343
		"2. WARNING in X.java (at line 6)\n" + 
5383
		"4. WARNING in X.java (at line 6)\n" + 
5344
		"	class Local {}\n" + 
5384
		"	class Local {}\n" + 
5345
		"	      ^^^^^\n" + 
5385
		"	      ^^^^^\n" + 
5346
		"The type Local is hiding the type Local\n" + 
5386
		"The type Local is hiding the type Local\n" + 
5387
		"----------\n" +
5388
		"5. WARNING in X.java (at line 6)\n" +
5389
		"	class Local {}\n" +
5390
		"	      ^^^^^\n" +
5391
		"The type Local is never used locally\n" +
5347
		"----------\n");
5392
		"----------\n");
5348
}
5393
}
5349
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=168331
5394
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=168331
(-)src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java (-42 / +62 lines)
Lines 35867-35914 Link Here
35867
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=165679
35867
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=165679
35868
public void test1088() {
35868
public void test1088() {
35869
	this.runNegativeTest(
35869
	this.runNegativeTest(
35870
		new String[] {
35870
			new String[] {
35871
			"X.java",
35871
				"X.java",
35872
			"public class X<M> {\n" + 
35872
				"public class X<M> {\n" + 
35873
			"	static public class M {}\n" + 
35873
				"	static public class M {}\n" + 
35874
			"	Zork z;\n" +
35874
				"	Zork z;\n" +
35875
			"	void foo() {\n" + 
35875
				"	void foo() {\n" + 
35876
			"		class M {} // hides member\n" + 
35876
				"		class M {} // hides member\n" + 
35877
			"	}\n" + 
35877
				"	}\n" + 
35878
			"}\n" + 
35878
				"}\n" + 
35879
			"class Y <T> {\n" + 
35879
				"class Y <T> {\n" + 
35880
			"	class Local {}\n" + 
35880
				"	class Local {}\n" + 
35881
			"	void foo() {\n" + 
35881
				"	void foo() {\n" + 
35882
			"		class T {}; // hiding warning\n" + 
35882
				"		class T {}; // hiding warning\n" + 
35883
			"		class Local {};\n" + 
35883
				"		class Local {};\n" + 
35884
			"	}\n" + 
35884
				"	}\n" + 
35885
			"	static void bar() {\n" + 
35885
				"	static void bar() {\n" + 
35886
			"		class T {}; // no hiding warning\n" + 
35886
				"		class T {}; // no hiding warning\n" + 
35887
			"		class Local {}; // no hiding warning\n" + 
35887
				"		class Local {}; // no hiding warning\n" + 
35888
			"	}	\n" + 
35888
				"	}	\n" + 
35889
			"}\n", // =================
35889
				"}\n", // =================
35890
		},
35890
			},
35891
		"----------\n" + 
35891
			"----------\n" + 
35892
		"1. ERROR in X.java (at line 3)\n" + 
35892
			"1. ERROR in X.java (at line 3)\n" + 
35893
		"	Zork z;\n" + 
35893
			"	Zork z;\n" + 
35894
		"	^^^^\n" + 
35894
			"	^^^^\n" + 
35895
		"Zork cannot be resolved to a type\n" + 
35895
			"Zork cannot be resolved to a type\n" + 
35896
		"----------\n" + 
35896
			"----------\n" + 
35897
		"2. WARNING in X.java (at line 5)\n" + 
35897
			"2. WARNING in X.java (at line 5)\n" + 
35898
		"	class M {} // hides member\n" + 
35898
			"	class M {} // hides member\n" + 
35899
		"	      ^\n" + 
35899
			"	      ^\n" + 
35900
		"The type M is hiding the type X<M>.M\n" + 
35900
			"The type M is hiding the type X<M>.M\n" + 
35901
		"----------\n" + 
35901
			"----------\n" + 
35902
		"3. WARNING in X.java (at line 11)\n" + 
35902
			"3. WARNING in X.java (at line 11)\n" + 
35903
		"	class T {}; // hiding warning\n" + 
35903
			"	class T {}; // hiding warning\n" + 
35904
		"	      ^\n" + 
35904
			"	      ^\n" + 
35905
		"The nested type T is hiding the type parameter T of type Y<T>\n" + 
35905
			"The nested type T is hiding the type parameter T of type Y<T>\n" + 
35906
		"----------\n" + 
35906
			"----------\n" + 
35907
		"4. WARNING in X.java (at line 12)\n" + 
35907
			"4. WARNING in X.java (at line 11)\n" +
35908
		"	class Local {};\n" + 
35908
			"	class T {}; // hiding warning\n" +
35909
		"	      ^^^^^\n" + 
35909
			"	      ^\n" +
35910
		"The type Local is hiding the type Y<T>.Local\n" + 
35910
			"The type T is never used locally\n" +
35911
		"----------\n");
35911
			"----------\n" +
35912
			"5. WARNING in X.java (at line 12)\n" + 
35913
			"	class Local {};\n" + 
35914
			"	      ^^^^^\n" + 
35915
			"The type Local is hiding the type Y<T>.Local\n" + 
35916
			"----------\n" +
35917
			"6. WARNING in X.java (at line 12)\n" +
35918
			"	class Local {};\n" +
35919
			"	      ^^^^^\n" +
35920
			"The type Local is never used locally\n" +
35921
			"----------\n" +
35922
			"7. WARNING in X.java (at line 15)\n" +
35923
			"	class T {}; // no hiding warning\n" +
35924
			"	      ^\n" +
35925
			"The type T is never used locally\n" +
35926
			"----------\n" +
35927
			"8. WARNING in X.java (at line 16)\n" +
35928
			"	class Local {}; // no hiding warning\n" +
35929
			"	      ^^^^^\n" +
35930
			"The type Local is never used locally\n" +
35931
			"----------\n");
35912
}
35932
}
35913
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=165679 - variation
35933
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=165679 - variation
35914
public void test1089() {
35934
public void test1089() {
(-)src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java (-3 / +8 lines)
Lines 1906-1922 Link Here
1906
			"}",
1906
			"}",
1907
		}, 
1907
		}, 
1908
		"----------\n" + 
1908
		"----------\n" + 
1909
		"1. WARNING in p\\FieldQualification.java (at line 6)\n" + 
1909
		"1. WARNING in p\\FieldQualification.java (at line 5)\n" +
1910
		"	class Local {\n" +
1911
		"	      ^^^^^\n" +
1912
		"The type Local is never used locally\n" +
1913
		"----------\n" +
1914
		"2. WARNING in p\\FieldQualification.java (at line 6)\n" + 
1910
		"	String field = \"Enclosing field for anonymous type\";\n" + 
1915
		"	String field = \"Enclosing field for anonymous type\";\n" + 
1911
		"	       ^^^^^\n" + 
1916
		"	       ^^^^^\n" + 
1912
		"The field Local.field is hiding a field from type FieldQualification\n" + 
1917
		"The field Local.field is hiding a field from type FieldQualification\n" + 
1913
		"----------\n" + 
1918
		"----------\n" + 
1914
		"2. WARNING in p\\FieldQualification.java (at line 6)\n" + 
1919
		"3. WARNING in p\\FieldQualification.java (at line 6)\n" + 
1915
		"	String field = \"Enclosing field for anonymous type\";\n" + 
1920
		"	String field = \"Enclosing field for anonymous type\";\n" + 
1916
		"	       ^^^^^\n" + 
1921
		"	       ^^^^^\n" + 
1917
		"The field Local.field is never read locally\n" + 
1922
		"The field Local.field is never read locally\n" + 
1918
		"----------\n" + 
1923
		"----------\n" + 
1919
		"3. WARNING in p\\FieldQualification.java (at line 7)\n" + 
1924
		"4. WARNING in p\\FieldQualification.java (at line 7)\n" + 
1920
		"	void foo() {\n" + 
1925
		"	void foo() {\n" + 
1921
		"	     ^^^^^\n" + 
1926
		"	     ^^^^^\n" + 
1922
		"The method foo() from the type Local is never used locally\n" + 
1927
		"The method foo() from the type Local is never used locally\n" + 
(-)src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java (-3 / +8 lines)
Lines 1928-1944 Link Here
1928
			"}",
1928
			"}",
1929
		}, 
1929
		}, 
1930
		"----------\n" + 
1930
		"----------\n" + 
1931
		"1. WARNING in p\\FieldQualification.java (at line 6)\n" + 
1931
		"1. WARNING in p\\FieldQualification.java (at line 5)\n" +
1932
		"	class Local {\n" +
1933
		"	      ^^^^^\n" +
1934
		"The type Local is never used locally\n" +
1935
		"----------\n" +
1936
		"2. WARNING in p\\FieldQualification.java (at line 6)\n" + 
1932
		"	String field = \"Enclosing field for anonymous type\";\n" + 
1937
		"	String field = \"Enclosing field for anonymous type\";\n" + 
1933
		"	       ^^^^^\n" + 
1938
		"	       ^^^^^\n" + 
1934
		"The field Local.field is hiding a field from type FieldQualification\n" + 
1939
		"The field Local.field is hiding a field from type FieldQualification\n" + 
1935
		"----------\n" + 
1940
		"----------\n" + 
1936
		"2. WARNING in p\\FieldQualification.java (at line 6)\n" + 
1941
		"3. WARNING in p\\FieldQualification.java (at line 6)\n" + 
1937
		"	String field = \"Enclosing field for anonymous type\";\n" + 
1942
		"	String field = \"Enclosing field for anonymous type\";\n" + 
1938
		"	       ^^^^^\n" + 
1943
		"	       ^^^^^\n" + 
1939
		"The field Local.field is never read locally\n" + 
1944
		"The field Local.field is never read locally\n" + 
1940
		"----------\n" + 
1945
		"----------\n" + 
1941
		"3. WARNING in p\\FieldQualification.java (at line 7)\n" + 
1946
		"4. WARNING in p\\FieldQualification.java (at line 7)\n" + 
1942
		"	void foo() {\n" + 
1947
		"	void foo() {\n" + 
1943
		"	     ^^^^^\n" + 
1948
		"	     ^^^^^\n" + 
1944
		"The method foo() from the type Local is never used locally\n" + 
1949
		"The method foo() from the type Local is never used locally\n" + 

Return to bug 170181