[Parser] Do not support local contextual declarations
This commit is contained in:
committed by
teamcity
parent
4fd61ad1b0
commit
4d3035e2f7
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
class Context(val project: Any?)
|
||||
|
||||
fun calculateResult(context: Context?) {
|
||||
context!!
|
||||
val project = context.project!!
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class Context(val project: Any?)
|
||||
|
||||
fun calculateResult(context: Context?) {
|
||||
context!!
|
||||
val project = <!DEBUG_INFO_SMARTCAST!>context<!>.project!!
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
package
|
||||
|
||||
public fun calculateResult(/*0*/ context: Context?): kotlin.Unit
|
||||
|
||||
public final class Context {
|
||||
public constructor Context(/*0*/ project: kotlin.Any?)
|
||||
public final val project: kotlin.Any?
|
||||
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
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
interface A {
|
||||
fun f() {}
|
||||
}
|
||||
class B : A
|
||||
|
||||
fun testLocalFunction() {
|
||||
context(A)
|
||||
fun local() {
|
||||
<!UNRESOLVED_REFERENCE!>f<!>()
|
||||
}
|
||||
with(B()) {
|
||||
local()
|
||||
}
|
||||
local()
|
||||
}
|
||||
|
||||
fun testLocalClass() {
|
||||
context(A)
|
||||
class Local {
|
||||
fun local() {
|
||||
<!UNRESOLVED_REFERENCE!>f<!>()
|
||||
}
|
||||
}
|
||||
with(B()) {
|
||||
Local().local()
|
||||
}
|
||||
Local()
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
interface A {
|
||||
fun f() {}
|
||||
}
|
||||
class B : A
|
||||
|
||||
fun testLocalFunction() {
|
||||
context(A)
|
||||
fun local() {
|
||||
f()
|
||||
}
|
||||
with(B()) {
|
||||
local()
|
||||
}
|
||||
<!NO_CONTEXT_RECEIVER!>local()<!>
|
||||
}
|
||||
|
||||
fun testLocalClass() {
|
||||
context(A)
|
||||
class Local {
|
||||
fun local() {
|
||||
f()
|
||||
}
|
||||
}
|
||||
with(B()) {
|
||||
Local().local()
|
||||
}
|
||||
<!NO_CONTEXT_RECEIVER!>Local()<!>
|
||||
}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
package
|
||||
|
||||
public fun testLocalClass(): kotlin.Unit
|
||||
public fun testLocalFunction(): kotlin.Unit
|
||||
|
||||
public interface A {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun f(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class B : A {
|
||||
public constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun f(): 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