Commit Graph

10966 Commits

Author SHA1 Message Date
Pavel V. Talanov 1e5108a2ab Drop unused InjectorForLazyTopDownAnalyzerBasic 2015-04-27 15:56:36 +03:00
Svetlana Isakova 4f0d541493 Resolve function references independently of target type
KT-7564 AbstractDiagnosticsTest.checkAllResolvedCallsAreCompleted() fails on tests with function references
 #KT-7564 Fixed
2015-04-27 13:32:47 +03:00
Michael Bogdanov 39fabda611 New diagnostic for Java default method call via super in trait 2015-04-24 18:54:09 +03:00
Michael Bogdanov 0854c601b4 Fix non local returns to functional expressions 2015-04-24 18:54:09 +03:00
Ilya Ryzhenkov bcb0b499f4 Workaround to allow QualifiedExpressionResolver to be created without an Injector. Should be fixed by code owner. 2015-04-24 15:44:44 +03:00
Ilya Ryzhenkov 879b6a0a3f Implement deprecated validator. 2015-04-24 15:44:42 +03:00
Ilya Ryzhenkov 288e1baa87 Tests, messages and infra for deprecated symbol reporting 2015-04-24 15:44:32 +03:00
Ilya Ryzhenkov c8920b8158 Include arrayOf() into list of constant values for annotations 2015-04-24 15:44:30 +03:00
Ilya Ryzhenkov c2b3bcc95f SymbolUsageValidator infrastructure 2015-04-24 15:44:28 +03:00
Stanislav Erokhin 8582f4ab47 Fixed memory leak 2015-04-24 09:02:47 +03:00
Alexander Udalov d2cd7b00bb Map intrinsic companion objects in JavaToKotlinClassMap
Get rid of multiple usages of IntrinsicObjects where JavaToKotlinClassMap was
already used, simplify code, and support loading of *CompanionObject as Kotlin
built-in companions from Java code.

Also fix a small bug where Boolean was considered a class with an intrinsic
companion in IntrinsicObjects, although it was not
2015-04-24 02:09:26 +03:00
Alexander Udalov 43c11b2925 Merge CollectionClassMapping into JavaToKotlinClassMap 2015-04-24 02:09:05 +03:00
Alexander Udalov a59fa5015e Merge KotlinToJavaTypesMap into JavaToKotlinClassMap
Also use this new Kotlin->Java mapping in RuntimeTypeMapper instead of
inheriting directly from JavaToKotlinClassMapBuilder
2015-04-24 02:09:05 +03:00
Alexander Udalov b956fb5eb0 Pull Java<->Kotlin primitive type mapping up to JavaToKotlinClassMapBuilder 2015-04-24 02:09:04 +03:00
Alexander Udalov 4b07ec11ea Change Class<?> parameter to ClassId in JavaToKotlinClassMap implementations 2015-04-24 02:09:04 +03:00
Alexander Udalov 0dec1eaaad Refactor RuntimeTypeMapper, extract IntrinsicObjects-related behavior
Make it similar to other JavaToKotlinClassMapBuilder implementations to be able
to get rid of that inheritance
2015-04-24 02:09:04 +03:00
Alexander Udalov deff3968db Simplify KotlinToJavaTypesMap, use only one map 2015-04-24 02:09:03 +03:00
Alexander Udalov 23a792aa44 Somewhat simplify mapping of JVM primitive types 2015-04-24 02:09:03 +03:00
Alexander Udalov 0a66c78449 Disperse primitive type mapping in JavaToKotlinClassMap 2015-04-24 02:09:02 +03:00
Alexander Udalov 3014238189 Drop unused MutablePackageFragmentProvider 2015-04-24 02:08:36 +03:00
Alexander Udalov 34fa61675d Replace more eager asserts in project with lazy 2015-04-24 02:08:22 +03:00
Alexander Udalov 1a48b5750e Minor, remove unnecessary unwrapping of VariableAsFunctionResolvedCall
Almost all of its methods delegate to functionCall already
2015-04-23 22:09:02 +03:00
Alexander Udalov 07c2442405 Make $default methods non-private, avoid generating accessors for them
#KT-5786 Fixed
2015-04-23 22:09:02 +03:00
Pavel V. Talanov dc05596ce0 Create FqName safely in KotlinCliJavaFileManagerImpl#findPackage
#KT-7501 Fixed
2015-04-23 21:10:58 +03:00
Mikhail Glukhikh 525b9e63ae Refactoring: checkType && checkImplicitCast returned to DataFlowUtils, PROCESSED unboxing returned, StringTemplateVisitor made local 2015-04-23 18:25:52 +03:00
Mikhail Glukhikh 8b241b8c05 Dead block removed (function literal inside do...while) 2015-04-23 18:25:50 +03:00
Mikhail Glukhikh b40fe9d5ba Refactoring: TypeInfoFactory.createTypeInfo() without type -> noTypeInfo(), getNotNullType -> getTypeNotNull, nullability refined, style fixes 2015-04-23 18:25:47 +03:00
Nikolay Krasko 3e1c3e9dfe Don't search for NonClasspathClassFinder classes and package during Kotlin resolve 2015-04-23 17:38:07 +03:00
Michael Bogdanov df2900c4e4 Introduced ParameterDescriptor type 2015-04-23 15:41:59 +03:00
Michael Bogdanov 53b8a1d56e Fix for KT-7544: Backend fails when inlining nested calls with reified type parameter and default value parameter
#KT-7544 Fixed
2015-04-23 15:41:59 +03:00
Ilya Gorbunov 526348b207 Implement toTypedArray as non-intrinsic.
Remove unused intrinsic method.
2015-04-23 14:10:42 +03:00
Denis Zharkov 14df5b72b7 Minor, uncomment throws with class literal in code 2015-04-23 11:22:39 +03:00
Denis Zharkov 634b1a9568 Add workaround for KT-7544
Inlining lambdas into objects or non-inlineable lambdas does not work well.

