langtools/test/tools/javac/staticImport/Shadow.java
author duke
Wed, 05 Jul 2017 23:01:50 +0200
changeset 44228 e46434c65a2b
parent 28705 675cb37e74a8
permissions -rw-r--r--
Merge

/*
 * @test /nodynamiccopyright/
 * @bug 5017254
 * @summary compiler fails to shadow inapplicable method with static import
 * @author gafter
 *
 * @compile/fail/ref=Shadow.out -XDrawDiagnostics   Shadow.java
 */

package shadow;

import static shadow.T1.*;
import static shadow.T2.m1;

class T1 {
    public static void m1() {}
}

class T2 {
    public static void m1(int i) {}
}

class Test {
    void foo() {
        m1(); // <-- is this an error?
    }
}