Skip to content

Are aliases supposed to work in (Alias)QualifiedNames? #67368

Discussion options

You must be logged in to vote

Compiler behavior seems to be correct here. The point of an alias is to look up something in the global namespace of that set of references. The set of references has no 'MySystem', so it errors. The 'MySystem' alias isn't something found in something else. It's for simple name lookup within it's lexical scope. You don't have a simple name here, so it shouldn't even be referenced.

From one point of view alias is just a placeholder for the thing it understudies

Definitely not how the language sees it :)

It's not like there's a prepass replacing that identifier with the thing on the RHS. Instead, names are looked up. If they happen to bind to the alias using that lookup logic, at that poi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@CyrusNajmabadi
Comment options

Answer selected by DoctorKrolic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants