Skip to content

Instantly share code, notes, and snippets.

@pomadchin
Created December 1, 2019 17:28
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 pomadchin/8fd5f5b5bfb053370c699ec5577c8c1b to your computer and use it in GitHub Desktop.
Save pomadchin/8fd5f5b5bfb053370c699ec5577c8c1b to your computer and use it in GitHub Desktop.
class Foo {
private def isFoo = true
def boo(other: Foo) {
if (other.isFoo) {
// ...
}
}
}
class Foo {
private[this] def isFoo = true
def boo(other: Foo) {
if (other.isFoo) { // this line won't compile
// ...
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment