Implemented HiddenDeclaration annotation (doc-comment to be added!)
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
package test
|
||||
|
||||
// imports should be resolved
|
||||
import test.topLevelFun
|
||||
import test.topLevelProperty
|
||||
|
||||
@HiddenDeclaration
|
||||
fun topLevelFun(){}
|
||||
|
||||
@HiddenDeclaration
|
||||
var topLevelProperty = 1
|
||||
|
||||
@HiddenDeclaration
|
||||
fun String.topLevelExtensionFun(){}
|
||||
|
||||
@HiddenDeclaration
|
||||
val String.topLevelExtensionProperty: Int get() = 1
|
||||
|
||||
open class A {
|
||||
constructor(<!UNUSED_PARAMETER!>p<!>: Int) : this(<!TYPE_MISMATCH!>""<!>) {}
|
||||
|
||||
@HiddenDeclaration
|
||||
constructor(<!UNUSED_PARAMETER!>s<!>: String){}
|
||||
|
||||
@HiddenDeclaration
|
||||
open fun memberFun(){}
|
||||
|
||||
@HiddenDeclaration
|
||||
val memberProperty = 1
|
||||
|
||||
@HiddenDeclaration
|
||||
fun String.memberExtensionFun(){}
|
||||
|
||||
@HiddenDeclaration
|
||||
val String.memberExtensionProperty: Int get() = 1
|
||||
|
||||
fun foo() {
|
||||
<!UNRESOLVED_REFERENCE!>topLevelFun<!>()
|
||||
<!UNRESOLVED_REFERENCE, VARIABLE_EXPECTED!>topLevelProperty<!><!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>++<!>
|
||||
"".<!UNRESOLVED_REFERENCE!>topLevelExtensionFun<!>()
|
||||
"".<!UNRESOLVED_REFERENCE!>topLevelExtensionProperty<!>
|
||||
|
||||
<!UNRESOLVED_REFERENCE!>memberFun<!>()
|
||||
<!UNRESOLVED_REFERENCE!>memberProperty<!>
|
||||
"".<!UNRESOLVED_REFERENCE!>memberExtensionFun<!>()
|
||||
"".<!UNRESOLVED_REFERENCE!>memberExtensionProperty<!>
|
||||
|
||||
A(<!TYPE_MISMATCH!>""<!>)
|
||||
}
|
||||
}
|
||||
|
||||
interface I {
|
||||
@HiddenDeclaration
|
||||
fun foo1()
|
||||
|
||||
@HiddenDeclaration
|
||||
fun foo2()
|
||||
}
|
||||
|
||||
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class X<!> : I {
|
||||
override fun foo1() {
|
||||
}
|
||||
}
|
||||
|
||||
class B : A(<!TYPE_MISMATCH!>""<!>) {
|
||||
// still can override it
|
||||
override fun memberFun() {
|
||||
super.<!UNRESOLVED_REFERENCE!>memberFun<!>() // but cannot call super :)
|
||||
}
|
||||
}
|
||||
|
||||
class C : A {
|
||||
constructor() : super(<!TYPE_MISMATCH!>""<!>)
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package
|
||||
|
||||
package test {
|
||||
kotlin.HiddenDeclaration() internal var topLevelProperty: kotlin.Int
|
||||
kotlin.HiddenDeclaration() internal val kotlin.String.topLevelExtensionProperty: kotlin.Int
|
||||
kotlin.HiddenDeclaration() internal fun topLevelFun(): kotlin.Unit
|
||||
kotlin.HiddenDeclaration() internal fun kotlin.String.topLevelExtensionFun(): kotlin.Unit
|
||||
|
||||
internal open class A {
|
||||
public constructor A(/*0*/ p: kotlin.Int)
|
||||
kotlin.HiddenDeclaration() public constructor A(/*0*/ s: kotlin.String)
|
||||
kotlin.HiddenDeclaration() internal final val memberProperty: kotlin.Int = 1
|
||||
kotlin.HiddenDeclaration() internal final val kotlin.String.memberExtensionProperty: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal final fun foo(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
kotlin.HiddenDeclaration() internal open fun memberFun(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
kotlin.HiddenDeclaration() internal final fun kotlin.String.memberExtensionFun(): kotlin.Unit
|
||||
}
|
||||
|
||||
internal final class B : test.A {
|
||||
public constructor B()
|
||||
kotlin.HiddenDeclaration() internal final override /*1*/ /*fake_override*/ val memberProperty: kotlin.Int
|
||||
kotlin.HiddenDeclaration() internal final override /*1*/ /*fake_override*/ val kotlin.String.memberExtensionProperty: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal final override /*1*/ /*fake_override*/ fun foo(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
internal open override /*1*/ fun memberFun(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
kotlin.HiddenDeclaration() internal final override /*1*/ /*fake_override*/ fun kotlin.String.memberExtensionFun(): kotlin.Unit
|
||||
}
|
||||
|
||||
internal final class C : test.A {
|
||||
public constructor C()
|
||||
kotlin.HiddenDeclaration() internal final override /*1*/ /*fake_override*/ val memberProperty: kotlin.Int
|
||||
kotlin.HiddenDeclaration() internal final override /*1*/ /*fake_override*/ val kotlin.String.memberExtensionProperty: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal final override /*1*/ /*fake_override*/ fun foo(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
kotlin.HiddenDeclaration() internal open override /*1*/ /*fake_override*/ fun memberFun(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
kotlin.HiddenDeclaration() internal final override /*1*/ /*fake_override*/ fun kotlin.String.memberExtensionFun(): kotlin.Unit
|
||||
}
|
||||
|
||||
internal interface I {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
kotlin.HiddenDeclaration() internal abstract fun foo1(): kotlin.Unit
|
||||
kotlin.HiddenDeclaration() internal abstract fun foo2(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
internal final class X : test.I {
|
||||
public constructor X()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
internal open override /*1*/ fun foo1(): kotlin.Unit
|
||||
kotlin.HiddenDeclaration() internal abstract override /*1*/ /*fake_override*/ fun foo2(): kotlin.Unit
|
||||
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