author | alundblad |
Wed, 26 Aug 2015 09:02:02 +0200 | |
changeset 32337 | c9d3ab9f601c |
parent 27390 | 02221d4ed524 |
permissions | -rw-r--r-- |
27390
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
1 |
/* |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
2 |
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
4 |
* |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
32337 | 7 |
* published by the Free Software Foundation. |
27390
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
8 |
* |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
13 |
* accompanied this code). |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
14 |
* |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
18 |
* |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
21 |
* questions. |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
22 |
*/ |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
23 |
|
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
24 |
/* |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
25 |
* @test |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
26 |
* @bug 6987475 |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
27 |
* |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
28 |
* @summary Order of declarations affects whether abstract method considered overridden |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
29 |
* @compile T6987475pos.java |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
30 |
*/ |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
31 |
|
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
32 |
class T6987475pos { |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
33 |
static abstract class Base<A> { |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
34 |
public void go(String s) { } |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
35 |
public abstract void go(A a); |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
36 |
} |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
37 |
|
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
38 |
static abstract class BaseReverse<A> { |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
39 |
public abstract void go(A a); |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
40 |
public void go(String s) { } |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
41 |
} |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
42 |
|
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
43 |
static class Impl1 extends Base<String> { } |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
44 |
static class Impl2 extends BaseReverse<String> { } |
02221d4ed524
6987475: Order of declarations affects whether abstract method considered overridden
mcimadamore
parents:
diff
changeset
|
45 |
} |