class SomeClass private constructor() { fun someMethod() { println("Hello"); } companion object { fun useNew(func: SomeClass.() -> Unit) { SomeClass().func() } } } fun main() { var sc: SomeClass? = null SomeClass.useNew { this.someMethod() sc = this // I want this not to be possible } sc?.someMethod() // or at least this }