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

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java (-2 / +2 lines)
Lines 1361-1367 Link Here
1361
				methodDecl.scope.problemReporter().argumentTypeCannotBeVoid(this, methodDecl, arg);
1361
				methodDecl.scope.problemReporter().argumentTypeCannotBeVoid(this, methodDecl, arg);
1362
				foundArgProblem = true;
1362
				foundArgProblem = true;
1363
			} else if (parameterType.isArrayType() && ((ArrayBinding) parameterType).leafComponentType == TypeBinding.VOID) {
1363
			} else if (parameterType.isArrayType() && ((ArrayBinding) parameterType).leafComponentType == TypeBinding.VOID) {
1364
				methodDecl.scope.problemReporter().argumentTypeCannotBeVoidArray(this, methodDecl, arg);
1364
				methodDecl.scope.problemReporter().argumentTypeCannotBeVoidArray(arg);
1365
				foundArgProblem = true;
1365
				foundArgProblem = true;
1366
			} else {
1366
			} else {
1367
				TypeBinding leafType = parameterType.leafComponentType();
1367
				TypeBinding leafType = parameterType.leafComponentType();
Lines 1386-1392 Link Here
1386
			if (methodType == null) {
1386
			if (methodType == null) {
1387
				foundReturnTypeProblem = true;
1387
				foundReturnTypeProblem = true;
1388
			} else if (methodType.isArrayType() && ((ArrayBinding) methodType).leafComponentType == TypeBinding.VOID) {
1388
			} else if (methodType.isArrayType() && ((ArrayBinding) methodType).leafComponentType == TypeBinding.VOID) {
1389
				methodDecl.scope.problemReporter().returnTypeCannotBeVoidArray(this, (MethodDeclaration) methodDecl);
1389
				methodDecl.scope.problemReporter().returnTypeCannotBeVoidArray((MethodDeclaration) methodDecl);
1390
				foundReturnTypeProblem = true;
1390
				foundReturnTypeProblem = true;
1391
			} else {
1391
			} else {
1392
				method.returnType = methodType;
1392
				method.returnType = methodType;
(-)compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties (-4 / +4 lines)
Lines 39-46 Link Here
39
50 = {0} cannot be resolved
39
50 = {0} cannot be resolved
40
51 = The local variable {0} may not have been initialized
40
51 = The local variable {0} may not have been initialized
41
52 = void is an invalid type for the variable {0}
41
52 = void is an invalid type for the variable {0}
42
53 = An array of void is an invalid type for the variable {0}
42
###[obsolete] 53 = An array of void is an invalid type for the variable {0}
43
54 = An array of void is an invalid type
43
54 = void[] is an invalid type
44
55 = Duplicate local variable {0}
44
55 = Duplicate local variable {0}
45
56 = Duplicate parameter {0}
45
56 = Duplicate parameter {0}
46
57 = The final local variable {0} may already have been assigned
46
57 = The final local variable {0} may already have been assigned
Lines 286-293 Link Here
286
362 = The abstract method {1} in type {0} can only set a visibility modifier, one of public or protected
286
362 = The abstract method {1} in type {0} can only set a visibility modifier, one of public or protected
287
363 = The abstract method {1} in type {0} can only be defined by an abstract class
287
363 = The abstract method {1} in type {0} can only be defined by an abstract class
288
364 = void is an invalid type for the parameter {1} of the method {0}
288
364 = void is an invalid type for the parameter {1} of the method {0}
289
365 = An array of void is an invalid type for the parameter {1} of the method {0}
289
###[obsolete] 365 = An array of void is an invalid type for the parameter {1} of the method {0}
290
366 = An array of void is an invalid return type for the method {0}
290
###[obsolete] 366 = An array of void is an invalid return type for the method {0}
291
367 = The native method {1} cannot also be declared strictfp
291
367 = The native method {1} cannot also be declared strictfp
292
368 = Duplicate modifier for parameter {0}
292
368 = Duplicate modifier for parameter {0}
293
293
(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (-20 / +17 lines)
Lines 635-648 Link Here
635
		methodDecl.sourceStart,
635
		methodDecl.sourceStart,
636
		methodDecl.sourceEnd);
636
		methodDecl.sourceEnd);
637
}
637
}
638
public void argumentTypeCannotBeVoidArray(SourceTypeBinding type, AbstractMethodDeclaration methodDecl, Argument arg) {
638
public void argumentTypeCannotBeVoidArray(Argument arg) {
639
	String[] arguments = new String[] {new String(methodDecl.selector), new String(arg.name)};
640
	this.handle(
639
	this.handle(
641
		IProblem.ArgumentTypeCannotBeVoidArray,
640
		IProblem.CannotAllocateVoidArray,
642
		arguments,
641
		NoArgument,
643
		arguments,
642
		NoArgument,
644
		methodDecl.sourceStart,
643
		arg.type.sourceStart,
645
		methodDecl.sourceEnd);
644
		arg.type.sourceEnd);
646
}
645
}
647
public void arrayConstantsOnlyInArrayInitializers(int sourceStart, int sourceEnd) {
646
public void arrayConstantsOnlyInArrayInitializers(int sourceStart, int sourceEnd) {
648
	this.handle(
647
	this.handle(
Lines 5356-5369 Link Here
5356
		arrayRef.sourceStart,
5355
		arrayRef.sourceStart,
5357
		arrayRef.sourceEnd);
5356
		arrayRef.sourceEnd);
5358
}
5357
}
5359
public void returnTypeCannotBeVoidArray(SourceTypeBinding type, MethodDeclaration methodDecl) {
5358
public void returnTypeCannotBeVoidArray(MethodDeclaration methodDecl) {
5360
	String[] arguments = new String[] {new String(methodDecl.selector)};
5361
	this.handle(
5359
	this.handle(
5362
		IProblem.ReturnTypeCannotBeVoidArray,
5360
		IProblem.CannotAllocateVoidArray,
5363
		arguments,
5361
		NoArgument,
5364
		arguments,
5362
		NoArgument,
5365
		methodDecl.sourceStart,
5363
		methodDecl.returnType.sourceStart,
5366
		methodDecl.sourceEnd);
5364
		methodDecl.returnType.sourceEnd);
5367
}
5365
}
5368
public void scannerError(Parser parser, String errorTokenName) {
5366
public void scannerError(Parser parser, String errorTokenName) {
5369
	Scanner scanner = parser.scanner;
5367
	Scanner scanner = parser.scanner;
Lines 6414-6426 Link Here
6414
		varDecl.sourceEnd);
6412
		varDecl.sourceEnd);
6415
}
6413
}
6416
public void variableTypeCannotBeVoidArray(AbstractVariableDeclaration varDecl) {
6414
public void variableTypeCannotBeVoidArray(AbstractVariableDeclaration varDecl) {
6417
	String[] arguments = new String[] {new String(varDecl.name)};
6418
	this.handle(
6415
	this.handle(
6419
		IProblem.VariableTypeCannotBeVoidArray,
6416
		IProblem.CannotAllocateVoidArray,
6420
		arguments,
6417
		NoArgument,
6421
		arguments,
6418
		NoArgument,
6422
		varDecl.sourceStart,
6419
		varDecl.type.sourceStart,
6423
		varDecl.sourceEnd);
6420
		varDecl.type.sourceEnd);
6424
}
6421
}
6425
public void visibilityConflict(MethodBinding currentMethod, MethodBinding inheritedMethod) {
6422
public void visibilityConflict(MethodBinding currentMethod, MethodBinding inheritedMethod) {
6426
	this.handle(
6423
	this.handle(
(-)compiler/org/eclipse/jdt/core/compiler/IProblem.java (-35 / +38 lines)
Lines 288-293 Link Here
288
	int UndefinedName = Internal + FieldRelated + 50;
288
	int UndefinedName = Internal + FieldRelated + 50;
289
	int UninitializedLocalVariable = Internal + 51;
289
	int UninitializedLocalVariable = Internal + 51;
290
	int VariableTypeCannotBeVoid = Internal + 52;
290
	int VariableTypeCannotBeVoid = Internal + 52;
291
	/** @deprecated - problem is no longer generated, use {@link #CannotAllocateVoidArray} instead */
291
	int VariableTypeCannotBeVoidArray = Internal + 53;
292
	int VariableTypeCannotBeVoidArray = Internal + 53;
292
	int CannotAllocateVoidArray = Internal + 54;
293
	int CannotAllocateVoidArray = Internal + 54;
293
	// local variables
294
	// local variables
Lines 447-453 Link Here
447
	int SuperfluousSemicolon = Internal + 180;
448
	int SuperfluousSemicolon = Internal + 180;
448
	/** @since 3.0 */
449
	/** @since 3.0 */
449
	int UnnecessaryCast = Internal + TypeRelated + 181;
450
	int UnnecessaryCast = Internal + TypeRelated + 181;
450
	/** @deprecated - no longer generated, simply treated as UnnecessaryCast
451
	/** @deprecated - no longer generated, use {@link #UnnecessaryCast} instead
451
	 *   @since 3.0 */
452
	 *   @since 3.0 */
452
	int UnnecessaryArgumentCast = Internal + TypeRelated + 182;
453
	int UnnecessaryArgumentCast = Internal + TypeRelated + 182;
453
	/** @since 3.0 */
454
	/** @since 3.0 */
Lines 597-622 Link Here
597
	/** @since 3.1 */
598
	/** @since 3.1 */
598
	int ObjectMustBeClass = Internal + 330;
599
	int ObjectMustBeClass = Internal + 330;
599
600
600
	/** @deprecated - problem is no longer generated, UndefinedType is used instead */
601
	/** @deprecated - problem is no longer generated, use {@link #UndefinedType} instead */
601
	int SuperclassNotFound =  TypeRelated + 329 + ProblemReasons.NotFound; // TypeRelated + 330
602
	int SuperclassNotFound =  TypeRelated + 329 + ProblemReasons.NotFound; // TypeRelated + 330
602
	/** @deprecated - problem is no longer generated, NotVisibleType is used instead */
603
	/** @deprecated - problem is no longer generated, use {@link #NotVisibleType} instead */
603
	int SuperclassNotVisible =  TypeRelated + 329 + ProblemReasons.NotVisible; // TypeRelated + 331
604
	int SuperclassNotVisible =  TypeRelated + 329 + ProblemReasons.NotVisible; // TypeRelated + 331
604
	/** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
605
	/** @deprecated - problem is no longer generated, use {@link #AmbiguousType} instead */
605
	int SuperclassAmbiguous =  TypeRelated + 329 + ProblemReasons.Ambiguous; // TypeRelated + 332
606
	int SuperclassAmbiguous =  TypeRelated + 329 + ProblemReasons.Ambiguous; // TypeRelated + 332
606
	/** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
607
	/** @deprecated - problem is no longer generated, use {@link #InternalTypeNameProvided} instead */
607
	int SuperclassInternalNameProvided =  TypeRelated + 329 + ProblemReasons.InternalNameProvided; // TypeRelated + 333
608
	int SuperclassInternalNameProvided =  TypeRelated + 329 + ProblemReasons.InternalNameProvided; // TypeRelated + 333
608
	/** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
609
	/** @deprecated - problem is no longer generated, use {@link #InheritedTypeHidesEnclosingName} instead */
609
	int SuperclassInheritedNameHidesEnclosingName =  TypeRelated + 329 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 334
610
	int SuperclassInheritedNameHidesEnclosingName =  TypeRelated + 329 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 334
610
611
611
	/** @deprecated - problem is no longer generated, UndefinedType is used instead */
612
	/** @deprecated - problem is no longer generated, use {@link #UndefinedType} instead */
612
	int InterfaceNotFound =  TypeRelated + 334 + ProblemReasons.NotFound; // TypeRelated + 335
613
	int InterfaceNotFound =  TypeRelated + 334 + ProblemReasons.NotFound; // TypeRelated + 335
613
	/** @deprecated - problem is no longer generated, NotVisibleType is used instead */
614
	/** @deprecated - problem is no longer generated, use {@link #NotVisibleType} instead */
614
	int InterfaceNotVisible =  TypeRelated + 334 + ProblemReasons.NotVisible; // TypeRelated + 336
615
	int InterfaceNotVisible =  TypeRelated + 334 + ProblemReasons.NotVisible; // TypeRelated + 336
615
	/** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
616
	/** @deprecated - problem is no longer generated, use {@link #AmbiguousType} instead */
616
	int InterfaceAmbiguous =  TypeRelated + 334 + ProblemReasons.Ambiguous; // TypeRelated + 337
617
	int InterfaceAmbiguous =  TypeRelated + 334 + ProblemReasons.Ambiguous; // TypeRelated + 337
617
	/** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
618
	/** @deprecated - problem is no longer generated, use {@link #InternalTypeNameProvided} instead */
618
	int InterfaceInternalNameProvided =  TypeRelated + 334 + ProblemReasons.InternalNameProvided; // TypeRelated + 338
619
	int InterfaceInternalNameProvided =  TypeRelated + 334 + ProblemReasons.InternalNameProvided; // TypeRelated + 338
619
	/** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
620
	/** @deprecated - problem is no longer generated, use {@link #InheritedTypeHidesEnclosingName} instead */
620
	int InterfaceInheritedNameHidesEnclosingName =  TypeRelated + 334 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 339
621
	int InterfaceInheritedNameHidesEnclosingName =  TypeRelated + 334 + ProblemReasons.InheritedNameHidesEnclosingName; // TypeRelated + 339
621
622
622
	// field related problems
623
	// field related problems
Lines 628-642 Link Here
628
	int IllegalModifierCombinationFinalVolatileForField = FieldRelated + 345;
629
	int IllegalModifierCombinationFinalVolatileForField = FieldRelated + 345;
629
	int UnexpectedStaticModifierForField = FieldRelated + 346;
630
	int UnexpectedStaticModifierForField = FieldRelated + 346;
630
631
631
	/** @deprecated - problem is no longer generated, UndefinedType is used instead */
632
	/** @deprecated - problem is no longer generated, use {@link #UndefinedType} instead */
632
	int FieldTypeNotFound =  FieldRelated + 349 + ProblemReasons.NotFound; // FieldRelated + 350
633
	int FieldTypeNotFound =  FieldRelated + 349 + ProblemReasons.NotFound; // FieldRelated + 350
633
	/** @deprecated - problem is no longer generated, NotVisibleType is used instead */
634
	/** @deprecated - problem is no longer generated, use {@link #NotVisibleType} instead */
634
	int FieldTypeNotVisible =  FieldRelated + 349 + ProblemReasons.NotVisible; // FieldRelated + 351
635
	int FieldTypeNotVisible =  FieldRelated + 349 + ProblemReasons.NotVisible; // FieldRelated + 351
635
	/** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
636
	/** @deprecated - problem is no longer generated, use {@link #AmbiguousType} instead */
636
	int FieldTypeAmbiguous =  FieldRelated + 349 + ProblemReasons.Ambiguous; // FieldRelated + 352
637
	int FieldTypeAmbiguous =  FieldRelated + 349 + ProblemReasons.Ambiguous; // FieldRelated + 352
637
	/** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
638
	/** @deprecated - problem is no longer generated, use {@link #InternalTypeNameProvided} instead */
638
	int FieldTypeInternalNameProvided =  FieldRelated + 349 + ProblemReasons.InternalNameProvided; // FieldRelated + 353
639
	int FieldTypeInternalNameProvided =  FieldRelated + 349 + ProblemReasons.InternalNameProvided; // FieldRelated + 353
639
	/** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
640
	/** @deprecated - problem is no longer generated, use {@link #InheritedTypeHidesEnclosingName} instead */
640
	int FieldTypeInheritedNameHidesEnclosingName =  FieldRelated + 349 + ProblemReasons.InheritedNameHidesEnclosingName; // FieldRelated + 354
641
	int FieldTypeInheritedNameHidesEnclosingName =  FieldRelated + 349 + ProblemReasons.InheritedNameHidesEnclosingName; // FieldRelated + 354
641
	
642
	
642
	// method related problems
643
	// method related problems
Lines 650-691 Link Here
650
	int IllegalAbstractModifierCombinationForMethod = MethodRelated + 362;
651
	int IllegalAbstractModifierCombinationForMethod = MethodRelated + 362;
651
	int AbstractMethodInAbstractClass = MethodRelated + 363;
652
	int AbstractMethodInAbstractClass = MethodRelated + 363;
652
	int ArgumentTypeCannotBeVoid = MethodRelated + 364;
653
	int ArgumentTypeCannotBeVoid = MethodRelated + 364;
654
	/** @deprecated - problem is no longer generated, use {@link #CannotAllocateVoidArray} instead */
653
	int ArgumentTypeCannotBeVoidArray = MethodRelated + 365;
655
	int ArgumentTypeCannotBeVoidArray = MethodRelated + 365;
656
	/** @deprecated - problem is no longer generated, use {@link #CannotAllocateVoidArray} instead */
654
	int ReturnTypeCannotBeVoidArray = MethodRelated + 366;
657
	int ReturnTypeCannotBeVoidArray = MethodRelated + 366;
655
	int NativeMethodsCannotBeStrictfp = MethodRelated + 367;
658
	int NativeMethodsCannotBeStrictfp = MethodRelated + 367;
656
	int DuplicateModifierForArgument = MethodRelated + 368;
659
	int DuplicateModifierForArgument = MethodRelated + 368;
657
660
658
	/** @deprecated - problem is no longer generated, UndefinedType is used instead */
661
	/** @deprecated - problem is no longer generated, use {@link #UndefinedType} instead */
659
	int ArgumentTypeNotFound =  MethodRelated + 369 + ProblemReasons.NotFound; // MethodRelated + 370
662
	int ArgumentTypeNotFound =  MethodRelated + 369 + ProblemReasons.NotFound; // MethodRelated + 370
660
	/** @deprecated - problem is no longer generated, NotVisibleType is used instead */
663
	/** @deprecated - problem is no longer generated, use {@link #NotVisibleType} instead */
661
	int ArgumentTypeNotVisible =  MethodRelated + 369 + ProblemReasons.NotVisible; // MethodRelated + 371
664
	int ArgumentTypeNotVisible =  MethodRelated + 369 + ProblemReasons.NotVisible; // MethodRelated + 371
662
	/** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
665
	/** @deprecated - problem is no longer generated, use {@link #AmbiguousType} instead */
663
	int ArgumentTypeAmbiguous =  MethodRelated + 369 + ProblemReasons.Ambiguous; // MethodRelated + 372
666
	int ArgumentTypeAmbiguous =  MethodRelated + 369 + ProblemReasons.Ambiguous; // MethodRelated + 372
664
	/** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
667
	/** @deprecated - problem is no longer generated, use {@link #InternalTypeNameProvided} instead */
665
	int ArgumentTypeInternalNameProvided =  MethodRelated + 369 + ProblemReasons.InternalNameProvided; // MethodRelated + 373
668
	int ArgumentTypeInternalNameProvided =  MethodRelated + 369 + ProblemReasons.InternalNameProvided; // MethodRelated + 373
666
	/** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
669
	/** @deprecated - problem is no longer generated, use {@link #InheritedTypeHidesEnclosingName} instead */
667
	int ArgumentTypeInheritedNameHidesEnclosingName =  MethodRelated + 369 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 374
670
	int ArgumentTypeInheritedNameHidesEnclosingName =  MethodRelated + 369 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 374
668
671
669
	/** @deprecated - problem is no longer generated, UndefinedType is used instead */
672
	/** @deprecated - problem is no longer generated, use {@link #UndefinedType} instead */
670
	int ExceptionTypeNotFound =  MethodRelated + 374 + ProblemReasons.NotFound; // MethodRelated + 375
673
	int ExceptionTypeNotFound =  MethodRelated + 374 + ProblemReasons.NotFound; // MethodRelated + 375
671
	/** @deprecated - problem is no longer generated, NotVisibleType is used instead */
674
	/** @deprecated - problem is no longer generated, use {@link #NotVisibleType} instead */
672
	int ExceptionTypeNotVisible =  MethodRelated + 374 + ProblemReasons.NotVisible; // MethodRelated + 376
675
	int ExceptionTypeNotVisible =  MethodRelated + 374 + ProblemReasons.NotVisible; // MethodRelated + 376
673
	/** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
676
	/** @deprecated - problem is no longer generated, use {@link #AmbiguousType} instead */
674
	int ExceptionTypeAmbiguous =  MethodRelated + 374 + ProblemReasons.Ambiguous; // MethodRelated + 377
677
	int ExceptionTypeAmbiguous =  MethodRelated + 374 + ProblemReasons.Ambiguous; // MethodRelated + 377
675
	/** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
678
	/** @deprecated - problem is no longer generated, use {@link #InternalTypeNameProvided} instead */
676
	int ExceptionTypeInternalNameProvided =  MethodRelated + 374 + ProblemReasons.InternalNameProvided; // MethodRelated + 378
679
	int ExceptionTypeInternalNameProvided =  MethodRelated + 374 + ProblemReasons.InternalNameProvided; // MethodRelated + 378
677
	/** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
680
	/** @deprecated - problem is no longer generated, use {@link #InheritedTypeHidesEnclosingName} instead */
678
	int ExceptionTypeInheritedNameHidesEnclosingName =  MethodRelated + 374 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 379
681
	int ExceptionTypeInheritedNameHidesEnclosingName =  MethodRelated + 374 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 379
679
682
680
	/** @deprecated - problem is no longer generated, UndefinedType is used instead */
683
	/** @deprecated - problem is no longer generated, use {@link #UndefinedType} instead */
681
	int ReturnTypeNotFound =  MethodRelated + 379 + ProblemReasons.NotFound; // MethodRelated + 380
684
	int ReturnTypeNotFound =  MethodRelated + 379 + ProblemReasons.NotFound; // MethodRelated + 380
682
	/** @deprecated - problem is no longer generated, NotVisibleType is used instead */
685
	/** @deprecated - problem is no longer generated, use {@link #NotVisibleType} instead */
683
	int ReturnTypeNotVisible =  MethodRelated + 379 + ProblemReasons.NotVisible; // MethodRelated + 381
686
	int ReturnTypeNotVisible =  MethodRelated + 379 + ProblemReasons.NotVisible; // MethodRelated + 381
684
	/** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
687
	/** @deprecated - problem is no longer generated, use {@link #AmbiguousType} instead */
685
	int ReturnTypeAmbiguous =  MethodRelated + 379 + ProblemReasons.Ambiguous; // MethodRelated + 382
688
	int ReturnTypeAmbiguous =  MethodRelated + 379 + ProblemReasons.Ambiguous; // MethodRelated + 382
686
	/** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
689
	/** @deprecated - problem is no longer generated, use {@link #InternalTypeNameProvided} instead */
687
	int ReturnTypeInternalNameProvided =  MethodRelated + 379 + ProblemReasons.InternalNameProvided; // MethodRelated + 383
690
	int ReturnTypeInternalNameProvided =  MethodRelated + 379 + ProblemReasons.InternalNameProvided; // MethodRelated + 383
688
	/** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
691
	/** @deprecated - problem is no longer generated, use {@link #InheritedTypeHidesEnclosingName} instead */
689
	int ReturnTypeInheritedNameHidesEnclosingName =  MethodRelated + 379 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 384
692
	int ReturnTypeInheritedNameHidesEnclosingName =  MethodRelated + 379 + ProblemReasons.InheritedNameHidesEnclosingName; // MethodRelated + 384
690
693
691
	// import related problems
694
	// import related problems
Lines 695-707 Link Here
695
	int UnusedImport = ImportRelated + 388;
698
	int UnusedImport = ImportRelated + 388;
696
699
697
	int ImportNotFound =  ImportRelated + 389 + ProblemReasons.NotFound; // ImportRelated + 390
700
	int ImportNotFound =  ImportRelated + 389 + ProblemReasons.NotFound; // ImportRelated + 390
698
	/** @deprecated - problem is no longer generated, NotVisibleType is used instead */
701
	/** @deprecated - problem is no longer generated, use {@link #NotVisibleType} instead */
699
	int ImportNotVisible =  ImportRelated + 389 + ProblemReasons.NotVisible; // ImportRelated + 391
702
	int ImportNotVisible =  ImportRelated + 389 + ProblemReasons.NotVisible; // ImportRelated + 391
700
	/** @deprecated - problem is no longer generated, use AmbiguousType is used instead */
703
	/** @deprecated - problem is no longer generated, use {@link #AmbiguousType} instead */
701
	int ImportAmbiguous =  ImportRelated + 389 + ProblemReasons.Ambiguous; // ImportRelated + 392
704
	int ImportAmbiguous =  ImportRelated + 389 + ProblemReasons.Ambiguous; // ImportRelated + 392
702
	/** @deprecated - problem is no longer generated, use InternalTypeNameProvided is used instead */
705
	/** @deprecated - problem is no longer generated, use {@link #InternalTypeNameProvided} instead */
703
	int ImportInternalNameProvided =  ImportRelated + 389 + ProblemReasons.InternalNameProvided; // ImportRelated + 393
706
	int ImportInternalNameProvided =  ImportRelated + 389 + ProblemReasons.InternalNameProvided; // ImportRelated + 393
704
	/** @deprecated - problem is no longer generated, use InheritedTypeHidesEnclosingName is used instead */
707
	/** @deprecated - problem is no longer generated, use {@link #InheritedTypeHidesEnclosingName} instead */
705
	int ImportInheritedNameHidesEnclosingName =  ImportRelated + 389 + ProblemReasons.InheritedNameHidesEnclosingName; // ImportRelated + 394
708
	int ImportInheritedNameHidesEnclosingName =  ImportRelated + 389 + ProblemReasons.InheritedNameHidesEnclosingName; // ImportRelated + 394
706
709
707
	/** @since 3.1 */
710
	/** @since 3.1 */
(-)compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java (-1 / +5 lines)
Lines 108-114 Link Here
108
		if (exceptionType.isTypeVariable()) {
108
		if (exceptionType.isTypeVariable()) {
109
			scope.problemReporter().invalidTypeVariableAsException(exceptionType, this);
109
			scope.problemReporter().invalidTypeVariableAsException(exceptionType, this);
110
			return null;
110
			return null;
111
		}		
111
		}
112
		if (exceptionType.isArrayType() && ((ArrayBinding) exceptionType).leafComponentType == TypeBinding.VOID) {
113
			scope.problemReporter().variableTypeCannotBeVoidArray(this);
114
			return null;
115
		}
112
		if (exceptionType.findSuperTypeErasingTo(TypeIds.T_JavaLangThrowable, true) == null) {
116
		if (exceptionType.findSuperTypeErasingTo(TypeIds.T_JavaLangThrowable, true) == null) {
113
			scope.problemReporter().cannotThrowType(this.type, exceptionType);
117
			scope.problemReporter().cannotThrowType(this.type, exceptionType);
114
			return null;
118
			return null;
(-)compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java (-4 / +13 lines)
Lines 128-139 Link Here
128
		return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
128
		return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
129
129
130
	TypeBinding type = this.resolvedType = getTypeBinding(scope);
130
	TypeBinding type = this.resolvedType = getTypeBinding(scope);
131
	if (this.resolvedType == null)
131
	if (type == null)
132
		return null; // detected cycle while resolving hierarchy	
132
		return null; // detected cycle while resolving hierarchy	
133
	if (!this.resolvedType.isValidBinding()) {
133
	if (!type.isValidBinding()) {
134
		reportInvalidType(scope);
134
		reportInvalidType(scope);
135
		return null;
135
		return null;
136
	}
136
	}
137
	if (type.isArrayType() && ((ArrayBinding) type).leafComponentType == TypeBinding.VOID) {
138
		scope.problemReporter().cannotAllocateVoidArray(this);
139
		return null;
140
	}
141
137
	if (isTypeUseDeprecated(type, scope))
142
	if (isTypeUseDeprecated(type, scope))
138
		reportDeprecatedType(scope);
143
		reportDeprecatedType(scope);
139
	
144
	
Lines 152-163 Link Here
152
		return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
157
		return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
153
158
154
	TypeBinding type = this.resolvedType = getTypeBinding(scope);
159
	TypeBinding type = this.resolvedType = getTypeBinding(scope);
155
	if (this.resolvedType == null)
160
	if (type == null)
156
		return null; // detected cycle while resolving hierarchy	
161
		return null; // detected cycle while resolving hierarchy	
157
	if (!this.resolvedType.isValidBinding()) {
162
	if (!type.isValidBinding()) {
158
		reportInvalidType(scope);
163
		reportInvalidType(scope);
159
		return null;
164
		return null;
160
	}
165
	}
166
	if (type.isArrayType() && ((ArrayBinding) type).leafComponentType == TypeBinding.VOID) {
167
		scope.problemReporter().cannotAllocateVoidArray(this);
168
		return null;
169
	}	
161
	if (isTypeUseDeprecated(type, scope))
170
	if (isTypeUseDeprecated(type, scope))
162
		reportDeprecatedType(scope);
171
		reportDeprecatedType(scope);
163
	
172
	

Return to bug 159939