Skip to content

Incorrect Space difference in pattern matching exhaustivity #4880

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
abeln opened this issue Jul 31, 2018 · 3 comments · Fixed by #4897
Closed

Incorrect Space difference in pattern matching exhaustivity #4880

abeln opened this issue Jul 31, 2018 · 3 comments · Fixed by #4897

Comments

@abeln
Copy link
Contributor

abeln commented Jul 31, 2018

Details here: #4869 (comment)

@liufengyun
Copy link
Contributor

More specifically, the following code should get a warning, but it doesn't:

abstract class AbstractFile
class PlainFile(path: String) extends AbstractFile
class VirtualFile(name: String) extends AbstractFile
abstract class ZipArchive(path: String) extends AbstractFile {
  sealed abstract class Entry(name: String) extends VirtualFile(name)
  class DirEntry(path: String) extends Entry(path)
}

object Test {
  def foo(file: AbstractFile) =  file match {
    case ze: ZipArchive#Entry =>
  }
}

@liufengyun liufengyun self-assigned this Jul 31, 2018
@abeln
Copy link
Contributor Author

abeln commented Aug 3, 2018

Just to keep track of things, this is blocking #4869

@liufengyun
Copy link
Contributor

I'll work on this during the weekend to unblock #4869.

liufengyun added a commit to dotty-staging/dotty that referenced this issue Aug 5, 2018
liufengyun added a commit to dotty-staging/dotty that referenced this issue Aug 7, 2018
Blaisorblade pushed a commit to dotty-staging/dotty that referenced this issue Aug 12, 2018
Blaisorblade added a commit that referenced this issue Aug 13, 2018
Fix #4880: always instantiate prefix tvar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants