use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class ModelLoaderTests method bogusModelAnnotationsTopLevelMethod.
@Test
public void bogusModelAnnotationsTopLevelMethod() {
compile("bogusTopLevelMethodNoMethod_.java", "bogusTopLevelMethodMissingType_.java", "bogusTopLevelMethodInvalidType_.java", "bogusTopLevelMethodNotStatic_.java");
assertErrors("bogusTopLevelMethodUser", new CompilerError(2, "Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving toplevel method com.redhat.ceylon.compiler.java.test.model::bogusTopLevelMethodNoMethod: static method missing"), new CompilerError(2, "Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving toplevel method com.redhat.ceylon.compiler.java.test.model::bogusTopLevelMethodNotStatic: method is not static"), new CompilerError(2, "Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving type of toplevel method for com.redhat.ceylon.compiler.java.test.model::bogusTopLevelMethodMissingType:\n" + " Could not find type 'com.redhat.ceylon.compiler.java.test.model.MissingType'"), new CompilerError(2, "Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n" + " Error while parsing type of toplevel method for com.redhat.ceylon.compiler.java.test.model::bogusTopLevelMethodInvalidType:\n" + " Expecting word but got AND"), new CompilerError(3, "could not determine type of function or value reference: 'bogusTopLevelMethodNoMethod': Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving toplevel method com.redhat.ceylon.compiler.java.test.model::bogusTopLevelMethodNoMethod: static method missing"), new CompilerError(4, "could not determine type of function or value reference: 'bogusTopLevelMethodNotStatic': Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving toplevel method com.redhat.ceylon.compiler.java.test.model::bogusTopLevelMethodNotStatic: method is not static"), new CompilerError(5, "could not determine type of function or value reference: 'bogusTopLevelMethodMissingType': Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving type of toplevel method for com.redhat.ceylon.compiler.java.test.model::bogusTopLevelMethodMissingType:\n" + " Could not find type 'com.redhat.ceylon.compiler.java.test.model.MissingType'"), new CompilerError(6, "could not determine type of function or value reference: 'bogusTopLevelMethodInvalidType': Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n" + " Error while parsing type of toplevel method for com.redhat.ceylon.compiler.java.test.model::bogusTopLevelMethodInvalidType:\n" + " Expecting word but got AND"));
}
use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class IssuesTests_1500_1999 method testBug1882_JDK8.
@Test
public void testBug1882_JDK8() {
Assume.assumeTrue("Runs on JDK8", JDKUtils.jdk == JDKUtils.JDK.JDK8);
assertErrors("bug18xx/bug1882/module", new CompilerError(Kind.WARNING, "module.ceylon", 3, "You import JDK7, which is provided by the JDK8 you are running on, but we cannot check that you are not using any JDK8-specific classes or methods. Upgrade your import to JDK8 if you depend on JDK8 classes or methods."));
}
use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class IssuesTests_1000_1499 method testBug1180.
@Test
public void testBug1180() {
compile("bug11xx/Bug1180_1.ceylon");
assertErrors("bug11xx/Bug1180_2", new CompilerError(25, "ambiguous invocation of overloaded method or class: there must be exactly one overloaded declaration of 'ArrayList' that accepts the given argument types '{Bug1180Person*}'"), new CompilerError(25, "class alias may not alias overloaded class"));
}
use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class InteropTests method testIopCallsDefaultAccessClassInAnotherPkg.
@Test
public void testIopCallsDefaultAccessClassInAnotherPkg() {
compile("access/JavaAccessModifiers.java");
compile("access/JavaDefaultAccessClass3.java");
assertErrors("CallsDefaultAccessClassInAnotherPkg", new CompilerError(21, "imported declaration is not shared: 'JavaDefaultAccessClass'"), new CompilerError(22, "imported declaration is not shared: 'JavaDefaultAccessClass2'"), new CompilerError(28, "type is not visible: 'JavaDefaultAccessClass'"), new CompilerError(29, "type is not visible: 'JavaDefaultAccessClass2'"), new CompilerError(30, "type constructor is not visible: 'JavaDefaultAccessClass3'"));
}
use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class InteropTests method testIopRefinesDefaultAccessMethodWithActual.
@Test
public void testIopRefinesDefaultAccessMethodWithActual() {
compile("access/JavaAccessModifiers.java");
assertErrors("access/RefinesDefaultAccessMethodWithActual", new CompilerError(22, "actual declaration must be shared: 'defaultAccessMethod'"));
}
Aggregations