Open samwgoldman opened 3 weeks ago
Should we extend the definition of "qualified name" to also include class members?
Yes, I think that would be a good clarification. This section focuses primarily on the syntactic rules for type expressions and intentionally omits some of the detailed semantic rules because they are covered in more detail elsewhere in the spec. That said, I agree that there's room for additional clarity in the notes section here.
Yes, this is a good point; I overlooked this possibility when I wrote that text.
The wonderfully useful specification of type annotation expressions describes what kinds of expressions are valid type annotations.
I believe the spec does not include a case which type checkers support, although as we will see this comes down to semantics :)
The
A.B
annotation seems to fall under thename
rule:The spec helpfully continues:
The concept of a "qualified name" occurs only in this section, and the parenthetical explanation serves as it's most precise definition, as far as I can tell.
Should we extend the definition of "qualified name" to also include class members? Or maybe I should read the class as a "module" or a "package" and the existing definition suffices?