"Add open to callable" intention introduced #KT-16786 Fixed

This commit is contained in:
shiraji
2017-04-10 01:01:04 +09:00
committed by Mikhail Glukhikh
parent cdb42c989e
commit 83169ad781
27 changed files with 263 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.intentions.AddOpenModifierIntention
@@ -0,0 +1,4 @@
abstract class Foo {
fun<caret> bar() {
}
}
@@ -0,0 +1,4 @@
abstract class Foo {
open fun bar() {
}
}
@@ -0,0 +1,5 @@
// IS_APPLICABLE: false
abstract class Foo {
abstract fun<caret> bar()
}
@@ -0,0 +1,6 @@
// IS_APPLICABLE: false
open class Foo {
open fun<caret> bar() {
}
}
@@ -0,0 +1,7 @@
// IS_APPLICABLE: false
data class Bar(val foo: Int, val bar: Int)
open class Foo {
<caret>var (foo, bar) = Bar(1, 1)
}
+5
View File
@@ -0,0 +1,5 @@
enum class E {
SINGLE;
<caret>fun bar() {}
}
@@ -0,0 +1,5 @@
enum class E {
SINGLE;
open fun bar() {}
}
+4
View File
@@ -0,0 +1,4 @@
open class Foo {
fun<caret> bar() {
}
}
@@ -0,0 +1,4 @@
open class Foo {
open fun bar() {
}
}
+5
View File
@@ -0,0 +1,5 @@
// IS_APPLICABLE: false
interface Foo {
fun<caret> bar()
}
@@ -0,0 +1,9 @@
// IS_APPLICABLE: false
open class Foo {
fun bar() {
fun <caret> foo() {
}
}
}
@@ -0,0 +1,7 @@
// IS_APPLICABLE: false
open class Foo {
fun bar() {
var<caret> foo = 1
}
}
+6
View File
@@ -0,0 +1,6 @@
// IS_APPLICABLE: false
class Foo {
fun<caret> bar() {
}
}
+6
View File
@@ -0,0 +1,6 @@
// IS_APPLICABLE: false
open class Foo {
open fun bar(<caret>foo: Int) {
}
}
+6
View File
@@ -0,0 +1,6 @@
// IS_APPLICABLE: false
open class Foo {
private fun<caret> bar() {
}
}
+3
View File
@@ -0,0 +1,3 @@
open class Foo {
var<caret> bar = 0
}
@@ -0,0 +1,3 @@
open class Foo {
open var bar = 0
}
@@ -0,0 +1,4 @@
sealed class Foo {
fun<caret> bar() {
}
}
@@ -0,0 +1,4 @@
sealed class Foo {
open fun bar() {
}
}