Skip to content

Instantly share code, notes, and snippets.

@smarter
Created March 18, 2016 05:04
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 smarter/b0a17472abbbc3e33eab to your computer and use it in GitHub Desktop.
Save smarter/b0a17472abbbc3e33eab to your computer and use it in GitHub Desktop.
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
}
object Test {
B.X.foo(1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment