-
Notifications
You must be signed in to change notification settings - Fork 135
Labels
typing semanticstyping-module features, spec compliance, etctyping-module features, spec compliance, etc
Milestone
Description
We already support simple cases of bare type aliases (e.g. MyInt = int) if they fall out correctly from evaluating the RHS as a value expression. But for more complex (and useful!) cases (e.g. MyType = int | str) we fail because we evaluate the RHS as a value expression and it needs to be evaluated as a type expression.
This requires some heuristics to decide what assignments should be treated as type aliases. (We should explore what other type checkers do here.)
It will also require a decision about how to handle the use of something we have decided is a type alias, in a value expression. Is this forbidden? Or do we need to have two types for that particular name, one value-expression type and one type-expression type?
Object905, merlinz01, camUrban, cmp0xff and GtrMo
Sub-issues
Metadata
Metadata
Assignees
Labels
typing semanticstyping-module features, spec compliance, etctyping-module features, spec compliance, etc