Skip to content

Instantly share code, notes, and snippets.

@stevej
Created September 4, 2008 18:41
Show Gist options
  • Save stevej/8842 to your computer and use it in GitHub Desktop.
Save stevej/8842 to your computer and use it in GitHub Desktop.
type Bar = String // <-- compiler error
class Foo {
def get: Bar = "hello"
}
class Baz {
val foo = new FooImpl()
def bar: Bar = foo.get() // <-- compiler error if type Bar is defined inside of Foo
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment