Commit Graph

13 Commits

Author SHA1 Message Date
Pavel V. Talanov
8ac7f0b592 Minor: remove error marker from commented out test code 2018-02-12 16:46:16 +01:00
Pavel V. Talanov
9e69c73387 Minor: comment out test for KT-22594 to unmute it on teamcity
#KT-22594 Open
2018-02-12 16:35:51 +01:00
Pavel V. Talanov
798c80ed07 Use wrappers around java.util.* to emulate kotlin.collection.* behaviour
Backend: If kotlin class extends kotlin.collection.List
    write it as it's super interface (light class mode only)
IDE: Provide wrapper classes to java resolve
    that try to emulate backend behaviour

For example if kotlin class implements kotlin.collections.Map,
    we provide a superinterface that has abstract 'getEntries' method
    and 'entrySet' method that is considered default.
In reality all those methods are generated in the class itself.

In IDE supporting this case without hacks is not feasible performance-wise
    since kotlin.collection.* may not be an immediate supertype and we need
    to compute all supertypes just to calculate own methods of the class
2017-05-16 22:01:03 +03:00
Pavel V. Talanov
4f701285b1 Light class builder: do not generate methods delegating to DefaultImpls in kotlin classes
Class APIs from java point of view stays the same so we can avoid generating those methods
Otherwise we have to calculate all supertypes when getMethods() is called,
    which imposes severe performance penalties
We have to pretend these methods are not 'abstract' (also we consider them 'default' for safety)
    so java highlighting does not report "class should be abstract" for all inheritors
We have to manually report "class should be abstract" on some of the java inheritors,
    specifically those that are implementing interfaces directly
	    as opposed to extending kotlin classes implementing those interfaces
2017-04-09 15:09:01 +03:00
Nikolay Krasko
726471d98e Avoid loading psi for compiled kotlin file if it's possible to get declaration by name from stubs 2016-12-05 17:22:42 +03:00
Pavel V. Talanov
3a3e145de2 KtLightMethod: Wrap return type so it resolves to light method's type parameter as opposed to delegate's
Affects java type inference in IDEA

  #KT-12090 Fixed
  #KT-11095 Fixed
2016-05-27 13:13:01 +03:00
Pavel V. Talanov
62421bbf7b 'const val' are now considered constants by Java in IDEA
#KT-12026 Fixed
2016-05-25 15:58:09 +03:00
Yan Zhulanow
a3ff3ffc45 Fix tests: "Placing function type parameters after the function name" error 2015-11-27 15:51:11 +03:00
Pavel V. Talanov
bff7ff0c5d Improve heuristic to decide whether we will generate DefaultImpls for interface
This is not accurate, there are some cases when we will generate DefaultImpls class that are not covered:
- Inherited default implementations
- Annotated members

In these cases IDE will report an error when in fact code compiles
What is critical though is to be able to decide whether to build DefaultImpls light classes solely based on psi without triggering stubs calculation
2015-11-10 14:31:11 +03:00
Pavel V. Talanov
15370244dc Minor in JavaAgainstKotlinCheckerTest: improve test data for EnumAutoGeneratedMethods case 2015-11-02 18:39:03 +03:00
Pavel V. Talanov
8c4db9bd35 Fix test data so that it can be compiled 2015-11-02 18:38:55 +03:00
Pavel V. Talanov
f6e6ead907 Add java checker test to test loading inner/nested classes 2015-11-02 18:38:53 +03:00
Pavel V. Talanov
be668fc4f5 Introduce JavaAgainstKotlinBinariesTest 2015-11-02 18:38:42 +03:00