Skip to content
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

Concrete to abstract classes w/ package private constructors #474

Open
dwijnand opened this issue Feb 18, 2020 · 0 comments
Open

Concrete to abstract classes w/ package private constructors #474

dwijnand opened this issue Feb 18, 2020 · 0 comments

Comments

@dwijnand
Copy link
Collaborator

If/when MiMa understands Scala's notion of "package private" (good old #53) it would be good if the checks for concrete to abstract classes took into consideration that a concrete class with only a package private constructor can safely become abstract. This came up in the Vector rewrite of 2.13.2 (scala/scala#8534), specifically:

    // Vector was final, now sealed, and has no accessible constructor
    ProblemFilters.exclude[AbstractClassProblem]("scala.collection.immutable.Vector"),
...
    ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.immutable.Vector.this"),
    ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.immutable.Vector.apply"),

The missing (previously package private) constructor isn't a problem, as is the apply method only being abstract now instead of concrete.

However, this should also consider that abstract classes can extend concrete classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant