我试图实现类DistanceCM和DistanceMM,我希望它们可以互换,只要它们都从Distance继承。 不过,我得到这个错误: "Error:(46, 76) ceylon: type parameter 'Other' of declaration 'Summable' has argument 'Distance' which is not assignable to upper bo
无论何时测试函数(包含test注解的函数)包含失败的断言,断言与抛出异常时的效果相同:将不会执行该函数中的其他代码行。因此,在用'test'注释的函数中断言语句就像普通的Ceylon函数中的普通断言语句一样工作。这runs contrary to the documentation,它声明普通的断言语句可以用于进行单元测试。 因此,运行下面的代码,我能看到的声明myTests1但不'myTests
我正在试着制作一个简单的应用程序,它利用了ceylon.http.server,ceylon.json,ceylon.io模块。 当我编译,我得到这些错误: Error:(4, 8) ceylon: source code imports two different versions of module 'com.redhat.ceylon.langtools.classfile': versio
我有一个枚举抽象类的类型: shared abstract class Foo() of bar|baz {}
并试图检查是否Foo的功能是不是bar: shared void test(Foo foo) {
if (!is bar foo) {
}
}
我得到的错误 incorrect syntax: no viable alternative at token