提交 4b7cd9ae 编写于 作者: M mcimadamore

8008337: Write test to check for compiler error when static method in...

8008337: Write test to check for compiler error when static method in interface is called via super()
Reviewed-by: mcimadamore
Contributed-by: sonali.goel@oracle.com
上级 9950826c
/**
* @test /nodynamiccopyright/
* @bug 8008337
* @author sogoel
* @summary static method is called via super
* @compile/fail/ref=StaticMethodNegTest.out -XDrawDiagnostics StaticMethodNegTest.java
*/
interface A {
static String m() {
return "A";
}
}
interface B {
static String m() {
return "B";
}
}
interface AB extends A, B {
static String m() {
return A.super.m();
}
}
StaticMethodNegTest.java:23:12: compiler.err.not.encl.class: A
1 error
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册