"failures" tests don't necessarily test type annotations
Steve Sides
steve.sides at oracle.com
Wed Feb 6 10:15:32 PST 2013
I (just now) noticed that many of the tests in typeAnnotations/failures
use jdk7 target set and not TYPE_USE.
/*
* @test
* @bug 6843077 8006775
* @summary test type annotation on void generic methods
* @author Mahmood Ali
* @compile/fail VoidGenericMethod.java
*/
class VoidGenericMethod {
public <T> @A void method() { }
}
@interface A { }
For instance, the above from VoidGenericMethod.java says it tests "type
annotation on void generic methods" but tests a regular annotation.
I'm guessing these tests were written for a build in which TYPE_USE (and
TYPE_PARAMETER) were included in the default set(???).
@Target(TYPE_USE)
@interface A { }
So these don't really test negative uses of type annotations but
regular uses.
Shouldn't these be corrected to use type annotations?
-steve
More information about the type-annotations-dev
mailing list