Skip to content

Replace scala.Cloneable/scala.Serializable types with type aliases to java.lang.Cloneable/java.io.Serializable #9080

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
scabug opened this issue Jan 13, 2015 · 4 comments

Comments

@scabug
Copy link

scabug commented Jan 13, 2015

Convert scala.Cloneable and scala.Serializable to simple type aliases for java.lang.Cloneable and java.io.Serializable.

The current state has caused confusion and a few issues, because the Scala types are subtypes of the Java types, but not the other way around.

To avoid breakage, the compiler should not fail when discovering the same parents iff those parents are Cloneable/Serializable. Instead a warning should be issued, suggesting that the superfluous parent should be dropped.

Jason mentioned another potential incompatibility with overloaded methods: Two methods could become identical after this change. Consensus seems to be that this scenario is highly unlikely – a dbuild run should make sure that such code doesn't exist in the wild.

@scabug
Copy link
Author

scabug commented Jan 13, 2015

Imported From: https://issues.scala-lang.org/browse/SI-9080?orig=1
Reporter: @soc
Affected Versions: 2.10.4, 2.11.4

@scabug
Copy link
Author

scabug commented Jul 18, 2016

@smarter
Copy link
Member

smarter commented Sep 17, 2017

For the record, there's a PR for that (scala/scala#5288, and also scala/scala#5520), but it's been abandoned, someone would have to pick it up.

smarter added a commit to smarter/scala that referenced this issue Jun 5, 2018
Fixes scala/bug#9080.

This commit is adapted from scala#5520 and is thus:

Co-authored-by: Simon Ochsenreither <[email protected]>
smarter added a commit to smarter/scala that referenced this issue Jun 5, 2018
Fixes scala/bug#9080.

This commit is adapted from scala#5288 and is thus:

Co-authored-by: Simon Ochsenreither <[email protected]>
smarter added a commit to smarter/scala that referenced this issue Jun 6, 2018
Fixes scala/bug#9080.

This commit is adapted from scala#5288 and is thus:

Co-authored-by: Simon Ochsenreither <[email protected]>
smarter added a commit to smarter/scala that referenced this issue Jun 6, 2018
Fixes scala/bug#9080.

This commit is adapted from scala#5288 and is thus:

Co-authored-by: Simon Ochsenreither <[email protected]>
smarter added a commit to smarter/scala that referenced this issue Jun 6, 2018
Fixes scala/bug#9080.

This commit is adapted from scala#5288 and is thus:

Co-authored-by: Simon Ochsenreither <[email protected]>
smarter added a commit to smarter/scala that referenced this issue Jun 6, 2018
Fixes scala/bug#9080.

This commit is adapted from scala#5288 and is thus:

Co-authored-by: Simon Ochsenreither <[email protected]>
@lrytz lrytz modified the milestones: Backlog, 2.13.0-RC1 Jun 7, 2018
@lrytz
Copy link
Member

lrytz commented Jun 7, 2018

scala/scala#6729 can be adapted and re-opened once M5 is the new STARR.

smarter added a commit to smarter/scala that referenced this issue Aug 29, 2018
Fixes scala/bug#9080.

This commit is adapted from scala#5288 and is thus:

Co-authored-by: Simon Ochsenreither <[email protected]>
smarter added a commit to smarter/scala that referenced this issue Aug 29, 2018
Fixes scala/bug#9080.

This commit is adapted from scala#5288 and is thus:

Co-authored-by: Simon Ochsenreither <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants