Created
March 18, 2016 05:04
-
-
Save smarter/b0a17472abbbc3e33eab 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 { | |
type T | |
object X { | |
def foo(x: T): T = x | |
} | |
} | |
object B extends A { | |
type T = Int // Change to String, should fail but doesn't | |
} |
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