8006119: update javac to follow latest spec for repeatable annotations

Reviewed-by: darcy
This commit is contained in:
Jonathan Gibbons 2013-01-14 13:50:01 -08:00
parent 9e3a121357
commit a2f594bf74
71 changed files with 243 additions and 675 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -22,17 +22,16 @@
*/
// key: compiler.err.duplicate.annotation.invalid.repeated
// key: compiler.err.invalid.containedby.annotation.elem.nondefault
//
// key: compiler.err.invalid.repeatable.annotation.elem.nondefault
// We need an almost valid containing annotation. The easiest way to get
// one close enough to valid is by forgetting a default.
import java.lang.annotation.*;
@ContainedBy(Annos.class)
@Repeatable(Annos.class)
@interface Anno { }
@ContainerFor(Anno.class)
@interface Annos { Anno[] value(); String foo(); }
@Anno