Skip to content

Instantly share code, notes, and snippets.

@udalov
Created October 2, 2012 15:24
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 udalov/3820097 to your computer and use it in GitHub Desktop.
Save udalov/3820097 to your computer and use it in GitHub Desktop.
Multiple constructors workaround
class A() {
var state: Any
}
fun A(state: Any): A {
val a = A()
a.state = state
return a
}
fun A(..., ...): A {
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment