Improve remove/specify type intentions in Explicit API mode

Do not suggest to remove type for public declarations

 #KT-38915 Fixed

Do not show intention to specify type when corresponding quickfix is available

 #KT-39026 Fixed
This commit is contained in:
Leonid Startsev
2020-09-08 17:34:53 +03:00
parent 5f0e7c3c3f
commit bc432ecb85
8 changed files with 71 additions and 1 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.intentions.RemoveExplicitTypeIntention
@@ -0,0 +1,4 @@
// COMPILER_ARGUMENTS: -Xexplicit-api=strict
// IS_APPLICABLE: true
internal fun foo(): <caret>Int = 42
@@ -0,0 +1,4 @@
// COMPILER_ARGUMENTS: -Xexplicit-api=strict
// IS_APPLICABLE: true
internal fun foo() = 42
@@ -0,0 +1,4 @@
// COMPILER_ARGUMENTS: -Xexplicit-api=strict
// IS_APPLICABLE: false
public fun foo(): <caret>Int = 42