Commit Graph

32854 Commits

Author SHA1 Message Date
Alexey Tsvetkov 54659fcacf Refactoring: remove extra property to pass stubs directory 2016-07-29 17:56:30 +03:00
Alexey Tsvetkov 92af1e9454 Refactoring: do not use extraProperties to pass kapt options to task 2016-07-29 17:56:30 +03:00
Alexey Tsvetkov c838eed6a3 Refactoring: remove reflection calls 2016-07-29 17:56:30 +03:00
Alexey Tsvetkov f297de401c Refactoring: remove remainings of custom classloader in gradle plugin 2016-07-29 17:56:30 +03:00
Stanislav Erokhin aa91b5a1b0 KT-13264 IAE: Argument for @NotNull parameter 'errorClass' createErrorTypeConstructorWithCustomDebugName must not be null
#KT-13264 Fixed
2016-07-29 17:53:12 +03:00
Stanislav Erokhin 19e4dbc37c Refactoring. Move functionTypeResolveUtils.kt to resolution module. 2016-07-29 17:53:11 +03:00
Stanislav Erokhin df461d6e7f Refactoring. Remove supertype TowerContext from class InvokeTowerContext. 2016-07-29 17:53:11 +03:00
Stanislav Erokhin 2c2f105c5d Do not add receiver for function expression by expected type. 2016-07-29 17:53:10 +03:00
Dmitry Petrov 2b63c6a2d5 Merge branch 'typealias_completion' of https://github.com/cypressious/kotlin into cypressious-typealias_completion 2016-07-28 18:07:43 +03:00
Pavel V. Talanov 3bb1ce7e1d Sync code in 'idea-ultimate' 2016-07-28 18:01:01 +03:00
Pavel V. Talanov 7273ef2754 Fix test data 2016-07-28 18:01:00 +03:00
Pavel V. Talanov 5600433baf KtLightClassForSourceDeclaration.create(): check for enum entry earlier 2016-07-28 18:00:59 +03:00
Pavel V. Talanov 82a2b94490 LightClassDataProvider: FqName calculation is redundant now 2016-07-28 18:00:58 +03:00
Pavel V. Talanov ae0d450acf Light class test for classes with dollars in name 2016-07-28 18:00:58 +03:00
Pavel V. Talanov e51957a431 PsiChecker test for classes with dollars in name 2016-07-28 18:00:57 +03:00
Pavel V. Talanov 4ee0f7052f StubClassBuilder: correctly calculate short name when building delegates for light classes 2016-07-28 18:00:56 +03:00
Pavel V. Talanov c85ddc3da2 Do not build light classes for scripts
Supports old behaviour
2016-07-28 18:00:55 +03:00
Pavel V. Talanov 913a1baf56 FqName is not required to create source light classes 2016-07-28 18:00:54 +03:00
Pavel V. Talanov 5a1a1fc03a Drop KtLightClass#getFqName() and some usages of classFqName in KtLightClassForDecompiledDeclaration 2016-07-28 18:00:53 +03:00
Pavel V. Talanov 1fda24fbbf Local classes do not have qualified names
Mirros java psi
2016-07-28 18:00:52 +03:00
Pavel V. Talanov 85fb16ef1b Refactor: restructure light class hierarchy for sources
KtLightClassBase
	| KtLightClassForSourceDeclaration
		| KtLightClassImpl (new!) // top level or inner/nested of top level class
		| KtLightClassForInterfaceDefaultImpls
		| KtLightClassForLocalDeclaration (new!)
			| KtLightClassForAnonymousDeclaration
				| KtLightClassForEnumEntry
2016-07-28 18:00:52 +03:00
Pavel V. Talanov 252235787d Refactor: rename KtWrappingLightClass -> KtLightClassBase 2016-07-28 18:00:51 +03:00
Pavel V. Talanov 999c8e7486 Refactor: rename KtLightClassForExplicitDeclaration -> KtLightClassForSourceDeclaration 2016-07-28 18:00:50 +03:00
Pavel V. Talanov b686b37cbf Refactor: move KotlinCodeBlockModificationListener to 'idea-analysis' module 2016-07-28 18:00:49 +03:00
Pavel V. Talanov 0294551433 Refactor: move OldPackageFacadeClassUtils to 'frontend.jvm' module 2016-07-28 18:00:48 +03:00
Pavel V. Talanov cdbd7fbab0 Refactor: split classes in 'asJava' package into several subpackages to reflect their structure 2016-07-28 18:00:47 +03:00
Nikolay Krasko 033efbda41 Refactoring: move KtLightField interface to file with light elements 2016-07-28 18:00:46 +03:00
Pavel V. Talanov 0b4c6bd889 Drop PsiCodegenPredictor 2016-07-28 18:00:45 +03:00
Dmitry Petrov a08e70879f KT-13161 java static methods call not working for typealias
Introduce special qualifier for type aliases with member scope
containing static class members only.
2016-07-28 17:38:36 +03:00
Nikolay Krasko 5a5cd0e760 Refactoring: extract DebuggerClassNameProvider 2016-07-28 15:33:43 +03:00
Nikolay Krasko 50e196dfb9 Minor: invert if, clean up 2016-07-28 15:33:43 +03:00
Nikolay Krasko 097288d15f Refactoring: fix weak warning about unnecessary escaped dot 2016-07-28 15:33:43 +03:00
Nikolay Krasko e7ee0d1c5e Refactoring: extract pattern to variable and add language injection 2016-07-28 15:33:43 +03:00
Nikolay Krasko 071285fad7 Refactoring: additional changes in smap functions and KotlinExceptionFilter 2016-07-28 15:33:43 +03:00
Nikolay Krasko f71e24403f Refactoring: working with smap methods 2016-07-28 15:33:43 +03:00
Nikolay Krasko fcf0b7a66c Refactoring: extract functions working with smap to separate file 2016-07-28 15:33:43 +03:00
Mikhail Glukhikh 6e391854a0 Data flow values refactoring: removed DataFlowValue.kind.isStable, renamed DataFlowValue.isPredictable -> DataFlowValue.isStable 2016-07-28 15:14:48 +03:00
Kirill Rakhman f378089b96 Fix Completion: keyword 'typealias' is not suggested
Fixes #KT-13242
2016-07-27 19:02:08 +02:00
Denis Zharkov 915e36cb02 Add Map.getOrDefault method as PlatformDependent declaration with refined signature
- First parameter should have type of K instead of Any
- Special bridge should return second parameter if a key has wrong type
- Special bridge may throw an exception if defaultValue has wrong type

 #KT-13209 Fixed
2016-07-27 18:46:13 +03:00
Denis Zharkov 169acf2f31 Refine method's contract and rename it
Basically what's it checked before is that
receiver is a valid override of raw version of builtinWithErasedParameters

While we need to check that method has the same JVM descriptor as builtinWithErasedParameters,
but it's not a valid override of latter

It's important for 'getOrDefault(Object k, V value)' ('getOrDefault(K k, V value)' in Kotlin):
'getOrDefault(Object k, V value)' is not override of 'getOrDefault(Object k, Object value)',
that leads to incorrect loading of former method (like it's not an override of declaration in Map)
2016-07-27 18:46:13 +03:00
Denis Zharkov 15b94bb8df Minor. Move method closer to it's usage and simplify it 2016-07-27 18:46:13 +03:00
Denis Zharkov f2cb86c3f6 Minor. Fix testData 2016-07-27 18:46:13 +03:00
Alexey Andreev efb5a9eca6 KT-13160: when decomposing assignment with lhs like array[index], extract array instead of supporting only qualifier.name` 2016-07-27 18:28:28 +03:00
Mikhail Glukhikh 4f7d8e34b0 Data flow values: initializers for local variables are now stored as "bound values" with inherited nullability #KT-6840 Fixed 2016-07-27 16:24:50 +03:00
Mikhail Glukhikh 7090abddcd Data flow values: variable-based are no more compared with taking kind into account 2016-07-27 16:24:46 +03:00
Mikhail Glukhikh f96b9ddbf5 Minor: unused imports in IdentifierInfo 2016-07-27 16:24:41 +03:00
Mikhail Glukhikh e515d7f773 Data flow analysis: unnecessary assignment removed (related to complex expressions) 2016-07-27 16:24:36 +03:00
Mikhail Glukhikh 1c9f08e986 Data flow values: STABLE_COMPLEX_EXPRESSION kind is removed, no use cases exist for them 2016-07-27 16:24:32 +03:00
Mikhail Glukhikh c7af3f7865 Data flow values: more accurate handling of postfix ++ and -- 2016-07-27 16:24:27 +03:00
Mikhail Glukhikh 7c66f632ca Receiver smart casts: additional test for a?.b() when b is invokable property 2016-07-27 16:24:23 +03:00