<@U0ANUS2BA>: Regarding refactoring "fields": Look...
# announcements
t
@udalov: Regarding refactoring "fields": Looks like I got my terminology wrong, field is not the term. I guess I'm looking for the equivalent refactoring capability described below, which doesn't appear to be there, so that:
Copy code
//Before
class MyClass() : SomeLibrary {
    override fun someLibraryInitMethod() {
        var theSomething = newSomething()
    }
	
	private fun useTheSomethingLater() {
        theSomething.doSomething() //in error since theSomething isn't in scope
    }
	...
becomes (after putting cursor on "theSomething" and selecting "Extract ...")
Copy code
//After
class MyClass() {
	private lateinit var something : Something

    override fun someLibraryInitMethod() {
        theSomething = newSomething()
    }
	
	private fun useTheSomethingLater() {
        theSomething.doSomething() //now not in error
    }
}
Or perhaps there is a better way to code that in general with Kotlin, avoiding the concern?