Created
March 18, 2016 05:03
-
-
Save smarter/507fe5987049addcd977 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class A[T] { | |
object X { | |
def foo(x: T): T = x | |
} | |
} | |
object B extends A[Int] { // Change to String, fail as expected | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Test { | |
B.X.foo(1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment