use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class InteropTests method testIopExtendsDefaultAccessClassWithOverloading.
@Test
public void testIopExtendsDefaultAccessClassWithOverloading() {
compile("access/JavaDefaultAccessClass4.java");
assertErrors("access/ExtendsDefaultAccessClassWithOverloading", new CompilerError(21, "ambiguous invocation of overloaded method or class: there must be exactly one overloaded declaration of 'JavaDefaultAccessClass4' that accepts the given argument types ''"));
}
use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class InteropTests method testIopRefinesDefaultAccessMethodInAnotherPkg.
@Test
public void testIopRefinesDefaultAccessMethodInAnotherPkg() {
compile("access/JavaAccessModifiers.java");
assertErrors("RefinesDefaultAccessMethodInAnotherPkg", new CompilerError(27, "refined declaration is not visible: 'defaultAccessMethod' in 'RefinesDefaultAccessMethodInAnotherPkg' refines 'defaultAccessMethod' in 'JavaAccessModifiers'"));
}
use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class InteropTests method testSealedInterop.
@Test
public void testSealedInterop() {
compile("access/JavaSealed.java");
assertErrors("Sealed", new CompilerError(27, "package private constructor is not visible: 'JavaSealed'"), 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 com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
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'"), new CompilerError(28, "member refines a non-default, non-formal member: 'topField' in 'StaticMethodsOverriding' refines 'topField' in 'JavaWithStaticMembers'"));
}
use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class InteropTests method testAnnotationInterop.
@Test
public void testAnnotationInterop() {
compile("JavaAnnotation.java");
compareWithJavaSource("AnnotationInterop");
assertErrors("AnnotationInteropErrors", new CompilerError(2, "function or value does not exist: 'javaAnnotationNoTarget__TYPE'"), new CompilerError(3, "function or value does not exist: 'javaAnnotationNoTarget__CONSTRUCTOR'"), new CompilerError(6, "function or value does not exist: 'javaAnnotationNoTarget__FIELD'"), new CompilerError(7, "function or value does not exist: 'javaAnnotationNoTarget__GETTER'"), new CompilerError(8, "function or value does not exist: 'javaAnnotationNoTarget__SETTER'"), new CompilerError(11, "annotated program element does not satisfy annotation constraint: 'FunctionDeclaration' is not assignable to 'Nothing'"), new CompilerError(11, "no target for javaAnnotationNoTarget annotation: @Target of @interface JavaAnnotationNoTarget lists [] but annotated element tranforms to [METHOD]"), new CompilerError(12, "function or value does not exist: 'javaAnnotationNoTarget__PARAMETER'"), new CompilerError(14, "function or value does not exist: 'javaAnnotationNoTarget__LOCAL_VARIABLE'"), new CompilerError(19, "function or value does not exist: 'javaAnnotationNoTarget__ANNOTATION_TYPE'"), new CompilerError(21, "illegal annotation argument: must be a literal value, metamodel reference, annotation instantiation, or parameter reference"));
}
Aggregations