[Analysis API] Support non-JVM platforms in code fragments
The 'evalJs' test is not available, as there is no proper support for klib loading in non-standalone Analysis API yet. ^KT-64197 Fixed
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
foo.call()
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
MODULE_FRAGMENT
|
||||
FILE fqName:<root> fileName:fragment.kt
|
||||
CLASS CLASS name:CodeFragment modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CodeFragment
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.CodeFragment [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
FUN name:run visibility:public modality:FINAL <> (p0:test.Foo) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:p0 index:0 type:test.Foo
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
CALL 'public final fun call (): kotlin.Unit [expect] declared in test.Foo' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'p0: test.Foo declared in <root>.CodeFragment.run' type=test.Foo origin=null
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
|
||||
// MODULE: common
|
||||
// TARGET_PLATFORM: Common
|
||||
// FILE: Common.kt
|
||||
package test
|
||||
|
||||
fun test(foo: Foo) {
|
||||
<caret>foo.call()
|
||||
}
|
||||
|
||||
expect class Foo {
|
||||
fun call()
|
||||
}
|
||||
|
||||
// MODULE: main()()(common)
|
||||
// TARGET_PLATFORM: JVM
|
||||
// FILE: Jvm.kt
|
||||
package test
|
||||
|
||||
actual class Foo {
|
||||
fun call() {}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final class CodeFragment {
|
||||
// source: 'fragment.kt'
|
||||
public method <init>(): void
|
||||
public final static method run(p0: test.Foo): void
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
eval("node")
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// TARGET_PLATFORM: JVM
|
||||
|
||||
fun foo(node: kotlinx.dom.Node) {
|
||||
<caret>check(node.isElement)
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
Diagnostics from elements:
|
||||
for PSI element of type KtNameReferenceExpression at (1,1-5)
|
||||
UNRESOLVED_REFERENCE text ranges: [(0,4)]
|
||||
PSI: KtNameReferenceExpression at (1,1-5)
|
||||
+1
@@ -0,0 +1 @@
|
||||
eval("node")
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// TARGET_PLATFORM: JVM, JS
|
||||
|
||||
fun foo(node: kotlinx.dom.Node) {
|
||||
<caret>check(node.isElement)
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
Diagnostics from elements:
|
||||
for PSI element of type KtNameReferenceExpression at (1,1-5)
|
||||
UNRESOLVED_REFERENCE text ranges: [(0,4)]
|
||||
PSI: KtNameReferenceExpression at (1,1-5)
|
||||
Reference in New Issue
Block a user