JS: prohibit referencing noImpl property from non-external declarations. See KT-15306
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNREACHABLE_CODE
|
||||
|
||||
val prop: String = <!CALL_TO_NO_IMPL_FROM_NON_EXTERNAL_DECLARATION!>noImpl<!>
|
||||
|
||||
val prop2: String
|
||||
get() = <!CALL_TO_NO_IMPL_FROM_NON_EXTERNAL_DECLARATION!>noImpl<!>
|
||||
|
||||
fun foo(x: Int, y: String = <!CALL_TO_NO_IMPL_FROM_NON_EXTERNAL_DECLARATION!>noImpl<!>) {
|
||||
println("Hello")
|
||||
println("world")
|
||||
|
||||
object {
|
||||
fun bar(): Any = <!CALL_TO_NO_IMPL_FROM_NON_EXTERNAL_DECLARATION!>noImpl<!>
|
||||
}
|
||||
|
||||
listOf<String>()
|
||||
.map<String, String> { <!CALL_TO_NO_IMPL_FROM_NON_EXTERNAL_DECLARATION!>noImpl<!> }
|
||||
.filter(fun(x: String): Boolean { <!CALL_TO_NO_IMPL_FROM_NON_EXTERNAL_DECLARATION!>noImpl<!> })
|
||||
|
||||
<!CALL_TO_NO_IMPL_FROM_NON_EXTERNAL_DECLARATION!>noImpl<!>
|
||||
}
|
||||
|
||||
open class A(val x: Int)
|
||||
|
||||
open class B() : A(<!CALL_TO_NO_IMPL_FROM_NON_EXTERNAL_DECLARATION!>noImpl<!>) {
|
||||
constructor(y: String) : this()
|
||||
|
||||
constructor(y: String, z: String) : this(y + z + <!CALL_TO_NO_IMPL_FROM_NON_EXTERNAL_DECLARATION!>noImpl<!>)
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package
|
||||
|
||||
public val prop: kotlin.String
|
||||
public val prop2: kotlin.String
|
||||
public fun foo(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.String = ...): kotlin.Unit
|
||||
|
||||
public open class A {
|
||||
public constructor A(/*0*/ x: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class B : A {
|
||||
public constructor B()
|
||||
public constructor B(/*0*/ y: kotlin.String)
|
||||
public constructor B(/*0*/ y: kotlin.String, /*1*/ z: kotlin.String)
|
||||
public final override /*1*/ /*fake_override*/ val x: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user