Gat Tag
04/10/2024, 12:05 PMdmitriy.novozhilov
04/10/2024, 12:11 PMdmitriy.novozhilov
04/10/2024, 12:13 PMGat Tag
04/10/2024, 12:14 PMdmitriy.novozhilov
04/10/2024, 12:16 PMGat Tag
04/10/2024, 12:20 PMinterface Foo<V>{
val foo: List<V>
}
interface Bar<T>: Foo<Set<T>>{
val bar: T
val tan: Int
}
Compiler plugin generates the invokes
interface Foo<V>{
companion object{
operator fun <V> invoke(foo: List<V>): Foo<V> = TODO()
}
val foo: List<V>
}
interface Bar<T>: Foo<Set<T>>{
companion object{
operator fun <T> invoke(bar: T, tan: Int, foo: List<Set<T>>): Bar<V> = TODO()
}
val bar: T
val tan: Int
}
If someone called the invoke using named arguments, and then someone else refactored the property that would cause a refactoring to the parameter?Gat Tag
04/10/2024, 12:21 PMGat Tag
04/10/2024, 12:22 PMdmitriy.novozhilov
04/10/2024, 12:25 PMinvoke
function will be regenerated, but its usages most likely won't be updated
But the case is very interesting, thank you
I think it potentially can be done in the future
cc @Roman GolyshevGat Tag
04/10/2024, 12:30 PMdmitriy.novozhilov
04/10/2024, 12:31 PMGat Tag
04/10/2024, 12:37 PMGat Tag
04/10/2024, 12:38 PMdmitriy.novozhilov
04/10/2024, 12:41 PMDoes the compiler inform the ide that the name of a parameter declaration of a function is related to the use of that name in a named argument in a call to the same functionIt all comes from IDE. I definitely know about following things, which are checked during refactorings (but there are definitely more): • overloads of the function in case of changing the function signature • properties/parameters with the specific type in case of renaming/moving some class The connection you are asking for is kinda new one, as it happens only with compiler plugins (which are poorly supported sadly) It definitely makes sense, and it's worth to create a feature request for it
Gat Tag
04/10/2024, 12:44 PMdmitriy.novozhilov
04/10/2024, 12:45 PMKTIJ
(Kotlin Intellij IDEA plugin)Gat Tag
04/10/2024, 12:45 PMGat Tag
04/10/2024, 12:47 PMRoman Golyshev
04/10/2024, 12:58 PMfooBar
parameter from barFoo
name somewhere else, and figuring out the correct rename is impossible at this point
Please, create an issue with your request on our YouTrack (KTIJ
project), and we’ll see if there’s something that can be done about it 🙏Roman Golyshev
04/10/2024, 1:00 PMif a compiler plugin can generate kdocs that ide understands in its completion menuCould you please elaborate a little bit here? Do you want to be able to generate KDoc for existing declarations, or for the generated ones?
Gat Tag
04/10/2024, 1:01 PMGat Tag
04/10/2024, 1:03 PMGat Tag
04/10/2024, 1:04 PMRoman Golyshev
04/10/2024, 1:06 PMdmitriy.novozhilov
04/10/2024, 1:07 PMGat Tag
04/10/2024, 1:07 PMGat Tag
04/10/2024, 1:07 PMdmitriy.novozhilov
04/10/2024, 1:08 PMKT
projectGat Tag
04/10/2024, 1:08 PMRoman Golyshev
04/11/2024, 11:51 AMGat Tag
04/11/2024, 1:28 PMRoman Golyshev
04/15/2024, 8:16 AM