Skip to content

Conversation

@viktorklang
Copy link
Contributor

….12.x

Includes tests to verify the toString representations.

@scala-jenkins scala-jenkins added this to the 2.11.9 milestone Mar 22, 2016
….12.x

Includes tests to verify the toString representations.
@viktorklang
Copy link
Contributor Author

@retronym
Copy link
Member

LGTM

Thanks!

@retronym
Copy link
Member

/rebuild

@lrytz
Copy link
Member

lrytz commented Mar 23, 2016

IDE failure due to scala/scala-dev#104

@lrytz lrytz merged commit 4ef1429 into scala:2.11.x Mar 23, 2016
@viktorklang
Copy link
Contributor Author

Thanks Lukas!

@lrytz
Copy link
Member

lrytz commented Mar 23, 2016

btw, since i went trough the exercise of understanding the binary compatibility impact, here's why i think it's safe. adding a concrete method to a trait requires re-compiling all sublcasses, here's an what happens otherwise:

➜ cat A.scala
trait A {
  override def toString = "hjai"
}
➜ cat B.scala
class C extends A
object Test extends App {
  println((new C).toString)
}
➜ scalac A.scala B.scala
➜ scala Test
hjai
➜ rm A*.class
➜ cat A1.scala
trait A {
  //override def toString = "hjai"
}
➜ scalac A1.scala
➜ scala Test
java.lang.ClassNotFoundException: A$class
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

trait Promise[T] is private[concurrent] and its subtypes are

  • either also private (and being recompiled as part of the same codebase)
  • class DefaultPromise is a class, so the mix-in is generated

so it looks safe.

@viktorklang
Copy link
Contributor Author

@lrytz yes, exactly. That's why I put the code in that trait and not the Future-trait itself :)

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.

5 participants