use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
the class InteropTests method testIopExtendsDefaultAccessClassWithOverloading.
@Test
public void testIopExtendsDefaultAccessClassWithOverloading() {
compile("access/JavaDefaultAccessClass4.java");
assertErrors("access/ExtendsDefaultAccessClassWithOverloading", new CompilerError(21, "illegal argument types in invocation of overloaded method or class: there must be exactly one overloaded declaration of 'JavaDefaultAccessClass4' which accepts the given argument types ''"));
}
use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
the class InteropTests method testIopOverrideStaticMethods.
@Test
public void testIopOverrideStaticMethods() {
compile("JavaWithStaticMembers.java");
assertErrors("OverrideStaticMethods", new CompilerError(26, "member refines a non-default, non-formal member: 'topMethod' in 'StaticMethodsOverriding' refines 'topMethod' in 'JavaWithStaticMembers' which is not annotated 'formal' or 'default'"), new CompilerError(28, "member refines a non-default, non-formal member: 'topField' in 'StaticMethodsOverriding' refines 'topField' in 'JavaWithStaticMembers' which is not annotated 'formal' or 'default'"));
}
use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
the class InteropTests method testSealedInterop.
@Test
public void testSealedInterop() {
compile("access/JavaSealed.java");
assertErrors("Sealed", new CompilerError(27, "constructor is not visible: 'JavaSealed' is package private"), new CompilerError(29, "class cannot be instantiated: 'Runtime' does not have a default constructor"), new CompilerError(30, "type constructor is not visible: 'JavaSealed'"));
}
use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
the class InteropTests method testIopDeclareOverloadedMethods.
@Test
public void testIopDeclareOverloadedMethods() {
assertErrors("DeclareOverloadedMethodsErrors", new CompilerError(22, "duplicate declaration: the name 'method' is not unique in this scope (overloaded function must be declared with the 'overloaded' annotation in 'java.lang')"), new CompilerError(23, "duplicate declaration: the name 'method' is not unique in this scope (overloaded function must be declared with the 'overloaded' annotation in 'java.lang')"));
compareWithJavaSource("DeclareOverloadedMethods");
}
use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
the class InteropTests method testIopRefinesDefaultAccessMethodWithShared.
@Test
public void testIopRefinesDefaultAccessMethodWithShared() {
compile("access/JavaAccessModifiers.java");
assertErrors("access/RefinesDefaultAccessMethodWithShared", new CompilerError(22, "non-actual member collides with an inherited member: 'defaultAccessMethod' in 'RefinesDefaultAccessMethodWithShared' refines 'defaultAccessMethod' in 'JavaAccessModifiers' but is not annotated 'actual'"));
}
Aggregations