Why does typing out `run` always result in `kotlin...
# stdlib
z
Why does typing out
run
always result in
kotlin.run {}
whereas with
apply
(and others) you just end up with a nice
apply {}
?
j
It doesn't for me. Maybe you happen to have another
run
function imported or declared in the same file?
z
Really? 😮 Its always been like that for me, I dont have any other run
j
Interesting. Before answering, I tried that in whatever file I had open, and I happened to be working in a gradle
buildSrc
dir. Now I just tried again in a regular project file, and indeed I get
kotlin.run
Maybe it has to do with recent Kotlin versions (
buildSrc
is usually older)
z
I think its been like this for at least 5 years for me, I never quite understood why
j
That said, I almost never use
run
. Most of the time if you want to use
run
you probably want to extract a function
z
Yeah, I rarely use it too. But when I do, I always wonder the same thing ^
b
A known ide bug I'm affraid
👍 1
👍🏽 1
z
🎅🏽 This was fixed in Android Studio Flamingo! 🦩
🎉 2