
enum Xyzzy {
    ZERO,
    ONE,
    TWO,
    THREE;
    
    public string success() {
        return this.to_string();
    }
    
    public string fail() {
        return to_string();
    }
    
    public string no_this() {
        return fail();
    }
    
    /* If this is declared, the problem goes away.
    public string to_string() {
        return "foo";
    }
    */
}

void main() {
    stdout.printf("%s\n", Xyzzy.ZERO.to_string());
    stdout.printf("%s\n", Xyzzy.ONE.success());
    stdout.printf("%s\n", Xyzzy.TWO.fail());
    stdout.printf("%s\n", Xyzzy.THREE.no_this());
}

