Commit Graph

579 Commits

Author SHA1 Message Date
Denis Zharkov 188bcf0a03 Introduce TypeConstructorSubstitution.create
After latest changes type constructors of inner classes contains
additional type parameters that are copies of ones from outer class.

Their indices are correct, but they used only for subtyping check,
all entries within inner classes are still refers to original
descriptors having different indices.

Example:
class Outer<E> {
   inner class Inner<F> { // Inner's type constructor looks like Inner<F, E>
      fun foo(): E // refers to E in outer having index 0
   }
}

Indexed substitution does not work here because of intersecting indices,
so we replace it with common map substituion in such cases.
2015-11-13 14:47:29 +03:00
Denis Zharkov c9aa75259b Introduce ClassDescriptor.declaredTypeParameters
Should be a subset of type constructor's parameters
2015-11-13 14:47:28 +03:00
Mikhail Glukhikh 2f4dbd2084 Code cleanup: get rid of unnecessary !! / ?. / as 2015-11-13 13:13:55 +03:00
Ilya Gorbunov cea27dd716 Disable check for "Access to tree elements not allowed in tests" in completion tests. 2015-11-11 03:53:23 +03:00
Ilya Gorbunov 84492fd311 Apply hack to restore mapping between PsiFiles and VirtualFiles, otherwise built-ins psi elements will become invalid in next test. 2015-11-11 03:53:21 +03:00
Valentin Kipyatkov bba960f1a5 Moved enum to top level 2015-11-10 17:23:11 +03:00
Valentin Kipyatkov 394b4f7cd4 Removed todo 2015-11-10 17:20:01 +03:00
Valentin Kipyatkov 8946e5f353 Code completion for string templates after simple name + dot 2015-11-10 17:20:01 +03:00
Pavel V. Talanov de4ea45f20 Do not compute stubs when building DefaultImpls light classes
Do not build stubs when computing inner classes of a light class
This should implicitly fix a deadlock reported in KT-9907 and KT-9811
2015-11-10 14:31:14 +03:00
Pavel V. Talanov ad87ec12cd Fast implementation for KtLightClassForExplicitDeclaration#getContainingClass()
Prevent computing stubs for light classes for nested/inner classes when calling completion from java
2015-11-10 14:31:08 +03:00
Pavel V. Talanov 2596197fd9 Test data: add package statements to some of the files in KotlinSourceInJavaCompletionTest test data
Since having package statement trigger additional checks that could potentially lead to stub computation
Tests FakeFileForLightClass
2015-11-10 14:30:54 +03:00
Pavel V. Talanov 085d95a5b8 Tests: Introduce LightClassComputationControl to track when stubs for light classes are built
Use it to track when light classes are built in KotlinSourceInJavaCompletionTest
2015-11-10 14:30:53 +03:00
Valentin Kipyatkov 4943a9fb35 Minor changes on code review 2015-11-09 15:45:38 +03:00
Valentin Kipyatkov ac4cf540a4 Removed wrong TODO 2015-11-09 15:37:48 +03:00
Valentin Kipyatkov 80a1d94515 Non-imported top-level functions completion does not require second press 2015-11-09 15:37:48 +03:00
Valentin Kipyatkov 4c5d5ed18f Do not show "assertFailsWith" in any smart completion 2015-11-09 15:37:47 +03:00
Valentin Kipyatkov 63b5966212 Top-level callables are added one by one 2015-11-09 15:37:47 +03:00
Valentin Kipyatkov 5d56339aba More efficient getting of top-level callables 2015-11-09 15:37:47 +03:00
Valentin Kipyatkov ae9482a36c Add static members into the list one by one 2015-11-09 15:37:47 +03:00
Valentin Kipyatkov c38039144f Added checkCanceled 2015-11-09 15:37:47 +03:00
Valentin Kipyatkov 10e8455279 More safe 2015-11-09 15:37:46 +03:00
Valentin Kipyatkov 4da6a3cd50 No members from anonymous objects etc 2015-11-09 15:37:46 +03:00
Valentin Kipyatkov 97ca5f0389 Refactored 2015-11-09 15:37:46 +03:00
Valentin Kipyatkov 0c93ff5f1d Moved method 2015-11-09 15:37:46 +03:00
Valentin Kipyatkov 3cda866af0 Static members completion works in smart completion + fixed incorrect finding of java method descriptor that caused duplicated items 2015-11-09 15:37:45 +03:00
Valentin Kipyatkov 1283f5f4e1 Refactoring in smart completion 2015-11-09 15:37:45 +03:00
Valentin Kipyatkov 576b79de0a Removed unused parameter 2015-11-09 15:37:45 +03:00
Valentin Kipyatkov 4a182ac6e2 Fixing class names after rebase 2015-11-09 15:37:45 +03:00
Valentin Kipyatkov 7198b897ab Ordering of static members in completion 2015-11-09 15:37:45 +03:00
Valentin Kipyatkov 3bd508ca84 Static members completion includes SAM-adapters 2015-11-09 15:37:44 +03:00
Valentin Kipyatkov 06812aed11 Better completion for static members: special behavior in case of imports from same class exist 2015-11-09 15:37:44 +03:00
Valentin Kipyatkov ca437e51c4 Initial implementation of KT-8209 Support static member completion without writing the class name 2015-11-09 15:37:44 +03:00
Ilya Gorbunov f3ff2e2e76 Replace deprecated join with joinToString 2015-11-06 01:12:00 +03:00
Valentin Kipyatkov 52dc23012f Changed parsing of object and enum entries to drop "KtObjectDeclarationName" 2015-11-05 23:21:22 +03:00
Valentin Kipyatkov cacc50dc32 Minor 2015-11-05 17:47:56 +03:00
Valentin Kipyatkov 25be00d9d9 Added TODOs 2015-11-05 17:47:56 +03:00
Valentin Kipyatkov 58fc0b6ec8 Fixed special item after "super." not working for fake override super 2015-11-05 17:47:55 +03:00
Valentin Kipyatkov bec6c29cb4 Fixing class names after rebase 2015-11-05 17:47:55 +03:00
Valentin Kipyatkov e33e1ef8d7 KT-8968 Special completion after "super."
#KT-8968 Fixed
2015-11-05 17:47:55 +03:00
Valentin Kipyatkov 99b35257c6 Preference of right member after "super." and not only 2015-11-05 17:47:55 +03:00
Valentin Kipyatkov 731f19ee36 Changed behavior 2015-11-05 17:47:54 +03:00
Valentin Kipyatkov b73c574d19 Correct completion after "super."
#KT-8406 Fixed
2015-11-05 17:47:54 +03:00
Sergey Mashkov 703367c5c7 Update tests due to removed DOM utilities 2015-11-05 14:41:30 +01:00
Stanislav Erokhin 2c3f58eeb7 Renamed methods in MemberScope from getSmth to getContributedSmth 2015-11-05 14:34:00 +03:00
Stanislav Erokhin 6f9d9759ce Renamed KtScope to MemberScope 2015-11-05 14:34:00 +03:00
Stanislav Erokhin 4e891a3f98 Minor. moved util method to Companion of LexicalScope 2015-11-04 14:28:27 +03:00
Stanislav Erokhin 0b5de434fa Removed usages KtScope.getAllDescriptors 2015-11-04 12:41:34 +03:00
Stanislav Erokhin 21fdd2ffc3 Created common supertype for LexicalScope & ImportingScope -- HierarchicalScope 2015-11-04 12:41:33 +03:00
Dmitry Jemerov 19af88738b remove Jet from names of classes in tests: phase 2 2015-11-03 14:06:04 +01:00
Dmitry Jemerov c604f98a1c remove Jet from names of classes in tests: phase 1 2015-11-03 14:06:03 +01:00