Added error 'public member should specify type' and quick fix
This commit is contained in:
@@ -164,3 +164,8 @@ fun f(): Int {
|
||||
}
|
||||
|
||||
fun f(): Int = if (1 < 2) 1 else returnNothing()
|
||||
|
||||
public fun <!PUBLIC_MEMBER_SHOULD_SPECIFY_TYPE!>f<!>() = 1
|
||||
class B() {
|
||||
protected fun <!PUBLIC_MEMBER_SHOULD_SPECIFY_TYPE!>f<!>() = "ss"
|
||||
}
|
||||
@@ -25,4 +25,5 @@ class Test() {
|
||||
<!UNRESOLVED_REFERENCE!>$b<!> = <!UNRESOLVED_REFERENCE!>$a<!>
|
||||
a = <!UNRESOLVED_REFERENCE!>$b<!>
|
||||
}
|
||||
public val <!PUBLIC_MEMBER_SHOULD_SPECIFY_TYPE!>i<!> = 1
|
||||
}
|
||||
@@ -3,7 +3,7 @@ class Outer() {
|
||||
val outer: Outer get() = this@Outer
|
||||
}
|
||||
|
||||
public val x = Inner()
|
||||
public val x : Inner = Inner()
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
open class Base() {
|
||||
public val plain = 239
|
||||
val plain = 239
|
||||
public val read : Int
|
||||
get() = 239
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Outer() {
|
||||
public val s = "xyzzy"
|
||||
val s = "xyzzy"
|
||||
|
||||
open class InnerBase(public val name: String) {
|
||||
}
|
||||
@@ -7,7 +7,7 @@ class Outer() {
|
||||
class InnerDerived(): InnerBase(s) {
|
||||
}
|
||||
|
||||
public val x = InnerDerived()
|
||||
val x = InnerDerived()
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Add return type declaration" "true"
|
||||
namespace a
|
||||
|
||||
class A() {
|
||||
protected fun <caret>foo() : Int = 1
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Add return type declaration" "true"
|
||||
namespace a
|
||||
|
||||
class A() {
|
||||
public fun <caret>foo() : String = "a"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Add return type declaration" "true"
|
||||
namespace a
|
||||
|
||||
import java.util.List
|
||||
|
||||
public val <caret>l : List<Int>? = java.util.Collections.emptyList<Int>()
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Add return type declaration" "false"
|
||||
namespace a
|
||||
|
||||
class A() {
|
||||
internal protected fun <caret>foo() = 1
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Add return type declaration" "true"
|
||||
namespace a
|
||||
|
||||
class A() {
|
||||
protected fun <caret>foo() = 1
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Add return type declaration" "false"
|
||||
namespace a
|
||||
|
||||
class A() {
|
||||
public fun <caret>foo()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Add return type declaration" "true"
|
||||
namespace a
|
||||
|
||||
class A() {
|
||||
public fun <caret>foo() = "a"
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Add return type declaration" "true"
|
||||
namespace a
|
||||
|
||||
public val <caret>l = java.util.Collections.emptyList<Int>()
|
||||
Reference in New Issue
Block a user