Skip to content

Instantly share code, notes, and snippets.

@jivimberg
Created June 11, 2018 22:40
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 jivimberg/3fd70a9bd69632c2275d14e24c0e7baa to your computer and use it in GitHub Desktop.
Save jivimberg/3fd70a9bd69632c2275d14e24c0e7baa to your computer and use it in GitHub Desktop.
class Person() {
private lateinit var _other: Person
private constructor(_other: Person) : this() {
this._other = _other
}
val other: Person
get() {
if (!::_other.isInitialized) {
_other = Person(this)
}
return _other
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment