Implement FIR loading for Java (classes, supertypes, parameters, funs)

Properties aren't implemented yet
FIR symbol provider functions return more specialized types now
Related to KT-28918, KT-29636, KT-29218

#KT-28788 Fixed
This commit is contained in:
Simon Ogorodnik
2019-02-07 11:43:12 +03:00
committed by Mikhail Glukhikh
parent 4ea3df53cc
commit 3a237416c9
21 changed files with 331 additions and 70 deletions
@@ -0,0 +1,9 @@
public class A {
public A foo() {
return this;
}
public A bar() {
return this;
}
}
@@ -0,0 +1,9 @@
class B : A() {
override fun foo(): B = this
fun bar(): B = this // Ambiguity, no override here
fun test() {
foo()
bar()
}
}
@@ -0,0 +1,18 @@
FILE: B.kt
public final class B : R|A| {
public constructor(): super<R|A|>()
public final override function foo(): R|B| {
return@@@foo this#
}
public final function bar(): R|B| {
return@@@bar this#
}
public final function test(): R|kotlin/Unit| {
R|/B.foo|()
<Ambiguity: bar, [/B.bar, /A.bar]>#()
}
}