Files
kotlin-fork/compiler/testData/diagnostics/tests
Stepan Koltsov 4b94eb5e2b rewrite owner when copying FunctionDescriptor from supertype scope
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.
2012-02-10 20:36:40 +04:00
..
2011-12-26 19:55:29 +04:00
2012-02-03 15:04:14 +04:00
2012-01-27 18:32:55 +04:00
2012-02-03 13:14:50 +04:00
2012-01-27 18:32:55 +04:00
2012-01-10 12:21:37 +04:00
2012-01-03 22:09:12 +04:00
2012-01-24 16:58:29 +04:00
2011-12-26 19:55:29 +04:00
2011-12-26 19:55:29 +04:00