Skip to content

Fix #11118: check irrefutable pattern def in 3.0 #11131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

liufengyun
Copy link
Contributor

Fix #11118: check irrefutable pattern def in 3.0

After #10793, we can perform the check in 3.0

@liufengyun liufengyun force-pushed the fix-i11118 branch 3 times, most recently from 0a2df5b to 83f7c71 Compare January 18, 2021 10:31
@liufengyun
Copy link
Contributor Author

@sjrd Could you please advise how to fix the following error in managed scala.js code:

Error:  -- Error: /__w/dotty/dotty/out/bootstrap/scala3-compiler-bootstrapped/scala-3.0.0-RC1/src_managed/main/scalajs-ir-src/org/scalajs/ir/Trees.scala:1149:34 
Error:  1149 |        val StringLiteral(name) = propName
Error:       |                                  ^^^^^^^^
Error:       |pattern's type org.scalajs.ir.Trees.StringLiteral is more specialized than the right hand side expression's type org.scalajs.ir.Trees.Tree
Error:       |
Error:       |If the narrowing is intentional, this can be communicated by adding `: @unchecked` after the expression.

@liufengyun
Copy link
Contributor Author

Close for now, enabling it in 3.0 seems problematic, it's better to delay until 3.1.

@liufengyun liufengyun closed this Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

extractor error message is not clear
1 participant