* function descriptor cache is no longer needed in JDR
* fixed incorrect assertion
* removed unused parameter
* better exception message
Related to http://ea.jetbrains.com/browser/ea_problems/33872
Outer class must be initialized before inner class because inner class
because inner class needs a reference to outer class.
Fixes http://youtrack.jetbrains.com/issue/KT-1324
This patch implement own member filling with supertype scope. Before this patch JDR relied on
Idea hierarchy resolver.
This patch does two things:
* copies FunctionDescriptors from supertype scopes
* rewrites containingDeclaration similary to how it is done in previous patch
Patch is incomplete, in particular properties are not yet initialized properly, code needs cleanup,
however the most important part of refactoring is done, and tests pass.
that fixes invocation:
>>> StringBuilder.length()
that was compiled to
>>> invokevirtual CharSequence.length()
and now compiles to
>>> invokevirtual StringBuilder.length()
Essentially patch rewrites FunctionDescriptor.containingDeclaration
when FunctionDescriptor is copied to subclass scope.
FunctionDescriptor now has kind field that can be
* DECLARATION (for "real" function, maybe abstract)
* DELEGATION
* FAKE_OVERRIDE (created for functions from supertypes)
All tests pass although some parts of code are buggy and ugly.
Random comments about this patch:
* FunctionDescriptor.overrides point to function descriptors of supertype scopes
* Filling of memberScope with supertypes is moved to OverrideResolver
* ExpressionCodegen.intermediateValueForProperty must be rewritten
* Patch adds not nice REDECLARATION reports (see compiler/testData/diagnostics/tests/*).
Will be fixed later.
* kill JavaDescriptorResolver.typeParameterDescriptorCache
* use ClassOrNamespaceDescriptor instead of DeclarationDescriptor
Code is a bit ugly now, but simpler than before.
- Stubs elements are enabled
- Changed method for selecting indexing policy for plugin and compiler
- Quick fix for import unresolved top-level function added