Skip to content

Instantly share code, notes, and snippets.

@OleTraveler
Last active December 23, 2015 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OleTraveler/6644067 to your computer and use it in GitHub Desktop.
Save OleTraveler/6644067 to your computer and use it in GitHub Desktop.
trait A {
def a: String => String
}
trait B {
//TypeOf is something magical
def b: TypeOf[A.a]
}
@OleTraveler
Copy link
Author

If type of A.a changes to Int => Int , then the type of B changes and the compiler will blow up wherever B.b is expecting String => String.

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