[AA] calculate ktType based on symbols when possible

then, for compiled code deserialized fir would be used instead of building
decompiled text and consequence building and resolving of raw fir;

type for ktTypeReference from compiled code is called e.g., by UAST inspections
when they check annotations of the called function parameters
This commit is contained in:
Anna Kozlova
2023-05-26 16:59:14 +02:00
committed by Space Team
parent d7fd2471b8
commit 1d5c080dd8
19 changed files with 261 additions and 1 deletions
@@ -0,0 +1,4 @@
annotation class Anno
@An<caret>no
class Sub
@@ -0,0 +1,2 @@
expression: Anno
ktType: Anno
@@ -0,0 +1,3 @@
annotation class Anno
fun f(@An<caret>no p: String) {}
@@ -0,0 +1,2 @@
expression: Anno
ktType: Anno
@@ -0,0 +1,3 @@
annotation class Anno
@An<caret>no
fun f() {}
@@ -0,0 +1,2 @@
expression: Anno
ktType: Anno
@@ -0,0 +1,3 @@
class Foo {}
fun F<caret>oo.f(): Boolean = false
@@ -0,0 +1,2 @@
expression: Foo
ktType: Foo
@@ -0,0 +1,3 @@
class Foo {}
fun Foo.f(): Boo<caret>lean = false
@@ -0,0 +1,2 @@
expression: Boolean
ktType: kotlin.Boolean
@@ -0,0 +1,3 @@
class Foo {}
var F<caret>oo.f: Boolean = false
@@ -0,0 +1,2 @@
expression: Foo
ktType: Foo
@@ -0,0 +1,3 @@
class Foo {}
var Foo.f: B<caret>oolean = false
@@ -0,0 +1,2 @@
expression: Boolean
ktType: kotlin.Boolean