Simplifying access to nested type names #9436
-
I'm writing a lot of code that has to refer to nested classes in generated code, stuff like Having to qualify the type names (and there's a large number of these) with So would it be feasible to introduce something akin to Perhaps something like this (reusing an existing keyword) using typeof JuliaParser; Then it would be possible (to access nested class names without qualification, much as we can already do for static. I know that today we can do this: using SourceContext = JuliaParser.SourceContext; But when there are a great many nested class this becomes burdensome. Thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
That's just using static Program;
class Program
{
static void Main()
{
}
public class Nested {}
}
class Other
{
Nested n = new(); // Works just fine.
} |
Beta Was this translation helpful? Give feedback.
-
You can define alias names in your local file... or globally using JuliaParserContext = JuliaParser.SourceContext; |
Beta Was this translation helpful? Give feedback.
That's just
using static
: