Created
October 2, 2012 15:24
-
-
Save udalov/3820097 to your computer and use it in GitHub Desktop.
Multiple constructors workaround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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