Intertype declaration of inner classes

Issue #166 new
Görel Hedin created an issue

It would be useful to be able to declare inner classes using intertype declaration syntax. This request is originally from Jesper Mattsson at Modelon. His email:

To add an inner class in an AST class, you currently have to write e.g.:

public class AnAstClass {
    public static class InnerClass {
        // ...
    }
}

This is a bit clunky, and you can accidentally change the visibility modifier on AST classes. It would be much more in line with the syntax for other things if you could instead write:

public static class AnAstClass.InnerClass {
    // ...
}

That currently gives a syntax error.

Comments (0)

  1. Log in to comment