| 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 |
/** |
| 14 |
* This code contains missing types and generic types with incorrect parameters. |
| 15 |
* The desired behavior is specified in the javadoc for package |
| 16 |
* javax.lang.model.element: in general, missing types should be replaced |
| 17 |
* by empty types with the same name. |
| 18 |
*/ |
| 19 |
interface IFoo {} |
| 20 |
interface IBar<T1> {} |
| 21 |
|
| 22 |
class Negative4 { |
| 23 |
// Zork is unknown |
| 24 |
Zork zorkRaw() { return null; } |
| 25 |
Zork<String> zorkOfString() { return null; } |
| 26 |
|
| 27 |
// IFoo does not take a type parameter |
| 28 |
IFoo<String> ifooOfString() { return null; } |
| 29 |
|
| 30 |
// IBar has one type parameter |
| 31 |
IBar ibarRaw() { return null; } |
| 32 |
IBar<String, Object> ibarOfT1T2() { return null; } |
| 33 |
} |