eclipse-archived/ceylon

Static attributes in interfaces forbidden from having initialisers

Closed this issue · 4 comments

I'm pretty sure this is a limitation that only makes sense when non-static, no? @gavinking ?

ATM I get: statement or initializer may not occur directly in interface body for:

interface StaticInterfaceMethods {
    static Integer attr = 2;
}

Um, I'm not 100% sure. Can interfaces have static fields in Java now?

They always could ;)

OK done, @FroMage, HTH.

Thanks!