Should be reverted after issue will be fixed
2015-04-23 11:22:39 +03:00
Denis Zharkov fef568dbf0 Refactor migrational intentions
- Make them independent on element
- Extract common parts into JetWholeProjectModalByTaskCollectionAction class
2015-04-23 11:22:38 +03:00
Denis Zharkov 1b42e2fdcc Deprecate calls of annotations' methods 2015-04-23 08:27:43 +03:00
Denis Zharkov 29bf24b7d3 Use properties of Java annotations in codegen tests
Retain obsolete versions until support for methods in Java annotations is dropped
2015-04-23 08:27:42 +03:00
Denis Zharkov 6ca7d2aad7 Regenerate test data
Add properties for Java annotations
2015-04-23 08:27:41 +03:00
Alexander Udalov 20cd360b07 Rename built-in metadata files starting with dot
Files starting with dot are considered as hidden on Unix systems, and sometimes
are ignored by the tools. For example, Android build tools do not package such
files to the resulting application, which causes Kotlin reflection to fail
there

 #KT-7088 Fixed
2015-04-23 03:17:29 +03:00
Evgeny Gerashchenko f5677d8424 Converted JetPsiUtil.getElementTextWithContext() to Kotlin extension function. 2015-04-22 14:10:00 +03:00
Zalim Bashorov 1ef9b9db1f JS backend: add the support function expression
#KT-7242 Fixed
2015-04-22 12:48:22 +03:00
Zalim Bashorov 02071c5bdd Minor: move function expression tests to separate directory 2015-04-22 12:48:21 +03:00
Natalia Ukhorskaya 907f0db7be Do not include files that contains only top level classes or objects to LightClassForPackage 2015-04-22 10:35:18 +03:00
Alexey Sedunov d815634233 Control-Flow: Assign pseudo-values to local functions (except those
declared directly in the block)
2015-04-21 17:10:46 +03:00
Alexey Sedunov 5b1906fb13 Control-Flow: Add tests for pseudo-values of labeled expressions 2015-04-21 17:10:45 +03:00
Mikhail Glukhikh e64dab0ae9 Review fixes after automatic code analysis 2015-04-21 15:29:34 +03:00
Mikhail Glukhikh 27625b04e1 Refactoring of JetTypeInfo / BindingContext. Loop data flow analysis corrected.
Now BindingContext includes expression type info instead of jump out possible, data flow info and expression type.
getType() was added into BindingContext, getType() and recordType() were added into BindingTrace.
JetTypeInfo now includes also jump possible flag and jump point data flow info.
Old TypeInfoWithJumpInfo deleted.
TypeInfoFactory introduced to create JetTypeInfo instances.
A pack of extra tests for break / continue in loops added.
2015-04-21 15:29:07 +03:00
Dmitry Jemerov 14b92404cd add test for private-to-this visibility in traits 2015-04-21 14:13:30 +02:00
Dmitry Jemerov 8d922dda4d private members of traits are not open by default
#KT-4171 Fixed
2015-04-21 14:13:29 +02:00
Denis Zharkov 5ce4f4cad1 Temporary comment out throws usage in code
Until new `throws` will be in bootstrap
2015-04-21 08:08:31 +03:00
Denis Zharkov 6ef2340eb5 Migrate type of throws parameter to KClass
Change declaration, testData and codegen parts for `throws`
2015-04-21 08:08:31 +03:00