You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Patterns] remove irrelevant specification of pattern type schemas. (#2639)
The pattern type schemas for logical-or, null-check, constant, and
relational patterns were not meaningful because pattern type schemas
are only used in refutable contexts, and these patterns are not
allowed to appear in irrefutable contexts.
In particular, the definition of pattern type schema for constant
patterns was causing confusion because it appeared to cause a
circularity: it defined the pattern type schema for a constant pattern
to be the inferred type of the constant; however text elsewhere
specifies that the type of the constant is inferred based on the type
of the scrutinee, and the pattern type schema is used to infer the
type of the scrutinee. However this wasn't a real problem, because
constant patterns are illegal in precisely the circumstances in whch
pattern type schemas are used.
0 commit comments