Add support for mixed named arguments to parameter info popup

Don't display parameter info in square brackets if the caller doesn't
have to use a named argument. This makes the parameter info popup
reflect the new capability introduced with
MixedNamedArgumentsInTheirOwnPosition.

^KT-41645 Fixed
This commit is contained in:
cketti
2020-09-03 12:30:27 +02:00
committed by Vladimir Dolzhenko
parent af6e744b65
commit 91c021c699
4 changed files with 58 additions and 5 deletions
@@ -0,0 +1,12 @@
open class A(x: Int) {
fun m(x: Boolean, y: Int) = 1
fun m(x: Boolean, y: Int, z: Int) = 2
fun d(x: Int) {
m(false, y = 23<caret>)
}
}
/*
Text: (x: Boolean, <highlight>[y: Int]</highlight>), Disabled: false, Strikeout: false, Green: true
Text: (x: Boolean, <highlight>[y: Int]</highlight>, z: Int), Disabled: false, Strikeout: false, Green: false
*/
@@ -0,0 +1,14 @@
// COMPILER_ARGUMENTS: -XXLanguage:-MixedNamedArgumentsInTheirOwnPosition
open class A(x: Int) {
fun m(x: Boolean, y: Int) = 1
fun m(x: Boolean, y: Int, z: Int) = 2
fun d(x: Int) {
m(false, y = 23<caret>)
}
}
/*
Text: (x: Boolean, <highlight>[y: Int]</highlight>), Disabled: false, Strikeout: false, Green: true
Text: (x: Boolean, <highlight>[y: Int]</highlight>, [z: Int]), Disabled: false, Strikeout: false, Green: false
*/