Distinguish irrefutable and refutable patterns in the `is` expression
Both refutable and irrefutable is-pattern matches affect definite assignment: - an irrefutable match leaves pattern variables definitely assigned - a refutable match is an error Fixes #25890 Also, we check to see if a constant input makes the result refutable or irrefutable: - If a constant cannot match the pattern, we issue a warning - If a constant always matches a constant pattern, we issue a warning The latter two are subject to compat council approval. Fixes #16099
Showing
想要评论请 注册 或 登录