Summary: Static constructors not allowed in interfaces
--- Comment #0 from Chris Wright <dhase...@gmail.com> 2009-09-18 07:32:04 PDT
Interfaces can have const fields, which are implicitly static. They can have
static fields that are not const.
Let's take this example (from ANTLR):
const int EOF = -1;
static Token EOF_TOKEN;
static this ()
EOF_TOKEN = new CommonToken(EOF);
This produces an error saying that _staticCtor1 is not abstract.
The workaround is to move the static constructor out of the interface. This is
not problematic; it is merely inconsistent.
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------