JavaDescriptorResolver refactoring

* kill JavaDescriptorResolver.typeParameterDescriptorCache
* use ClassOrNamespaceDescriptor instead of DeclarationDescriptor

Code is a bit ugly now, but simpler than before.
This commit is contained in:
Stepan Koltsov
2012-01-31 22:48:55 +04:00
parent c88940c07c
commit e075bec4c0
30 changed files with 485 additions and 217 deletions
@@ -0,0 +1,4 @@
package test;
final class ClassWithTypeParameter<P> {
}
@@ -0,0 +1,4 @@
package test
class ClassWithTypeParameter<erased P>() {
}
@@ -0,0 +1,4 @@
package test;
abstract class ClassTypeTypePRefSuper<P> implements java.lang.Iterable<P> {
}
@@ -0,0 +1,4 @@
package test
abstract class ClassTypeTypePRefSuper<erased P>() : java.lang.Iterable<P> {
}
@@ -0,0 +1,4 @@
package test;
final class ClassWithTypeParameter<P, Q extends P> {
}
@@ -0,0 +1,4 @@
package test
class ClassWithTypeParameter<erased P, erased Q : P>() {
}
@@ -0,0 +1,4 @@
package test;
final class ClassWithTypePRefSelf<P extends Enum<P>> {
}
@@ -0,0 +1,4 @@
package test
class ClassWithTypePRefSelf<erased P : java.lang.Enum<P>?>() {
}
@@ -0,0 +1,5 @@
package test;
final class MethodWithTypeP {
public final <P> void f() {}
}
@@ -0,0 +1,5 @@
package test
class MethodWithTypeP() {
fun <erased P> f() = #()
}
@@ -0,0 +1,5 @@
package test;
final class MethodWithTypePP {
public final <P, Q extends P> void f() {}
}
@@ -0,0 +1,5 @@
package test
class MethodWithTypePP() {
fun <erased P, erased Q : P> f() = #()
}
@@ -0,0 +1,5 @@
package test;
class MethodWithTypePRefClassP<P> {
public final <Q extends P> void f() {}
}
@@ -0,0 +1,5 @@
package test
open class MethodWithTypePRefClassP<erased P>() {
fun <erased Q : P> f() = #()
}
@@ -0,0 +1,5 @@
package test;
final class MethosWithPRefTP {
public final <P> void f(P p) {}
}
@@ -0,0 +1,5 @@
package test
final class MethosWithPRefTP() {
fun <erased P> f(p0: P) = #()
}