| 1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2007 BEA Systems, Inc. |
| 3 |
* |
| 4 |
* This program and the accompanying materials |
| 5 |
* are made available under the terms of the Eclipse Public License 2.0 |
| 6 |
* which accompanies this distribution, and is available at |
| 7 |
* https://www.eclipse.org/legal/epl-2.0/ |
| 8 |
* |
| 9 |
* SPDX-License-Identifier: EPL-2.0 |
| 10 |
*******************************************************************************/ |
| 11 |
package targets.negative.pa; |
| 12 |
|
| 13 |
import targets.negative.pz.*; |
| 14 |
|
| 15 |
/** |
| 16 |
* This code is syntactic but contains semantic errors due to missing types. |
| 17 |
* The desired behavior is specified in the javadoc for package |
| 18 |
* javax.lang.model.element: in general, missing types should be replaced |
| 19 |
* by empty types with the same name. |
| 20 |
*/ |
| 21 |
@interface Anno1 { |
| 22 |
|
| 23 |
} |
| 24 |
@interface Anno4 { |
| 25 |
int value(); |
| 26 |
} |
| 27 |
class Negative2 { |
| 28 |
@Anno2(123) void m1(); // Anno2 is in pz and is not public |
| 29 |
@Anno1 @FakeAnno3 void m2(); // FakeAnno3 is undefined |
| 30 |
@Anno2(456) @FakeAnno3 void m3(); // Anno2 is not visible and FakeAnno3 is undefined |
| 31 |
@Anno4("notAnInt") void m4(); // Anno4 takes an int value |
| 32 |
} |