Implement raw FIR builder (initial version)

All necessary FIR tree implementations were created
FIR renderer & three first builder tests were added
#KT-24013 Fixed
This commit is contained in:
Mikhail Glukhikh
2018-03-14 18:36:44 +03:00
parent 1a80477c1c
commit 2c626d6c5d
94 changed files with 2727 additions and 27 deletions
@@ -0,0 +1,17 @@
interface SomeInterface {
fun foo(x: Int, y: String): String
val bar: Boolean
}
class SomeClass : SomeInterface {
private val baz = 42
override fun foo(x: Int, y: String): String {
return y + x + baz
}
override var bar: Boolean
get() = true
set(value) {}
}
@@ -0,0 +1,23 @@
FILE: simpleClass.kt
unknown final class SomeInterface() {
unknown final function foo(x: Int, y: String): String
unknown final property bar(val): Boolean
unknown get(): Boolean
}
unknown final class SomeClass() : SomeInterface {
private final property baz(val): <implicit> = STUB
unknown get(): <implicit>
unknown final override function foo(x: Int, y: String): String {
}
unknown final override property bar(var): Boolean
unknown get(): <implicit> {
STUB
}
unknown set(value: Boolean): <implicit> {
}
}
@@ -0,0 +1 @@
fun foo() {}
@@ -0,0 +1,3 @@
FILE: simpleFun.kt
unknown final function foo(): <implicit> {
}
@@ -0,0 +1,16 @@
interface List<out T : Any> {
operator fun get(index: Int): T
infix fun concat(other: List<T>): List<T>
}
typealias StringList = List<out String>
typealias AnyList = List<*>
abstract class AbstractList<out T : Any> : List<T>
class SomeList : AbstractList<Int>() {
override fun get(index: Int): Int = 42
override fun concat(other: List<Int>): List<Int> = this
}
@@ -0,0 +1,21 @@
FILE: typeParameters.kt
<out T : Any> unknown final class List() {
unknown final operator function get(index: Int): T
unknown final infix function concat(other: List<T>): List<T>
}
unknown final typealias StringList = List<out String>
unknown final typealias AnyList = List<*>
<out T : Any> unknown abstract class AbstractList() : List<T> {
}
unknown final class SomeList() : AbstractList<Int> {
unknown final override function get(index: Int): Int {
STUB
}
unknown final override function concat(other: List<Int>): List<Int> {
STUB
}
}