i have this code: ``` private fun blah(): Strin...
# intellij
c
i have this code:
Copy code
private fun blah(): String {
        val blah="123"
        return blah
    }
and when i right click on the blah in return blah and select inline, nothing happens
👀 1
m
It's strange, could you provide a bit more information? First, is it a regular kt file, or may be kts one? Second, which version of IDEA / AS is installed on your Mac? Third, which version of Kotlin plugin is used in your project? Fourth, which kind of project is it (IDEA project / Maven / Gradle / something other)?
c
its a kotlin gradle project with the idea rc-2 and the bundled kotlin 1.2-rc
i have now updated to kotlin 1.2-rc-84 and the problem stays
m
Yet cannot reproduce on Windows PC. Will try a bit later on Mac (very strange if it's dependent on OS). Ask again just to be sure: you are in regular kt file and not kts script? Because in kotlin scripts things can work a bit differently.
c
its a normal file in my kotlin project. for me the really suprising thing is that it does not log any error, and that it works in linux. can it maybe be related to a plugin? is there any additional logging that i could turn on?
m
Yet no, but we can try to think about it. So you set caret at
blah
inside
return blah
, press cmd+alt+N, and nothing happens? Strange. Just asked my colleague to try it on Mac -- everything works.
^^^ @Liliia
c
right. cmd alt n does not work and also when i select inline in the refactor popup
on my stable idea (2017.2.6) it works, there i have 1.2.0-beta88 kotlin
will update kotlin there now
m
You can also try whether it's reproduced on empty project. If no, may be it's somehow related with your project environment (but yet I cannot guess how).
c
with my 2017.2 idea it also works with the latest kotlin rc, 1.2-84. and with 2017.3-rc2 it also does not work with an empty gradle based kotlin project.
l
Does it show you inline dialog?
c
no
it shows me an inline popup when i got the the declaration of blah, and then inlining works
l
So it shows you warning with a quick fix on
val blah="123"
line, but not on the next one, right?
c
correct
but even on the line where it shows me the warning, the refactor/inline popup does nothing. and command alt n also
m
Could you check the option in settings (can be found via cmd+alt+A) "show inline dialog for local variables"? Is it on or off?
c
it’s on
i also get the dialog when i inline via the warnings popup
l
One more question, does it actually depend on Gradle? Can you please try to reproduce it with just a simple empty Kotlin project?
c
ok tried. same effect.
it must be related to my settings. is there any file from ~/Library/Preferences/Intell…2017.3/ that i could send you? i can also tar the whole directory if it helps
l
Yes please, let’s try it
c
ok what should i send and where?
the whole prefernces dir is 178m big, happy to email it
so i deleted my preferences dir and idea reimported the preferences from 2017.2, and now the error is gone
i still have the old preferences directory as tgz file is you want to get to the bottom of this
l
Happy that it’s gone. Wrote you PM