Compare commits

..

4761 Commits

Author SHA1 Message Date
Kirill Rakhman
48310d66da Implement quick fix for converting primitive types
#KT-10476 Fixed
2016-03-16 10:58:29 +01:00
Alexander Udalov
b328f37495 Add all IDE modules to scope 'IDE', exclude tests
Exclude test roots (add only src/* and testData/*) to prevent clash with the
built-in "Tests" scope
2016-03-16 12:52:20 +03:00
Nikolay Krasko
94e8ba7c4b "Code formatter doesn't remove spaces in single line properties" fixed (KT-11076)
#KT-11076 Fixed
2016-03-16 12:38:26 +03:00
Nikolay Krasko
2db888a646 Accurate work with adding/removing context of tests.
Need this because of KEEP_FIRST_COLUMN_COMMENT setting. Comments accidentally left on first
collumn cause the bad formatting.

 #KT-4175 Fixed
2016-03-16 12:38:24 +03:00
Nikolay Krasko
8ad0c1ac01 Force new line if the whitespace between comments doesn't have a line break
Tweeking KEEP_FIRST_COLUMN_COMMENT setting and one-line comments generated on the same line.

 #KT-4175 In Progress
2016-03-16 12:38:23 +03:00
Nikolay Krasko
85bc32a884 Adjust move code tests for KEEP_FIRST_COLUMN_COMMENT option
#KT-4175 In Progress
2016-03-16 12:38:21 +03:00
Nikolay Krasko
085deec717 Make J2K pay more attention to original formatting of comments. Better support for KEEP_FIRST_COLUMN_COMMENT
#KT-4175 In Progress
2016-03-16 12:38:20 +03:00
Nikolay Krasko
a9f11d2c64 Always add new line space with space before to deal with KEEP_FIRST_COLUMN_COMMENT option
InvertIfConditionIntention, RemoveBracesIntention tests are affected

 #KT-4175 In Progress
2016-03-16 12:38:19 +03:00
Nikolay Krasko
6193987d0d Reformat code should not align comments (KT-4175)
#KT-4175 In Progress
2016-03-16 12:38:17 +03:00
Natalia Ukhorskaya
334c6ba71a Refactoring: rename kotlin-android-plugin to idea-android 2016-03-15 20:26:14 +03:00
Natalia Ukhorskaya
d2de74226e Refactoring: rearrange dependencies in android modules 2016-03-15 20:25:54 +03:00
Natalia Ukhorskaya
ec9a6aacd5 Refactoring: move android-extensions-* module under separate module group 2016-03-15 20:25:52 +03:00
Natalia Ukhorskaya
78d4860215 Refactoring: rename android-jps-plugin to android-extensions-jps 2016-03-15 20:25:50 +03:00
Natalia Ukhorskaya
bf4c92d903 Refactoring: rename android-idea-plugin to android-extensions-idea 2016-03-15 20:25:48 +03:00
Natalia Ukhorskaya
7e6fa8ef17 Refactoring: rename android-compiler-plugin to android-extensions-compiler 2016-03-15 20:25:45 +03:00
Natalia Ukhorskaya
93161be199 Configure Kotlin: restore all changed files in undo action 2016-03-15 20:25:42 +03:00
Natalia Ukhorskaya
e31202ff7c Show only changed files in notification "Kotlin not configured" 2016-03-15 20:25:36 +03:00
Natalia Ukhorskaya
7c3dd3e139 Minor: fix warnings 2016-03-15 20:21:21 +03:00
Natalia Ukhorskaya
6b48eae03e Configure Kotlin for Android: add kotlin plugin to project build.gradle file.
Do not add mavenCentral dependency if jcenter is present
2016-03-15 20:20:24 +03:00
Natalia Ukhorskaya
e611154580 Minor: fix testData after e2d2d696c0d8b24ebe310fd880a912d6eb428872s 2016-03-15 14:53:03 +03:00
Ilya Gorbunov
02bb7f2f0d Remove the compiler option "Xmultifile-facades-open" 2016-03-15 14:10:33 +03:00
Natalia Ukhorskaya
e2d2d696c0 Add function name to fake local variable for inline argument 2016-03-15 13:25:49 +03:00
Mikhail Glukhikh
a830d80dac Values equality no more provides guarantee for their types equality (for open types or types with overridden equals) #KT-11280 Fixed 2016-03-15 11:01:39 +03:00
Michael Bogdanov
3eb6749377 Call done on when mapping transformation end 2016-03-15 10:04:28 +03:00
Alexander Udalov
4f77b02a58 Rename 'ins' -> 'Ins' in BuiltinsPackageFragment and related classes 2016-03-14 20:41:46 +03:00
Alexander Udalov
777ef32d65 Move AnnotationsImpl to frontend, delete unused DefaultAnnotationArgumentVisitor 2016-03-14 20:05:19 +03:00
Alexander Udalov
11409ec6cf Move some function type utilities from descriptors to frontend 2016-03-14 19:45:09 +03:00
Alexander Udalov
63eb6712eb Rename getParameterTypeProjectionsFromFunctionType -> getValueParameterTypesFromFunctionType
Also add getValueParametersCountFromFunctionType which doesn't create a new
list every time but only returns the number of value parameters
2016-03-14 19:45:08 +03:00
Alexander Udalov
5b7115dc38 Minor, drop deprecated KotlinBuiltIns.getExtensionFunction 2016-03-14 19:45:08 +03:00
Alexander Udalov
516484c905 Use DFS in isFunctionTypeOrSubtype
To prevent exponential working time on weird hierarchies
2016-03-14 19:24:18 +03:00
Alexander Udalov
117d0bcf03 Fix multiple exceptions related to subtypes of function types
The main change is in FunctionsTypingVisitor#visitLambdaExpression, where we
incorrectly allowed subtypes of function types to be expected type during
resolution of lambdas

Also see EA-70485

 #KT-9820 Fixed
2016-03-14 19:24:17 +03:00
Alexander Udalov
33ff1e1e29 Use correct function to check for function type in InlineParameterChecker
There's no use of noinline/crossinline modifiers on parameters of _subtypes_ of
function types

 #KT-11411 Fixed
2016-03-14 19:24:08 +03:00
Alexander Udalov
c18fab82e5 Simplify and rename function type utilities
- isFunctionType -> change the only usage in TracingStrategyForInvoke to check
  for exact function type
- isExtensionFunctionType -> change all usages to check for exact extension
  function type because extension function types are uninheritable in Kotlin
- isExactFunctionType -> isNonExtensionFunctionType
- isExactExtensionFunctionType -> isExtensionFunctionType
- isExactFunctionOrExtensionFunctionType -> isFunctionType
- isFunctionOrExtensionFunctionType -> isFunctionTypeOrSubtype
2016-03-14 19:24:07 +03:00
Alexander Udalov
e308f2acdb Minor, fix warnings and remove weird comments in KotlinBuiltIns 2016-03-14 19:24:07 +03:00
Alexander Udalov
2ce661af98 Rename KotlinBuiltIns.getFunctionType -> createFunctionType, move to functionTypes.kt 2016-03-14 19:24:06 +03:00
Alexander Udalov
fd344561fc Move static function type utilities from KotlinBuiltIns to functionTypes.kt 2016-03-14 19:24:05 +03:00
Mikhail Glukhikh
569a5888ff do...while (true) is now considered infinite loop in CFA #KT-3896 Fixed
Also #KT-3883 Fixed
Also #KT-4986 Fixed
2016-03-14 16:13:14 +03:00
Mikhail Glukhikh
4cf3ec3df2 Minor: ControlFlowInformationProvider cleanup 2016-03-14 16:13:05 +03:00
Mikhail Glukhikh
7232c5ccc1 Minor: FILE directives fixed in two tests 2016-03-14 15:49:50 +03:00
Michael Bogdanov
92f1a20d5f New name generation for transformed when classes 2016-03-14 12:22:06 +03:00
Michael Bogdanov
a72636afb8 Code clean 2016-03-14 11:26:51 +03:00
Michael Bogdanov
bec6126b06 Support when mapping transformation on inlining 2016-03-14 11:24:39 +03:00
Michael Bogdanov
b88260b4f9 RegenerationInfo renamed to TransformationInfo 2016-03-14 10:45:39 +03:00
Michael Bogdanov
c062fff633 All regeneration infos moved to one file 2016-03-14 10:45:38 +03:00
Michael Bogdanov
56d8e4d170 Old/NewClassName funs in RefenerationInfo converted to properties 2016-03-14 10:45:38 +03:00
Michael Bogdanov
bbb838765c Obtain regenerated class name through RegeneratedInfo 2016-03-14 10:45:37 +03:00
Michael Bogdanov
ddd992d3dd AnonymousObjectRegenerationInfo java->kotlin convertion 2016-03-14 10:45:37 +03:00
Michael Bogdanov
da76bf7b03 AnonymousObjectRegenerationInfo.java->AnonymousObjectRegenerationInfo.kt 2016-03-14 10:45:36 +03:00
Michael Bogdanov
7e3e1554fa Added canRemoveAfterTransformation method 2016-03-14 10:45:36 +03:00
Michael Bogdanov
8c9d8778eb Introduced base class for AnonymousObjectGeneration 2016-03-14 10:45:35 +03:00
Michael Bogdanov
c6007c91f7 AnonymousObjectGeneration refactoring 2016-03-14 10:45:35 +03:00
Michael Bogdanov
a0f050fc69 Removed AnonymousObjectGeneration from RegeneratedClassContext 2016-03-14 10:45:34 +03:00
Nikolay Krasko
60ee5441cf Update links in Editing Kotlin section 2016-03-13 19:53:18 +03:00
Mikhail Glukhikh
f76efb68f2 Strictfp on a class is now a warning #KT-11109 Fixed 2016-03-12 13:17:11 +03:00
Alexander Udalov
173a838f8c Minor, improve some usages of function type utilities
Re change in FunctionsHighlightingVisitor:
KBI#isFunctionOrExtensionFunctionType already takes care of supertypes, no need
to do additional loop
2016-03-11 21:11:25 +03:00
Alexander Udalov
52309cd10e Minor, drop handling of deprecated kotlin.Extension annotation 2016-03-11 21:11:24 +03:00
Alexander Udalov
90a48d3b35 Minor, move some utilities out of FunctionDescriptorUtil 2016-03-11 21:11:24 +03:00
Alexander Udalov
994dc46bcd Write nullability annotations on extension receiver parameters
#KT-5429 Fixed
2016-03-11 15:20:32 +03:00
Pavel V. Talanov
597c571f25 Fix diagnostic range when some qualifier is unresolved in "@a.b.c.Anno"
#KT-7747 Fixed
2016-03-11 15:00:02 +03:00
Natalia Ukhorskaya
35271af07c Do not convert invalid files to Kotlin 2016-03-11 13:56:10 +03:00
Natalia Ukhorskaya
468c869c0c Show notification for files converted to Kotlin after project sync 2016-03-11 13:56:07 +03:00
Natalia Ukhorskaya
ebaf9899b0 Convert Java Activity to Kotlin after gradle sync finished 2016-03-11 13:56:05 +03:00
Natalia Ukhorskaya
40e89c76a9 Android: add action to create new activity on Kotlin
#KT-11264 Fixed
2016-03-11 13:56:02 +03:00
Natalia Ukhorskaya
b50f2dc6e5 J2K: Use parameters nullability for method call 2016-03-11 12:08:10 +03:00
Natalia Ukhorskaya
c1df0e4aeb Minor: include AbstractJavaToKotlinCopyPasteConversionTest from idea module to J2K Tests run configuration 2016-03-11 12:08:10 +03:00
Natalia Ukhorskaya
c928237699 J2K: drop line breaks in some polyadic expressions 2016-03-11 12:08:10 +03:00
Natalia Ukhorskaya
f1b6bf7817 J2K: convert comments inside qualified expression correctly 2016-03-11 12:08:10 +03:00
Natalia Ukhorskaya
405b0b1df6 J2K: convert annotations in annotations parameters correctly
#KT-11126 Fixed
2016-03-11 12:08:10 +03:00
Natalia Ukhorskaya
7d594970ff J2K: convert protected member used outside of inheritors as public 2016-03-11 12:08:10 +03:00
Alexey Tsvetkov
52be775f28 Minor: add two accidentally deleted files to test case 2016-03-11 02:43:31 +03:00
Alexey Tsvetkov
d352905a72 Add incremental tests for parameters with default values 2016-03-10 23:36:40 +03:00
Ilya Gorbunov
d6506d9770 Minor: reformat code in JS stdlib 2016-03-10 23:24:29 +03:00
Alexey Tsvetkov
d7cda17d2a Minor: make it possible to run gradle incremental tests on CI
* Rename test so it won't be run by maven's integration-test phase
* Adjust allocated heap size
2016-03-10 23:00:11 +03:00
Pavel V. Talanov
5de4ce6f57 Minor, FunctionCodegen: add additional logging on missing function descriptor
Trying to diagnose light class building failures
2016-03-10 19:49:04 +03:00
Pavel V. Talanov
fc16d7c4fd Refactor, minor: extract exception logging to an util object 2016-03-10 19:49:03 +03:00
Pavel V. Talanov
9a5650a045 Add KtPsiFactory#createFileWithLightClassSupport
Allows to create light classes for KtFile built from text
2016-03-10 19:41:59 +03:00
Pavel V. Talanov
4246c7f326 Refactor: Provide API to create KtLightClassForFacade by synthetic file 2016-03-10 19:41:57 +03:00
Pavel V. Talanov
725f128b64 Minor: remove obsolete properties from KtLightClassForFacade 2016-03-10 19:41:55 +03:00
Michael Bogdanov
c38f28fb08 Restore last inline function call site line number on lambda inlining into @InlineOnly function 2016-03-10 17:08:17 +03:00
Denis Zharkov
2e9075115b Minor. Specify type arguments explicitly
Otherwise strange compilation error appears (see KT-11323)
2016-03-10 16:49:00 +03:00
Denis Zharkov
151e55b2fa Use descriptors for building SAM constructors
It helps to get rid of semantics duplicating and fixes known bugs

- SOE in OnlyAbstractMethodFinder.find
- type enhancement for SAM constructors

 #KT-11287 Fixed
 #KT-11322 Fixed
 EA-77989 Fixed
2016-03-10 16:49:00 +03:00
Denis Zharkov
b8b48c5f98 Extract common logic into AbstractTypeConstructor
Mostly it's about detecting loops in supertypes

Test data changes:
- Loops are being disconnected in Java classes too
- functions.kt: loops disconnection mechanism runs supertypes calculation,
so when we start check T it forces F' supertypes calculation, that ends
with CYCLIC_GENERIC_UPPER_BOUND reported on F

 #KT-11287 In Progress
2016-03-10 16:49:00 +03:00
Denis Zharkov
ea9f1b5649 Minor. Pull up method 2016-03-10 16:49:00 +03:00
Nikolay Krasko
d45fc3bad7 Avoid warnings from idea core during file system initialization on Windows.
Do not use idea custom file system for now.
See FileSystemUtil.java and IdeaWin32.java files for details.
2016-03-10 13:32:08 +03:00
Nikolay Krasko
518bd76f35 Don't write false values in SetSlice to binding context
Optimization is significant for USED_AS_RESULT_OF_LAMBDA slice
2016-03-10 13:30:02 +03:00
Nikolay Krasko
71f91c5ce7 Attempt to drop debug name for traces 2016-03-10 13:30:01 +03:00
Michael Bogdanov
1a5bf33190 Fix for KT-11034: Private set with @JvmStatic lateinit var doesn't compile
#KT-11034 Fixed
2016-03-10 10:17:27 +03:00
Ilya Gorbunov
856dd7d909 Minor: make AbstractBackspaceHandlerTest really abstract.
#KT-5728
2016-03-10 05:54:03 +03:00
Ilya Gorbunov
92003f626b kotlin.test: Make inline methods 'todo' and 'currentStackTrace' @InlineOnly not to loose stack trace.
Move related tests to separate file and verify the line numbers.
#KT-11348 Fixed
2016-03-10 04:28:24 +03:00
Pavel V. Talanov
c3a1643c6c Add test for obsolete KT-6481 Mark deprecated constructor calls with strikethrough 2016-03-09 18:41:00 +03:00
Alexey Tsvetkov
df3f163ee2 JS: inline safe calls
#KT-6912 fixed
2016-03-09 16:25:01 +03:00
Dmitry Jemerov
956e9f3847 Merge pull request #828 from cypressious/smart_lambda_param
Implement Smart Enter Processor for adding a lambda block
2016-03-09 12:39:19 +01:00
Kirill Rakhman
828a7de980 Simplify logic for last lambda fixer and set caret directly in first pass 2016-03-09 12:35:48 +01:00
Dmitry Jemerov
9cb980b211 Merge pull request #825 from mcgee/KT-5728
#KT-5728 Fixed
2016-03-09 12:27:36 +01:00
Alexander Udalov
8f7047817f Fix debugger testData after improving toString() of lambdas 2016-03-09 13:41:00 +03:00
Alexander Udalov
eef3631b8a Improve toString() for lambdas and function expressions
#KT-9952 Fixed
2016-03-09 10:49:26 +03:00
Alexander Udalov
bab127ad33 Remove some legacy codegen tests, move some to generated 2016-03-09 10:25:38 +03:00
Alexander Udalov
f8dfaf4599 Merge boxWithJava testData into box, delete BoxWithJava test 2016-03-09 10:25:38 +03:00
Alexander Udalov
16a0ddd2fb Merge boxMultiFile testData into box, delete BoxMultiFile test 2016-03-09 10:25:38 +03:00
Alexander Udalov
e115f80d6c Remove traces of 'boxWithStdlib' directory in other tests 2016-03-09 10:25:38 +03:00
Alexander Udalov
06a67e6602 Merge boxWithStdlib testData into box, delete BoxWithStdlib test 2016-03-09 10:25:38 +03:00
Alexander Udalov
22bfc9786a Add WITH_RUNTIME or WITH_REFLECT to boxWithStdlib testData 2016-03-09 10:25:38 +03:00
Alexander Udalov
2564a2f91f Do not include kotlin-reflect at runtime by default in codegen tests
Change some tests to either include reflection or to avoid using it
2016-03-09 10:25:38 +03:00
Alexander Udalov
20e36438e2 Move some tests from boxWithStdlib/ to box/
Move those tests which do not require neither stdlib nor reflect
2016-03-09 10:25:38 +03:00
Alexander Udalov
54a615fcd3 Support inlining 'arrayOf' and 'emptyArray' with no stdlib in classpath
Previously an exception was thrown on trying to inline arrayOf/emptyArray when
compiling with "-no-stdlib" (or in tests without a dependency on the stdlib),
because these functions were found in a built-in package fragment which does
not have the bytecode associated with it
2016-03-09 10:25:38 +03:00
Kirill Rakhman
f7af927e8f Don't set parameter names and register unresolved error correctly 2016-03-08 22:44:13 +01:00
Anton Sukhonosenko
5bb8bf7381 #KT-5728 Fixed
Code review fixes
2016-03-08 22:30:14 +03:00
Anton Sukhonosenko
31fea1d2b7 #KT-5728 Fixed 2016-03-08 22:30:07 +03:00
Dmitry Jemerov
bb4397612d fix tests: add inspection description 2016-03-08 19:04:23 +01:00
Dmitry Jemerov
649517be3a disable inspection by default 2016-03-08 17:43:25 +01:00
Manas Chaudhari
f54f56d86b Add quickfix for adding documentation 2016-03-08 17:43:16 +01:00
Manas Chaudhari
88fcad02a9 Implement Missing Documentation Inspection
#KT-1494 Fixed
2016-03-08 17:41:18 +01:00
Dmitry Jemerov
3626e90788 use Kotlin icon for Gradle framework support provider 2016-03-08 17:20:39 +01:00
Dmitry Jemerov
bfbd76cc14 KotlinIconProvider: J2K and cleanup 2016-03-08 17:20:36 +01:00
Dmitry Jemerov
26ebc075f4 KotlinIconProvider: rename to .kt 2016-03-08 17:20:32 +01:00
Dmitry Jemerov
ad48ff6a9e use regular Kotlin icon to represent Kotlin run configurations, leave old LAUNCH icon only for REPL
#KT-11041 Fixed
2016-03-08 17:20:30 +01:00
Dmitry Jemerov
94fc58885a use 16x16 icons for framework types and library presentations 2016-03-08 17:20:28 +01:00
Denis Zharkov
68f411395a Fix bridge generation for special builtin override
Use method itself signature as common bridge delegate

 #KT-11285 Fixed
2016-03-07 09:26:02 +03:00
Stanislav Erokhin
11f05005f6 Minor. Update run configuration Update-Dist-Run. 2016-03-07 06:14:21 +03:00
Kirill Rakhman
12237c3cba test lambda parameter smart enter processor 2016-03-05 00:49:26 +01:00
Ilya Gorbunov
9233d5a825 Minor: do not throw error immediately, return error message to 'require' who shall throw an IllegalArgumentException by itself. 2016-03-04 20:28:07 +03:00
Nikolay Krasko
79c00e14ca Restore structure of sources roots 2016-03-04 19:11:19 +03:00
Nikolay Krasko
2e7ac5e4bf Comment target to make changes more noticeable 2016-03-04 19:11:18 +03:00
Nikolay Krasko
ea340f2392 Do not depend on MOVE_SEARCH_FOR_REFERENCES_FOR_FILE global setting
Always search for references if something is under source root and disable search otherwise.

 #KT-11277 Fixed
2016-03-04 19:10:59 +03:00
Nikolay Krasko
8397a4cb5b Don't intercept move when there're no kotlin files
#KT-11277 Fixed
2016-03-04 19:10:05 +03:00
Mikhail Glukhikh
f9034fccb4 Changelog file 2016-03-04 17:09:46 +03:00
Pavel V. Talanov
1affb05b7b Fix typechecker in case of "for ((a, b) in) { }"
Fixes NDFDE
2016-03-04 16:52:34 +03:00
Pavel V. Talanov
363d545bd5 Parameters of function types are always considered local 2016-03-04 16:52:33 +03:00
Pavel V. Talanov
e121ef0fdc Add additional check to AbstractPsiCheckerTest
Check that KtDeclaration.resolveToDescriptor() utility does not throw
2016-03-04 16:52:32 +03:00
Pavel V. Talanov
37500e2cd5 Throw ISE earlier on passing certain types of declaration to ResolveSession#resolveToDescriptor() 2016-03-04 16:52:31 +03:00
Valentin Kipyatkov
5757a306aa Should fix EA-75417 2016-03-04 16:30:25 +03:00
Valentin Kipyatkov
7ba39bd8cf J2K: refactoring - AccessorBodyToExpression processing can be expressed as intention-based 2016-03-04 16:30:25 +03:00
Valentin Kipyatkov
05dc4c1c48 ResolutionFacade for synthetic files should be invalidated on changes in these synthetic files
Fixed EA-77017
2016-03-04 16:30:24 +03:00
Nikolay Krasko
28e85517eb Update project icon 2016-03-04 15:32:44 +03:00
Nikolay Krasko
bee13cd246 Update to IDEA 15.0.4 (143.2287.1) 2016-03-04 15:32:42 +03:00
Alexey Tsvetkov
a3893a3c2e Test IC for adding private inline function
#KT-9681 fixed
2016-03-04 15:11:27 +03:00
Alexey Tsvetkov
9523a8b88d Add missing enum entry added/removed tests
#KT-6200 fixed
2016-03-04 14:43:52 +03:00
Dmitry Petrov
3bbd8979e4 KT-9670: optimize Class <-> KClass wrapping/unwrapping as a special case of boxing/unboxing.
NB doesn't work for arrays of classes.
2016-03-04 10:14:21 +03:00
Dmitry Petrov
2ecb8896cc Converting optimization.boxing to Kotlin: convert & simplify 2016-03-04 10:14:21 +03:00
Dmitry Petrov
0555464a3b Converting optimization.boxing to Kotlin: rename files 2016-03-04 10:14:21 +03:00
Kirill Rakhman
a7ac01ee6f Implement Smart Enter Processor for the last function call argument being a lambda
Fixes #KT-6785
2016-03-03 23:48:29 +01:00
Dmitry Petrov
8660800af7 Constraint system builder shouldn't drop nullability when comparing signatures for specificity. 2016-03-03 19:23:43 +03:00
Dmitry Petrov
8a2b80fe3f Generalize signature comparison: checking for conflicting overloads.
Also, vararg parameter no longer conflicts with Array<out T>
(CONFLICTING_JVM_DECLARATIONS is reported, can be avoided using @JvmName).
2016-03-03 18:26:10 +03:00
Dmitry Petrov
4ac05f1cd8 Generalize signature comparison: callable references overloading conflict resolution. 2016-03-03 18:26:10 +03:00
Dmitry Petrov
c5f3cbc645 Generalize signature comparison: make it work for regular call overloading conflict resolution. 2016-03-03 18:26:10 +03:00
Dmitry Petrov
022162322d Introduce "flat signature" - a generalized abstraction for a (call) signatures that can be compared for specificity. 2016-03-03 18:26:10 +03:00
Dmitry Petrov
77b7128689 Check conflicting overloads for generic signatures. 2016-03-03 18:26:09 +03:00
Nikolay Krasko
ab962d9bae New project wizard with Gradle and Kotlin creates build.gradle with absent version (KT-11213)
#KT-11213 Fixed
2016-03-03 17:19:21 +03:00
Nikolay Krasko
b8ac6e27f5 Cache and postpone requests for plugin update status from UnsupportedAbiVersion notification 2016-03-03 17:19:21 +03:00
Nikolay Krasko
33b65ec692 Refactoring: remove updateHighlightingResult() method as all usages called it with false 2016-03-03 17:19:21 +03:00
Nikolay Krasko
d09139e53a Minor: add private modifiers 2016-03-03 17:19:21 +03:00
Nikolay Krasko
7e39c2321a Show the hint how to resolve incompatible ABI library problem (KT-11024) 2016-03-03 17:19:21 +03:00
Alexander Udalov
04eea69a82 Fix Java 8 codegen box tests 2016-03-03 17:08:47 +03:00
Alexey Tsvetkov
4aa171c1b3 Minor: wait for gradle daemon to stop in tests
KT-8487
2016-03-03 16:45:20 +03:00
Alexey Tsvetkov
2140c270d7 Minor: replace warning with an assert
KT-8487
2016-03-03 16:45:20 +03:00
Alexey Tsvetkov
6ab868ae33 Print file paths relative to project root in gradle incremental compilation logs
KT-8487
2016-03-03 16:45:20 +03:00
Alexey Tsvetkov
8a0bd9446b Minor: remove duplicated daemon stop in tests
KT-8487
2016-03-03 16:45:20 +03:00
Alexey Tsvetkov
6574f60730 Minor: ignore some incremental tests for gradle
KT-8487
2016-03-03 16:45:20 +03:00
Alexey Tsvetkov
ba386f031b Pass isPackage = false when processing class proto
KT-8487
2016-03-03 16:45:20 +03:00
Alexey Tsvetkov
eff972d613 Recompile files with errors next time
KT-8487
2016-03-03 16:45:19 +03:00
Alexey Tsvetkov
7dc35aa343 Always call after compile hook
KT-8487
2016-03-03 16:45:19 +03:00
Alexey Tsvetkov
402436f3eb Add dummy files to fix gradle incremental tests
Gradle won't call kotlin task if source directory is empty

KT-8487
2016-03-03 16:45:19 +03:00
Alexey Tsvetkov
be44db7bd3 Rebuild and compare output class files in gradle incremental tests
KT-8487
2016-03-03 16:45:19 +03:00
Alexey Tsvetkov
9e3284ff2a Make some functions private in classFileComparison.kt
KT-8487
2016-03-03 16:45:19 +03:00
Alexey Tsvetkov
7a7562d685 Build incremental testing utils to kotlin-build-common-test.jar
KT-8487
2016-03-03 16:45:19 +03:00
Alexey Tsvetkov
239e217d19 Move DebugXProtoBuf classes to build-common
KT-8487
2016-03-03 16:45:19 +03:00
Ilya Chernikov
42cbd940c3 simple test on dependent module recompilation
KT-8487
2016-03-03 16:45:18 +03:00
Ilya Chernikov
1f83745862 Fixing destination dir handling to avoid warning from kotlin compiler
KT-8487
2016-03-03 16:45:18 +03:00
Ilya Chernikov
b470bdda23 Class added to proguard - was missing in gradle plugin when incremental compilation is on
KT-8487
2016-03-03 16:45:18 +03:00
Alexey Tsvetkov
7e6c1c75f4 Remove classfile for modified files too
KT-8487
2016-03-03 16:45:18 +03:00
Alexey Tsvetkov
af0925056e Use fresh wrapper version
KT-8487
2016-03-03 16:45:18 +03:00
Alexey Tsvetkov
d730cff88a Add new gradle wrapper to tests
KT-8487
2016-03-03 16:45:18 +03:00
Alexey Tsvetkov
3b697e8693 Minor: simplify File.isKotlinFile utility function
KT-8487
2016-03-03 16:45:18 +03:00
Alexey Tsvetkov
f2cde80aaf Minor: remove unused functions
KT-8487
2016-03-03 16:45:17 +03:00
Alexey Tsvetkov
df157f9db3 Reuse incremental test modification utils from build-common
KT-8487
2016-03-03 16:45:17 +03:00
Alexey Tsvetkov
8df209b436 Move incremental test modification utils to build-common
KT-8487
2016-03-03 16:45:17 +03:00
Alexey Tsvetkov
f4aed97d52 Extract incremental test modification utils
KT-8487
2016-03-03 16:45:17 +03:00
Alexey Tsvetkov
62dce975b3 Fix case when there are only removed kotlin files
KT-8487
2016-03-03 16:45:17 +03:00
Alexey Tsvetkov
7856bd5d0a Add log parser tests
KT-8487
2016-03-03 16:45:17 +03:00
Alexey Tsvetkov
4f2f0f0a60 Remove dependency on kotlin-test in IC test
KT-8487
2016-03-03 16:45:17 +03:00
Alexey Tsvetkov
f3079a3b75 Add kotlin test to gradle incremental build tests dependencies
KT-8487
2016-03-03 16:45:16 +03:00
Alexey Tsvetkov
8e4c11a1e6 Allow using more memory for gradle tests
KT-8487
2016-03-03 16:45:16 +03:00
Alexey Tsvetkov
9fba1a9c71 Move gradle test settings to separate files
KT-8487
2016-03-03 16:45:16 +03:00
Alexey Tsvetkov
a5b28ac62a Recompile subclasses in gradle
KT-8487
2016-03-03 16:45:16 +03:00
Alexey Tsvetkov
1893a6e15b Remove getting lookups with generated classes fq-names
KT-8487
2016-03-03 16:45:16 +03:00
Alexey Tsvetkov
c955a399a3 Exclude from compilation only files that were compiled at last iteration
KT-8487
2016-03-03 16:45:16 +03:00
Alexey Tsvetkov
f93562299c Reuse code from build-common
KT-8487
2016-03-03 16:45:16 +03:00
Alexey Tsvetkov
a5e3ca3596 Minor: change formatting, add logging
KT-8487
2016-03-03 16:45:15 +03:00
Alexey Tsvetkov
a13cf73a5b Minor: put files to set
KT-8487
2016-03-03 16:45:15 +03:00
Alexey Tsvetkov
579b49c7f3 Compile using -module xml
KT-8487
2016-03-03 16:45:15 +03:00
Alexey Tsvetkov
5028184c2a Minor: remove commented code
KT-8487
2016-03-03 16:45:15 +03:00
Alexey Tsvetkov
fa86653ddd Minor: optimize imports
KT-8487
2016-03-03 16:45:15 +03:00
Ilya Chernikov
6b9c3e5eb6 placing incremental compilation under "experimentalIncremental" option
KT-8487
2016-03-03 16:45:15 +03:00
Ilya Chernikov
819735e073 Adding extended gradle incremental cache implementation with map from sources to classfiles and some exposed functionality from parent class, using it to clean classfiles and find dirty lookups from removed files, refactoring dirty lookup calculation
KT-8487
2016-03-03 16:45:15 +03:00
Ilya Chernikov
4be395dcee Implementing weak variant of testing for jps-based tests - test passes if gradle compiles at least all expected files, but if it compiles more - it is not a failure; using this variant for parametrized tests
KT-8487
2016-03-03 16:45:14 +03:00
Ilya Chernikov
ddf3ca276b Implementing workaround for not being able to set java task classpath statically and therefore making it unable to detect changes in kotlin classes
KT-8487
2016-03-03 16:45:14 +03:00
Ilya Chernikov
df63fc30f6 (temp) disabling copying on kotlin-build-sources.jar in attempt to run maven build on TC
KT-8487
2016-03-03 16:45:14 +03:00
Ilya Chernikov
4809e8755e Implementing daemon restart mechanism to prevent problems with low memory watcher (TODO: investigate!)
KT-8487
2016-03-03 16:45:14 +03:00
Ilya Chernikov
c6fe18fbe0 Adding runtime dependency to incremental tests's build.gradle, fixes some tests from jps
KT-8487
2016-03-03 16:45:14 +03:00
Ilya Chernikov
a1ddbb3fe5 skipping tests that using "touch" modification, since gradle do not consider mere timestamp touching as a change and do not call kotlin plugin on it
KT-8487
2016-03-03 16:45:14 +03:00
Ilya Chernikov
c5617f1274 Adding automated parametrized tests for all jps-plugin tests
KT-8487
2016-03-03 16:45:14 +03:00
Ilya Chernikov
7b54751092 Implementing test infrastructure for chcking incremental builds and for importing and executing jps-lugin tests, adding several tests manually
KT-8487
2016-03-03 16:45:14 +03:00
Ilya Chernikov
cde89cb1e8 Implementing support for running gradle tests with daemon
KT-8487
2016-03-03 16:45:13 +03:00
Ilya Chernikov
9498235407 Adding cashes versios handling, refactoring sources to compile computing, minor output refactorings
KT-8487
2016-03-03 16:45:13 +03:00
Ilya Chernikov
db3b6ff10b Switching gradle plugin to incremental compilation based on build lib
KT-8487
2016-03-03 16:45:13 +03:00
Ilya Chernikov
d3d854ec7d Preparing build lib for migrating gradle plugin on it: moving ArgumentUtils from jps plugin, adding buildUtils with incremental compilation functions extracted from kotlinBuilder, minor tweak to lookup storage dump
KT-8487
2016-03-03 16:45:13 +03:00
Ilya Chernikov
6789f2ff0f adding build lib to maven part, adding it's contents to kotlin-compiler-embeddable
KT-8487
2016-03-03 16:45:13 +03:00
Ilya Chernikov
ebae665b78 Adding missing keep statement to proguard config
KT-8487
2016-03-03 16:45:13 +03:00
Ilya Chernikov
d4a86b7f6d Generate proper sources jar for compiler-embeddable, fixing problem with locating embeddable compiler jar in tests, revealed by the change
KT-8487
2016-03-03 16:45:12 +03:00
Ilya Chernikov
66f1f87757 Additional check of analyze resul, prevents a problem of passing BindingContext.EMPTY to the generation stage, fixes kapt tests in gradle plugins
KT-8487
2016-03-03 16:45:12 +03:00
Alexander Udalov
daab3db062 Add WITH_RUNTIME and WITH_REFLECT directives to box tests
Currently all tests in boxWithStdlib/ run with both runtime and reflection
included; eventually they'll be merged into box/ using these directives
2016-03-03 16:11:21 +03:00
Alexander Udalov
f47cc5ce2f Fix runtime dependency in codegen/box tests, delete old doTestWithStdlib logic
Codegen tests in "compiler/testData/codegen/box" started to run with
ConfigurationKind.ALL accidentally in 933be1e. This commit fixes it
2016-03-03 16:08:18 +03:00
Alexander Udalov
5488972b53 Minor, don't create empty tmpdir in codegen tests w/o Java 2016-03-03 16:08:18 +03:00
Alexander Udalov
d011fa8dc6 Add FULL_JDK to tests in codegen/boxWithStdlib/fullJdk/
Drop the old scheme which relied on the directory name
2016-03-03 16:08:18 +03:00
Alexander Udalov
dc085c45b7 Improve exception on creating KClass for classes which are not classes in Kotlin 2016-03-03 16:08:18 +03:00
Alexander Udalov
4553afbd0c Make PropertyAccessorDescriptor#hasBody a front-end utility 2016-03-03 16:08:18 +03:00
Alexander Udalov
ae14d185eb Support setters for Java-method-based properties in reflection
Also heuristically support the corner case of multiple properties with the same
name and signature in a Java class, see the comment in
KDeclarationContainerImpl

 #KT-11258 Fixed
2016-03-03 16:08:18 +03:00
Alexander Udalov
14b1a3a048 Don't fail on requesting members of Java collection classes
RuntimeTypeMapper assumed that JavaPropertyDescriptor was necessarily backed by
JavaField, which has changed when we started to load Java method (or a pair of
methods) overriding a Kotlin property as a property, not as a method. Another
example of this situation is special built-in properties which are mapped to
Java methods, e.g. java.util.Collection#size() <-> kotlin.Collection#size. This
change adds support for the case of a property backed by a JavaMethod.

Note that callable references or usage of any reflection API related to
built-in members is not supported anyway and will currently fail with errors

 #KT-11258 Fixed
2016-03-03 16:08:18 +03:00
Alexander Udalov
6429dd4b04 Preserve JavaPropertyDescriptor type in substitution/copy
JavaPropertyDescriptor.substitute should return JavaPropertyDescriptor,
similarly to what's happening in JavaMethodDescriptor
2016-03-03 16:08:18 +03:00
Alexander Udalov
371051b1d6 Filter out package members from other facades in KPackageImpl
#KT-10690 Fixed
2016-03-03 16:08:18 +03:00
Alexander Udalov
1c0bbcd72b Fix KProperty.javaField for fake overrides
#KT-8131 Fixed
2016-03-03 16:08:18 +03:00
Michael Bogdanov
534a3a11d6 Write additional type parameters for DefaultImpls methods, fix for KT-11121: BadClassFile exception for interface implemented generic properties
#KT-11121 Fixed
2016-03-03 16:11:31 +03:00
Valentin Kipyatkov
5aca50b4ca Enhanced constructor descriptor should not loose its source!
#KT-11256 Fixed
2016-03-02 21:43:43 +03:00
Valentin Kipyatkov
508e1937d6 More diagnostic for EA-75975 2016-03-02 21:43:42 +03:00
Valentin Kipyatkov
135ec78d7d Fixed EA-70945 2016-03-02 21:43:42 +03:00
Alexander Udalov
65662d7c99 Remove incorrect test, to be reconsidered in the future
Before 3ca4097, 'set' signature was not checked at all in this case

 #KT-11272 Open
2016-03-02 20:44:23 +03:00
Dmitry Jemerov
386f22480f don't crash on startup in case of corrupted plugin installation
#KT-11230 Fixed
2016-03-02 18:17:36 +01:00
Alexander Udalov
e849792712 Minor, add KCallableImpl#container 2016-03-02 19:01:10 +03:00
Alexander Udalov
4779e3e9cf Drop traces of old annotations from kotlin.jvm.internal 2016-03-02 19:01:04 +03:00
Alexander Udalov
c93517bc2f Minor, fix test data 2016-03-02 19:00:50 +03:00
Dmitry Jemerov
661c87e464 minor: rename "jet" to "kotlin" in a couple of variable names 2016-03-02 16:47:43 +01:00
Stanislav Erokhin
5141d95a88 Refactoring. Remove dependence intellij-core from resolution module 2016-03-02 18:07:41 +03:00
Stanislav Erokhin
9338aa5633 Refactoring. Copy SmartList from IDEA to util.runtime module. 2016-03-02 18:07:40 +03:00
Alexander Udalov
8e77e16bbd Remove leftovers of platformName and platformStatic in test data
Drop unnecessary imports, rename some tests
2016-03-02 16:47:04 +03:00
Alexander Udalov
beb11e7ac1 Minor, don't create unnecessary class loader in OuterClassGenTest
Read the bytes from the file instead
2016-03-02 15:47:40 +03:00
Alexander Udalov
f1bb31d0a9 Minor, inline one overload of CodegenTestUtil.compileJava 2016-03-02 15:47:40 +03:00
Alexander Udalov
933be1e035 Drop single-file mode of black box codegen tests
Add regression test for #KT-5190
2016-03-02 15:47:39 +03:00
Alexander Udalov
2de7f38427 Migrate boxWithJava tests to multi-file framework 2016-03-02 15:47:38 +03:00
Alexander Udalov
0801ae5364 Minor, delete weird intermediate git files 2016-03-02 15:47:38 +03:00
Alexander Udalov
e7371d2c1a Minor, move boxAgainstJava logic to a separate test class 2016-03-02 15:47:37 +03:00
Alexander Udalov
280ad195ee Migrate boxAgainstJava tests to multi-file framework 2016-03-02 15:47:36 +03:00
Alexander Udalov
26de87d792 Minor, make CodegenTestUtil.compileJava take absolute paths of files 2016-03-02 15:47:36 +03:00
Alexander Udalov
12cf70ac38 Delete legacy codegen tests with Java on annotations
After cleanup, these tests are now duplicated with those in
boxAgainstJava/annotations/
2016-03-02 15:47:35 +03:00
Alexander Udalov
9f67fe2fe3 Adapt CompileKotlinAgainstKotlin test to black box format
Rename/remove some obsolete test cases
2016-03-02 15:47:35 +03:00
Alexander Udalov
0b26e749f6 Improve multi-file test framework in CodegenTestCase
Instead of inheriting from KotlinMultiFileTestWithJava, invoke
KotlinTestUtils.createTestFiles directly. This helps to avoid constructing
unnecessary environment (createEnvironment() was called in setUp, but codegen
tests ignored the created environment because it's not possible to do
generically in codegen tests; the environment kind depends on the source file
usually)
2016-03-02 15:44:28 +03:00
Alexander Udalov
4b96a8131b Inline KotlinLiteFixture 2016-03-02 15:44:28 +03:00
Alexander Udalov
12b6a4ede4 Obsolete KotlinLiteFixture, move utilities to CheckerTestUtilTest 2016-03-02 15:44:28 +03:00
Alexander Udalov
647e188a08 Migrate bytecode text tests to multi-file framework
Get rid of BytecodeTextMultifileTestGenerated
2016-03-02 15:44:28 +03:00
Dmitry Jemerov
fbc2fe74ad Merge pull request #826 from cypressious/catch_fixer
Implement smart enter processors for try, catch (parameters and body) and finally
2016-03-02 13:21:32 +01:00
Dmitry Petrov
9244ef9b81 Do not use 'dup' for postfix increment/decrement: can't do it with collection element in general.
KT-11190, KT-11191, KT-11192, KT-11200, KT-11206
2016-03-02 14:28:06 +03:00
Dmitry Petrov
3ca4097bcc KT-11203: report errors on read-write operations for elements of collections with inconsistent get&set signatures 2016-03-02 14:28:06 +03:00
Mikhail Glukhikh
cd91e44451 Minor fix: intention description directory renamed 2016-03-02 14:13:02 +03:00
Denis Zharkov
eb2c584578 Rename JetTypeMapper 2016-03-02 13:38:46 +03:00
Denis Zharkov
56a2561ab9 Extract JvmMethodGenericSignature from JvmMethodSignature 2016-03-02 13:38:46 +03:00
Denis Zharkov
7bd8fa0b48 Optimize signature propagation
Do not collect super function with trivial signature
2016-03-02 13:38:46 +03:00
Denis Zharkov
d66b9a08dd Do not map generic signature if it's unnecessary 2016-03-02 13:38:46 +03:00
Denis Zharkov
5690d58fd0 Memoize package views in module 2016-03-02 13:38:46 +03:00
Denis Zharkov
4583283515 Search classes by JavaClass through package scope 2016-03-02 13:38:46 +03:00
Denis Zharkov
26ebf46e3e Do not read module mappings more than once 2016-03-02 13:38:46 +03:00
Denis Zharkov
3652cd9c18 Optimize top level class searching in LazyJavaPackageScope
Do not try to search something, that is known not to exist
2016-03-02 13:38:46 +03:00
Denis Zharkov
beb24af5ef Devirtualize calls to PackageFragmentDescriptorImpl.fqName
1. Replace INVOKEINTERFACE with INVOKEVIRTUAL
2. Make callee function final

It helps to decrease one module compilation time by 1-2 seconds
2016-03-02 13:38:46 +03:00
Dmitry Jemerov
3cc3b3fce2 cleanup: remove dead code from ProjectStructureUtil, move code used only during project configuration to ConfigureKotlinInProjectUtils; move function from KotlinRuntimeLibraryCoreUtil into KotlinRuntimeLibraryUtil 2016-03-02 11:15:06 +01:00
Dmitry Jemerov
828e53ce82 reuse Gradle external system ID 2016-03-02 11:15:05 +01:00
Dmitry Jemerov
13f4053950 detect Kotlin source roots
#KT-8592 Fixed
2016-03-02 11:15:03 +01:00
Dmitry Jemerov
8f2dd2c821 better presentation for the list of modules with Kotlin files
#KT-9025 Fixed
2016-03-02 11:15:02 +01:00
Dmitry Jemerov
d994e442da support new IDEA API to allow configuring a Java/JS runtime without prompting the user 2016-03-02 11:15:01 +01:00
Dmitry Jemerov
4ea05354c7 move the calculation of configure kotlin notification out of EDT
#KT-10541 Fixed
2016-03-02 11:15:00 +01:00
Dmitry Jemerov
1976e5f3b0 ConfigureKotlinNotification: J2K and cleanup 2016-03-02 11:14:59 +01:00
Dmitry Jemerov
a6716d9160 ConfigureKotlinNotification: rename to .kt 2016-03-02 11:14:58 +01:00
Dmitry Jemerov
207c5e188b correctly detect Gradle modules (previous code, besides being crazy overcomplicated, didn't always work because module.getModuleFile() returns null immediately after a project has been imported from Gradle and before it has been saved) 2016-03-02 11:14:56 +01:00
Dmitry Jemerov
edcd469e44 API for configuring Kotlin without notification
#KT-11089 Fixed
2016-03-02 11:14:54 +01:00
Dmitry Jemerov
28406bb1fb update URL for Gradle documentation 2016-03-02 11:14:53 +01:00
Dmitry Jemerov
c081a0c758 don't show pre-1.0 versions of Kotlin in "Configure Kotlin in project" action 2016-03-02 11:14:51 +01:00
Alexey Andreev
550c8b12d1 KT-10667 Fix building qualified references to nested type of built-ins, e.g. Map.Entry 2016-03-02 10:31:05 +03:00
Mikhail Glukhikh
96a7febd09 Smart cast is performed now inside 'x as? Type ?: return' safe as / elvis combination #KT-10992 Fixed 2016-03-02 10:07:33 +03:00
Mikhail Glukhikh
c7f3a31517 Create subclass intention implemented #KT-8473 Fixed
Can be used for implementing interfaces / abstract classes / sealed classes or extending open classes
2016-03-02 10:05:27 +03:00
Mikhail Glukhikh
7fa9ca8e9f Minor: potential NPE fix 2016-03-02 10:05:23 +03:00
Nikolay Krasko
247185735a Refactoring: rename file 2016-03-01 16:04:06 +03:00
Nikolay Krasko
59e2449d4e Refactoring: extract methods from JSLibraryStdPresentationProvider 2016-03-01 16:04:05 +03:00
Nikolay Krasko
a21a6c9906 Refactoring: extract methods from JavaRuntimePresentationProvider 2016-03-01 16:04:03 +03:00
Nikolay Krasko
0594abbad6 J2K: LibraryPresentationProviderUtil convert 2016-03-01 16:04:02 +03:00
Nikolay Krasko
6349285b06 J2K: LibraryPresentationProviderUtil rename 2016-03-01 16:03:56 +03:00
Nikolay Krasko
97837e6315 Don't detect libraries in maven, gradle and ide systems as runtime libraries
#KT-11072 Fixed
 #KT-10918 Fixed
2016-03-01 15:55:16 +03:00
Nikolay Krasko
b70d0f8c28 Minor: drop deprecated methods and remove warnings in library presentation providers 2016-03-01 15:55:16 +03:00
Nikolay Krasko
d07d34af93 Configure Kotlin in Project: "All modules containing Kotlin files" lists modules even not containing those files (KT-10831)
#KT-10831 Fixed
2016-03-01 15:55:16 +03:00
Ilya Gorbunov
0cd0554078 JS: Remove unsupported Enumeration declaration.
Relates to #KT-7480
2016-03-01 14:01:39 +03:00
Ilya Gorbunov
e5dbb65ff7 JS: Remove declarations of unsupported SortedSet and TreeSet, make toSortedSet() jvm-only.
Fix completion test.

Relates to #KT-7480
2016-03-01 14:01:38 +03:00
Dmitry Petrov
eb7cf92fbd Minor. Add a test for KT-10732: no redeclaration for
fun <T> List<T>?.foo()
fun <T> List<T>.foo()
2016-03-01 13:54:03 +03:00
Michael Bogdanov
16afe74dc1 Fix for KT-11117: Android Kotlin DEX transformation error when I use arrayOf as an anonymous object property
#KT-11117 Fixed
2016-02-29 12:53:58 +03:00
Kirill Rakhman
ed152bccfa Implement smart enter processors for try, catch (parameters and body) and finally with tests
Fixes #KT-10013
2016-02-28 14:31:59 +01:00
Alexander Udalov
2d5b7a8768 Minor, move CompileKotlinAgainstKotlin tests to codegen/ 2016-02-27 16:31:46 +03:00
Alexander Udalov
c4b4a23cb1 Minor, move abstract codegen tests out of 'generated'
Delete unused AbstractBlackBoxCodegenJava8Test
2016-02-27 16:22:25 +03:00
Alexander Udalov
ea522fe606 Minor, rename AbstractSMAPBaseTest -> SMAPTestUtil
Remove unnecessary inheritance
2016-02-27 16:09:27 +03:00
Alexander Udalov
c72f29b13a Move KotlinTestWithEnvironment to org.jetbrains.kotlin.test
It's not really related to lazy-resolve and should be also probably located
near KotlinTestWithEnvironmentManagement
2016-02-27 15:40:07 +03:00
Alexander Udalov
25cebe03e9 Fix inline codegen tests after regroup and rename 2016-02-27 15:40:06 +03:00
Alexander Udalov
f7958edf21 Improve test data format for SMAP codegen tests
Instead of comments in a Kotlin source file, add a .smap with the contents of
the source mapping data (and possible comments)
2016-02-27 15:40:06 +03:00
Alexander Udalov
cc84aabdcf Migrate boxInline tests to new multi-file framework 2016-02-27 15:40:05 +03:00
Alexander Udalov
fa1f7d988e Get rid of CompileKotlinAgainstMultifileKotlinTestGenerated and boxMultifileClasses/
Merge tests in boxMultifileClasses/calls to one test case; copy the two
resulting tests (+ change box to main) to compileKotlinAgainstKotlin
2016-02-27 15:40:05 +03:00
Alexander Udalov
cc8af573f9 Migrate CompileKotlinAgainstKotlin test to multi-file framework 2016-02-27 15:40:04 +03:00
Alexander Udalov
5884d4be79 Get rid of code duplication in kt-against-kt tests 2016-02-27 15:40:03 +03:00
Alexander Udalov
e0b6f12737 Migrate boxMultiFile and boxMultifileClass tests to new multi-file tests
AbstractCompileKotlinAgainstMultifileKotlinTest is broken in this commit; will
be fixed later
2016-02-27 15:40:03 +03:00
Alexander Udalov
4fb0453cea Introduce multi-file test framework to codegen tests
Currently still only single-file tests are supported; this will be fixed in
subsequent commits
2016-02-27 15:40:01 +03:00
Alexander Udalov
adea547d8a Inline KotlinLiteFixture#loadFile, refactor surroundings 2016-02-27 15:40:00 +03:00
Alexander Udalov
1be6046fc2 Minor refactorings in legacy codegen tests
Use loadFile() + getPrefix() instead of loadFile(String)
2016-02-27 15:40:00 +03:00
Alexander Udalov
5f7bc601a8 Refactor/simplify KotlinMultiFileTestWithJava and subclasses 2016-02-27 15:39:59 +03:00
Ilya Gorbunov
06af22b2c1 JS: Remove LinkedList declaration since the implementation is missing.
#KT-7480 Fixed
2016-02-27 02:49:05 +03:00
Ilya Gorbunov
f9e97882fc Minor: remove obsolete TODO. 2016-02-27 00:52:31 +03:00
Ilya Gorbunov
19fa2f51ea Review and correct exception messages. 2016-02-27 00:52:30 +03:00
Ilya Gorbunov
00e30e417f Cleanup: suppress warnings where appropriate. 2016-02-26 21:54:57 +03:00
Ilya Gorbunov
f025a3b8c4 Cleanup: rename parameters to match overriden method (in private implementations).
Remove some redundancy.
2016-02-26 21:54:55 +03:00
Kirill Rakhman
19130cdd71 Clean up KotlinMissingIfBranchFixer 2016-02-26 18:52:07 +01:00
Ilya Gorbunov
b19c0363fd Clarify parameter order of lambda function parameter of *Indexed functions.
#KT-10953 Fixed
2016-02-26 20:47:26 +03:00
Ilya Gorbunov
0e0455daeb Improve the documentation of binarySearch functions.
#KT-10198 Fixed
2016-02-26 20:31:05 +03:00
Dmitry Jemerov
103f8300fb don't show "Change type arguments" fix when there's nothing to change
#KT-11178 Fixed
2016-02-26 16:11:24 +01:00
Pavel V. Talanov
a4c005fefd Update existing test data depending on diagnostic parameter rendering 2016-02-26 14:45:11 +03:00
Pavel V. Talanov
5304ddfca3 DelegatedPropertyResolver: Use SHORT_NAMES_IN_TYPES for ad-hoc diagnostics parameter rendering 2016-02-26 14:45:11 +03:00
Pavel V. Talanov
48094db9dc DefaultErrorMessages: remove hardcoced fq names for built-in types 2016-02-26 14:45:10 +03:00
Pavel V. Talanov
e397544aee Improve NONE_APPLICABLE ide renderer 2016-02-26 14:45:10 +03:00
Pavel V. Talanov
8cbc9eee3e Improve AMBIGUOUS_CALLS renderer 2016-02-26 14:45:09 +03:00
Pavel V. Talanov
b399bbffd7 Improve JvmConflictingDeclarations diagnostics rendering 2016-02-26 14:45:08 +03:00
Pavel V. Talanov
d0b27a5fe2 Update test data for diagnostics test 2016-02-26 14:45:07 +03:00
Pavel V. Talanov
5dcfdb3996 Test return type mismatch on override diagnostic rendering 2016-02-26 14:45:07 +03:00
Pavel V. Talanov
7ba4adf006 Add tests for diagnostics rendering 2016-02-26 14:45:06 +03:00
Pavel V. Talanov
4ab5aabfa0 Adjust existing test data for diagnostic messages 2016-02-26 14:45:06 +03:00
Pavel V. Talanov
e4cf090720 Adjust diagnostics rendering so that short classifier names are rendered unless the name is ambiguous in corresponding RenderingContext 2016-02-26 14:45:05 +03:00
Pavel V. Talanov
c7cb596f74 Rename: NameShortness -> ClassifierNamePolicy 2016-02-26 14:45:05 +03:00
Pavel V. Talanov
ced5a6c917 Introduce RenderingContext and add as parameter to DiagnosticParameterRenderer#render
RenderingContext holds data about the whole diagnostics allowing to adjust rendering of its parameters
2016-02-26 14:45:04 +03:00
Pavel V. Talanov
4f18b3da53 Rename: Renderer -> DiagnosticParameterRenderer and move it out of descriptors module
DescriptorRenderer is no longer a renderer
DescriptorRenderers should not be used to render diagnostic parameters explicitly
2016-02-26 14:45:02 +03:00
Pavel V. Talanov
41f5b5e8b1 Minor: expose DescriptorRender#renderMessage 2016-02-26 14:45:01 +03:00
Pavel V. Talanov
a3bab638eb Move MultiRenderer to a more suitable package 2016-02-26 14:45:00 +03:00
Pavel V. Talanov
40d538731b Move NameShortness to a separate file and refactor it to be an interface 2016-02-26 14:45:00 +03:00
Pavel V. Talanov
77f74a929a Revert 06215ca932
It led to parameter names missing in parameter info and completion for compiled java code used from kotlin
See KT-11039
2016-02-26 14:05:47 +03:00
Natalia Ukhorskaya
7b1afa1e01 Rearrange Colors page for Kotlin 2016-02-26 12:34:24 +03:00
Natalia Ukhorskaya
e0cb0eb1de Highlight super and this as keywords 2016-02-26 12:34:24 +03:00
Natalia Ukhorskaya
d361aca0fb Change some colors in Darcula after refactoring of colors in IDEA 2016-02-26 12:34:24 +03:00
Alexander Udalov
63db41a712 Minor, refactor BuiltInDefinitionFile.read to get rid of isInternalBuiltInFile 2016-02-26 11:29:10 +03:00
Alexander Udalov
5f39f628c9 Fix and test built-ins decompiler for incompatible version 2016-02-26 11:29:10 +03:00
Alexander Udalov
440b23ddf6 Minor, extract createIncompatibleAbiVersionDecompiledText to common/ 2016-02-26 11:29:10 +03:00
Alexander Udalov
f82ec6711d Remove SerializedResourcePaths and BuiltInsSerializedResourcePaths
Most of members now only make sense for JS, move the rest to
BuiltInSerializerProtocol
2016-02-26 11:29:10 +03:00
Alexander Udalov
4bacabe354 Don't read old built-in files in decompiler 2016-02-26 11:29:10 +03:00
Alexander Udalov
996c5848c2 Simplify deserialization components for built-ins and JS 2016-02-26 11:29:10 +03:00
Alexander Udalov
f130755972 Use new built-in binary format (.kotlin_builtins files) in IDE
Instead of .kotlin_class and .kotlin_package files, .kotlin_builtins files are
now supported: they are decompiled to a long file consisting of all non-real
classes (those which do not also have .class files) and members in the
corresponding package.

Unlike the old files, .kotlin_builtins files have a binary version in the
beginning, which allows us to skip decompilation and stub building in case the
file has an unsupported version. This could previously lead to exceptions, see
KT-11077, EA-79339.

The change in DecompiledTextFactory is needed because without "defined in ..."
the keys for members in the long decompiled file are not unique, as there are
multiple members with exactly the same signatures in different classes (e.g.
arithmetic operations in primitive classes).

Remove testData files with the decompiled text and stubs of built-in symbols
because now that the whole package is decompiled to a single file, it would be
painful to update these files each time something in built-in sources changes

 #KT-11077 Fixed
2016-02-26 11:29:10 +03:00
Alexander Udalov
cb490dbe4f Minor, add BuiltInsBinaryVersion.readFrom(InputStream) 2016-02-26 11:29:10 +03:00
Alexander Udalov
c81d76414f Drop serialization of old binary built-in files (.kotlin_class, .kotlin_package) 2016-02-26 11:29:10 +03:00
Ilya Chernikov
c39cec4869 Fixing daemon memory test on windows by increasing the expected threshold 2016-02-26 10:23:37 +03:00
Ilya Gorbunov
029b918ec9 Another CharSequence.repeat implementation in JS from polyfill of String.repeat.
#KT-3064
2016-02-26 01:26:05 +03:00
Ilya Gorbunov
f564adfdd4 Optimize trivial cases of CharSequence.repeat. Provide CharSequence.repeat for JS.
#KT-3064 Fixed
2016-02-26 01:23:30 +03:00
Stanislav Erokhin
7a43d62408 Move sources to resolution module 2016-02-26 00:39:37 +03:00
Stanislav Erokhin
5bb1f3b2ea Create resolution module. 2016-02-26 00:39:37 +03:00
Stanislav Erokhin
310c68f633 Removed lock level WRITING from LexicalWritableScope. 2016-02-26 00:39:36 +03:00
Stanislav Erokhin
f85abed6e6 Replace RedeclarationHandler by LocalRedeclarationChecker 2016-02-26 00:39:35 +03:00
Ilya Gorbunov
7d32fad063 Improve docs for trimIndent/trimMargin.
#KT-9786
2016-02-25 22:09:15 +03:00
Ilya Gorbunov
77f148bec6 Improve docs for substring/subsequence. 2016-02-25 22:09:14 +03:00
Ilya Gorbunov
c946d283ff Fix example for Throws annotations.
Improve code escaping and wording for JvmSuppressWildcards.
2016-02-25 22:09:14 +03:00
Ilya Gorbunov
a100ffd66b Minor: improve wording in the deprecation message. 2016-02-25 21:16:45 +03:00
Alexander Udalov
71170d32cb Exclude kotlin.reflect.jvm.internal.impl from import and completion in project 2016-02-25 20:30:00 +03:00
Nikolay Krasko
edb684fee0 Print kotlin compiler version in build script where withKotlin tag is used 2016-02-25 18:49:53 +03:00
Michael Bogdanov
1b94904684 Prohibited @Strictfp annotation on classes (it's not supported yet), Fix for KT-11109: Strictfp annotation do nothing when applied to class
#KT-11109 Fixed
2016-02-25 18:07:51 +03:00
Natalia Ukhorskaya
894c11d412 Merge pull request #820 from JakeWharton/jw/extra-source-folders
Include source folders from registered source-generating tasks.
2016-02-25 12:07:20 +03:00
Denis Zharkov
fe7393dc1a Fix testData 2016-02-25 11:15:18 +03:00
Denis Zharkov
4c88e2a0bc Use original descriptor when mapping fake override
Otherwise wrong CONFLICTING_INHERITED_JVM_DECLARATIONS were reported

 #KT-10691 Fixed
2016-02-25 11:10:48 +03:00
Michael Bogdanov
582b1c5e66 Fix for KT-11163: Incorrect codegen in case of custom compareTo on primitives
#KT-11163 Fixed
2016-02-25 10:16:09 +03:00
Denis Zharkov
36e84ff23a Minor. Add tests for obsolete issues
#KT-8900 Obsolete
 #KT-8901 Obsolete
2016-02-25 08:31:58 +03:00
Denis Zharkov
914447b7eb Do not treat uninitialized value as a reason to retain boxing
See testData/simpleUnitializedMerge.kt
On exit from `if` we merge value in variable with slot 1 (x):
- from `if` body we get BoxedBasicValue
- from outer block we get UNITIALIZED_VALUE

So we just suppose `x` is unitialized after `if`
and there's no need to mark BoxedValue as unsafe to remove
because it's anyway can't be used after `if`

 #KT-6842 Fixed
2016-02-25 08:31:19 +03:00
Denis Zharkov
2f4b8dab25 Minor. Replace 'filter' with 'any' 2016-02-25 08:31:19 +03:00
Stanislav Erokhin
226e690a86 Minor. refactoring in Qualifier. 2016-02-24 19:33:10 +03:00
Stanislav Erokhin
f130de2468 Remove scope from Qualifier 2016-02-24 19:33:10 +03:00
Stanislav Erokhin
4b3c6d52ef Remake QualifierReceiver 2016-02-24 19:33:09 +03:00
Stanislav Erokhin
8c5339cccf Minor. Remove class ClassifierQualifier and create special ClassValueReceiver 2016-02-24 19:33:09 +03:00
Stanislav Erokhin
2f0ae6f176 Minor. Remove name from Qualifier. 2016-02-24 19:33:08 +03:00
Stanislav Erokhin
5240233eda Minor. Remove HIDDEN_ANNOTATION_FQ_NAME. 2016-02-24 19:33:08 +03:00
Stanislav Erokhin
6a1664c1b3 Minor. removed explicitExtensionReceiverForInvoke from CallCandidateResolutionContext. 2016-02-24 19:33:07 +03:00
Stanislav Erokhin
1ef4a958fd Minor. removed call checked from ResolutionContext. 2016-02-24 19:33:07 +03:00
Stanislav Erokhin
6591f8a2ab Minor. removed unused method from AdditionalTypeChecker. 2016-02-24 19:33:06 +03:00
Stanislav Erokhin
24829ee3ac Minor. rename 2016-02-24 19:33:06 +03:00
Stanislav Erokhin
665e13e4ec Remove obsolete code about warnings for expressions which can be null in java(has @Nullable annotation in java) and in kotlin not marked nullable.
After introducing flexible types and signature enhancement there is no more such expressions.
2016-02-24 19:33:05 +03:00
Michael Bogdanov
b20f49a2c4 Default body compilation for inline fun extracted from InlineCodegen to separate one 2016-02-24 14:06:29 +03:00
Michael Bogdanov
f149f16882 Separately process inline function default impl body compilation (non general inline magic),
Fix for KT-10670 Debugger: Evaluate Expression/Watches fail for inline function parameter initialized with default value

 #KT-10670 Fixed
2016-02-24 14:06:29 +03:00
Michael Bogdanov
7bfb5a0c60 InliningInstructionAdapter refactoring: renamed to MethodBodyVisitor, added additional empty owerrides 2016-02-24 14:06:28 +03:00
Dmitry Jemerov
54de48604d Merge pull request #824 from cypressious/setter_smart_enter
Implement Smart Enter for Property Setters #KT-9996
2016-02-24 11:27:39 +01:00
Kirill Rakhman
f3e68fdeaa Implement smart enter processors for property setter with tests
Fixes #KT-9996
2016-02-23 17:01:02 +01:00
Kirill Rakhman
c1a2570dd4 replace null checks with elvis operator 2016-02-23 16:35:12 +01:00
Alexander Udalov
c71c344b8a Fix NCDFE on primitive iterators during boxing optimization
The real fix is in ProgressionIteratorBasicValue's constructor, other changes
are refactorings

 #KT-11153 Fixed
2016-02-22 19:49:39 +03:00
Ilya Gorbunov
3c35395cf7 Minor: refactor some tests to use nested classes. 2016-02-21 04:18:11 +03:00
Ilya Gorbunov
7997aea5c3 Make Destructured nested class of MatchResult interface in JS too. 2016-02-21 04:18:09 +03:00
Ilya Gorbunov
acc6cc539a Mark CollectionAssertions as deprecated due to their experimental status. 2016-02-21 03:33:12 +03:00
Ilya Gorbunov
bf536afe5f Mark reified assertFailsWith with InlineOnly to preserve stack traces. 2016-02-21 03:20:07 +03:00
Ilya Gorbunov
119eceb80b Minor: correct file name 2016-02-21 03:20:05 +03:00
Alexander Udalov
c0a0a8afd7 Revert "Minor, pass -Xmx256m to compiler in CompilerSmokeTestBase"
This reverts commit 61f5e2f9cf.

Causes OOM on TeamCity
2016-02-20 22:21:58 +03:00
Zalim Bashorov
82a049b319 JS: fix definition nested classes inside interfaces 2016-02-20 21:20:42 +03:00
Alexey Andreev
718c15806c KT-10785 Ensure that access to private properties from inside memeber functions of objects is performed via 'this' rather that by FQN. 2016-02-20 19:16:26 +03:00
Alexey Andreev
0a2cff9056 KT-10785 Fixed. Change predicate that decides whether to dereference assignment target as a property accessor or as a backing field. 2016-02-20 19:16:26 +03:00
Alexander Udalov
dbde566b66 Minor, fix typo in test class name 2016-02-20 19:05:40 +03:00
Alexander Udalov
1a5a077bd6 Replace map + filterNotNull -> mapNotNull in project 2016-02-20 19:05:30 +03:00
Alexander Udalov
61f5e2f9cf Minor, pass -Xmx256m to compiler in CompilerSmokeTestBase
This fixes CompilerFileLimitTest when running locally
2016-02-20 19:05:23 +03:00
Alexey Andreev
a4db14eff5 [KT-4124] Add tests for qualified labeled super access to functions and properties 2016-02-20 15:19:31 +03:00
Alexey Andreev
d83f926658 [KT-4124] Refactor super calls and fix calls to Any::equals 2016-02-20 15:19:31 +03:00
Alexey Andreev
6adcafafbb [KT-4124] Minor refactoring and cleanup 2016-02-20 15:19:30 +03:00
Alexey Andreev
d067068774 [KT-4124] Support invocation of constructor of inner class from extension method 2016-02-20 15:19:30 +03:00
Alexey Andreev
9238afc439 [KT-4124] Fix some tests from common testData 2016-02-20 15:19:29 +03:00
Alexey Andreev
f5786dd567 [KT-4124] Add test case for nested/inner classes inside native class. Add diagnostic of inner classes inside native classes. 2016-02-20 15:19:28 +03:00
Alexey Andreev
040a646174 [KT-4124] Add test case for nested native class 2016-02-20 15:19:28 +03:00
Alexey Andreev
68828317b8 [KT-4124] Suppress error reporting about native local classes 2016-02-20 15:19:27 +03:00
Alexey Andreev
e3c7cd0021 [KT-4124] Add diagnostic that reports of local classes. Remove test for diagnostic of nested types 2016-02-20 15:19:27 +03:00
Alexey Andreev
8537d327fa [KT-4124] Add diagnostic of a several cases of local classes like class in object in function. 2016-02-20 15:19:26 +03:00
Alexey Andreev
c705fafc95 [KT-4124] Add support for super<T>@Outer.functionName() case 2016-02-20 15:19:25 +03:00
Alexey Andreev
9e0e734021 [KT-4124] Add support for super<T>@Outer.propertyName case 2016-02-20 15:19:25 +03:00
Alexey Andreev
20b3361edc [KT-4124] Fix test compatibility between JS and Java backed for several tests 2016-02-20 15:19:24 +03:00
Alexey Andreev
c231ecfe50 [KT-4124] Fix the following: when test can't be compiled, sometimes JUnit reported that .js file was not found instead of reporting actual errors. 2016-02-20 15:19:24 +03:00
Alexey Andreev
3f5be335a9 [KT-4124] Fix bug when constructing like this: "A.Companion.B()" 2016-02-20 15:19:23 +03:00
Alexey Andreev
700159987b [KT-4124] Fix bug when inner A.B extends inner A.C not passing outer reference there 2016-02-20 15:19:23 +03:00
Alexey Andreev
8f74720973 [KT-4124] Add more generated tests from Java backend. Fix support of deeply nested classes (i.e. A.B.C) and nested enums. 2016-02-20 15:19:22 +03:00
Alexey Andreev
c48c6bc055 [KT-4124] Use generated test to avoid duplication of test data of inner classes. Add support of classes contained within objects. 2016-02-20 15:19:22 +03:00
Alexey Andreev
133b84160e [KT-4124] Fix case of super@labeled recever. Add names to metadata of inner classes. 2016-02-20 15:19:21 +03:00
Alexey Andreev
4efceb95e3 [KT-4124] Add less trivial tests 2016-02-20 15:19:20 +03:00
Alexey Andreev
a8014dec50 [KT-4124] Add support for simple nested classes 2016-02-20 15:19:20 +03:00
Stanislav Erokhin
ae7b048fdb Minor. rename 2016-02-20 14:55:18 +03:00
Stanislav Erokhin
3e366f6b2d Minor. cleanup 2016-02-20 14:55:18 +03:00
Stanislav Erokhin
45de06ac0c Minor. Removed generics. 2016-02-20 14:55:17 +03:00
Stanislav Erokhin
63b3cbafa4 Remove old resolution algorithm. 2016-02-20 14:55:17 +03:00
Stanislav Erokhin
acdd807e91 Support "given candidates" mode in new resolution algorithm. 2016-02-20 14:55:16 +03:00
Stanislav Erokhin
daee95f2c4 Refactoring: create separate util function for create constructors resolution candidates 2016-02-20 14:55:16 +03:00
Stanislav Erokhin
7de2013a3e KT-3856 Wrong inner class inaccessible diagnostic for extension to outer class
#KT-3856 Fixed
2016-02-20 14:55:15 +03:00
Zalim Bashorov
61cc8394e8 Minor: fix testdata 2016-02-20 13:11:23 +03:00
Alexander Udalov
1b8f934b54 Delete deprecated enum 'values' property 2016-02-19 22:28:44 +03:00
Alexander Udalov
1eeb72e073 Do not create empty static scope instances for non-enum classes 2016-02-19 22:28:44 +03:00
Alexander Udalov
60fe64dcaa Remove obsolete lazy code in LazyClassDescriptor
This was added in a072550931 when we thought
making 'annotation' an annotation instead of a modifier would be a good idea;
we weren't be able to resolve the class kind immediately then. This is no
longer the case
2016-02-19 22:28:44 +03:00
Zalim Bashorov
d832a3d290 KotlinBuilder: use proper API to update Java mappings 2016-02-19 19:11:10 +03:00
Zalim Bashorov
ae32698c78 Minor: add more sources for jps library 2016-02-19 19:11:09 +03:00
Zalim Bashorov
05eff9028f New IC: don't fail on unsupported difference kinds and process SUPERTYPE_ID_LIST correctly 2016-02-19 19:10:44 +03:00
Dmitry Petrov
90be4f8ea5 KT-6745: change message to reflect that a super qualifier should be an immediate supertype,
not just a supertype.
2016-02-19 16:49:59 +03:00
Michael Bogdanov
1d17bee6cc Don't generate source mapping on inlining 'InlineOnly' functions 2016-02-19 16:08:03 +03:00
Michael Bogdanov
6f1def9366 isInlineOnly renamed to isInlineOnlyOrReified 2016-02-19 16:08:02 +03:00
Dmitry Petrov
30c2abba3c KT-9550: distinguish signature conflict on override from signature conflict of inherited members.
Add a common OverridingStrategy class for cases where we don't care (yet) about precise diagnostics.
2016-02-19 15:59:08 +03:00
Mikhail Glukhikh
883e2e4d2b KT-9498 extension: now type can be inferred for getter with expression body 2016-02-19 14:49:25 +03:00
Michael Bogdanov
405c21a17e Fix for KT-11081: Reified type parameters are lost in anonymous object in inline function when using default value parameters
#KT-11081 Fixed
2016-02-19 14:22:29 +03:00
Mikhail Glukhikh
4c1c64fa08 Quick fix for adding arrayOf wrapper for annotation parameters #KT-10063 Fixed 2016-02-19 13:32:49 +03:00
Mikhail Glukhikh
c9c391e688 Specify property type by accessor type (preliminary) #KT-9498 Fixed 2016-02-19 13:32:46 +03:00
Alexander Udalov
36de3008e3 Fix visibility flags for lambda classes in InnerClasses attribute 2016-02-19 12:52:40 +03:00
Ilya Chernikov
343735e36c fixing test after changing cleanup scheme - first it is now required to rebuild sources, and therefore consumed memory is increased 2016-02-18 21:06:38 +01:00
Ilya Chernikov
8065e490e8 performing cleanup (and memory usage reporting) only if kotlin compiler was actually called, should fix e.g. KT-10127 2016-02-18 21:06:37 +01:00
Alexey Tsvetkov
d0efd4083f Call System.gc only when when log level is debug, fixes KT-11022 2016-02-18 21:06:36 +01:00
Denis Zharkov
bc5110550a Release generated bytecode after each processed part
Part here means separate '.kt' file or multi-file facade
Now this memory optimization doesn't work with jar's,
because there is no simple way to write them incrementally.
2016-02-18 21:22:04 +03:00
Denis Zharkov
b87cc5712c Minor. Weaken value parameter types: ClassFileFactory -> OutputFileCollection 2016-02-18 21:22:04 +03:00
Denis Zharkov
fd32b8dd19 Minor. Transform method to void 2016-02-18 21:22:04 +03:00
Denis Zharkov
cecb998fd3 Simplify ClassFileFactory state
Before this change it contained maps to complex object,
after it retains only necessary information:
- sources files for package parts
- PackageParts objects grouped by package fq name

Both of them needed for writing module mappings
2016-02-18 21:22:04 +03:00
Denis Zharkov
f8f996b2f6 Minor. Move 'done()' call into MultifileClassCodegen itself 2016-02-18 21:22:03 +03:00
Natalia Ukhorskaya
0f3ecab2b4 Replace deprecated usages of CodeInsightColors 2016-02-18 18:37:03 +03:00
Ilya Gorbunov
6b1ed8fd61 JS: use slice() instead of slice(0) to copy arrays (minor). 2016-02-18 17:37:33 +03:00
Ilya Gorbunov
cbd38f007c JS: Do not create a copy of already cloned vararg array.
JVM: Do not create copy of vararg array it it's already Object[].
2016-02-18 17:37:31 +03:00
nik
c69d332db9 until-build set to 146.9999 to make Kotlin plugin compatible with new IDEA builds 2016-02-18 10:11:12 +03:00
Alexander Udalov
35a4aeeeba CLI tests: add LauncherScriptTest instead of generated 'kotlinc' script tests
The compiler behavior on test data in compiler/testData/cli is already tested
with CliTestGenerated, which is 4x faster and does not require to rebuild the
compiler jar with 'ant dist'. Leave only several simple tests to check that
'kotlinc', 'kotlinc-jvm' and 'kotlinc-js' scripts work
2016-02-17 20:52:00 +03:00
Alexander Udalov
04ccca8adc CLI tests: convert to generated 2016-02-17 20:52:00 +03:00
Alexander Udalov
a53166b732 CLI tests: rename CliBaseTest to AbstractCliTest 2016-02-17 20:51:59 +03:00
Alexander Udalov
762504d5e4 CLI tests: convert to JUnit 3 2016-02-17 20:51:58 +03:00
Alexander Udalov
f74988cbec CLI tests: get rid of CliCommonTest 2016-02-17 20:51:58 +03:00
Alexander Udalov
3b22483fb2 CLI tests: move file existance checks to config files 2016-02-17 20:51:57 +03:00
Alexander Udalov
7a6cc71454 CLI: disable colors on platforms unsupported by jansi
#KT-10605 Fixed
2016-02-17 20:51:48 +03:00
Alexander Udalov
2e13377d4a J2K ReplInterpreter: prettify 2016-02-17 20:51:11 +03:00
Alexander Udalov
5670e7f750 J2K ReplInterpreter: convert 2016-02-17 20:51:11 +03:00
Alexander Udalov
2b2c4b3610 J2K ReplInterpreter: move .java -> .kt 2016-02-17 20:51:11 +03:00
Alexey Andreev
8497931455 #EA-79158 Fix translation of empty 'when' statement 2016-02-17 19:18:25 +03:00
Alexey Andreev
133402c1ca #EA-79158 Report code fragment when translator throws an exception. It should help to get a code sample for this issues and all similar issues. 2016-02-17 19:18:24 +03:00
Michael Bogdanov
0283fea835 Optimize recursive string concatenation 2016-02-17 16:53:19 +03:00
Michael Bogdanov
8835b0599a Inline preevaluated string and primitive only constants in compilation time, don't inline const references in non-annotation context, fix for KT-11025: Don't inline const val in compare instuctions
#KT-11025 Fixed
2016-02-17 16:53:18 +03:00
Michael Bogdanov
7c2920febe Don't allow use standalone constants in complexExpressions, fix for KT-11043: Inconsisten result for class literal and string concatenation
#KT-11043 Fixed
2016-02-17 16:53:18 +03:00
Michael Bogdanov
af3437626b Properly calculate isConst for java properties 2016-02-17 16:53:17 +03:00
Natalia Ukhorskaya
c5d788d049 Debugger: do not put breakpoints at lines from another file in case of inline function 2016-02-17 15:08:56 +03:00
Natalia Ukhorskaya
42927bb078 Make function delegated to sam adapter synthetic 2016-02-17 15:08:53 +03:00
Natalia Ukhorskaya
7fb1848bd5 Minor, fix exception: do not try to get line start offset for line < 0 and line == lineCount() 2016-02-17 15:07:19 +03:00
Mikhail Glukhikh
657459ef22 Source of KNPE removed #EA-79002 Fixed 2016-02-17 11:52:49 +03:00
Alexey Sedunov
651b00c323 Pull Members Up: Always insert spaces between keywords
#KT-10971 Fixed
2016-02-17 11:31:46 +03:00
Alexey Sedunov
e1b4f45b35 Implement Abstract Members Intention: Fix EA-79052 2016-02-17 11:31:45 +03:00
Alexey Sedunov
27ea2dc6f9 Change Signature: Fix EA-77624 2016-02-17 11:31:41 +03:00
Alexey Sedunov
d587bb2ea6 Change Signature: Support Change Signature quick-fix for Java -> Kotlin case
#KT-9401 Fixed
2016-02-17 11:31:40 +03:00
Ilya Gorbunov
8761819117 StdLib generators: provide extension points for family properties specific to documentation and code. 2016-02-17 04:23:18 +03:00
Stanislav Erokhin
9781578af2 Update copyright in generated classes. 2016-02-16 20:31:15 +03:00
Stanislav Erokhin
341b251e4d Update copyright in generated tests. 2016-02-16 18:59:10 +03:00
Mikhail Glukhikh
5def6eae5b Correct handling of erroneous code during code extraction 2016-02-16 18:50:24 +03:00
Mikhail Glukhikh
eed4aa71db No assertion error in getContainingPseudocode #KT-10983 Fixed
Also #EA-72954 Fixed
2016-02-16 18:50:20 +03:00
Alexey Andreev
f6fadc4fa5 [KT-10614] Fix passing of inline.kt test 2016-02-16 16:02:17 +03:00
Alexey Andreev
79b42d7fe5 [KT-10614] Fix issue: copy array on vararg call with spread operator 2016-02-16 16:02:16 +03:00
Mikhail Glukhikh
1bbc46729c Effective visibility: concise diagnostic messages #KT-10761 Fixed
Also #KT-9760 Fixed
2016-02-16 15:58:50 +03:00
Mikhail Glukhikh
3049961b9a Revert "Implicit exhaustive when annotation / highlighting"
This reverts commit 0cc09872b6.
2016-02-16 15:57:38 +03:00
Denis Zharkov
d344b5b991 Optimize completion for overridden descriptors 2016-02-16 12:01:14 +03:00
Denis Zharkov
36606fd944 Run slow flexible type assertions only in test mode 2016-02-16 12:01:13 +03:00
Denis Zharkov
961b72682a Drop unnecessary call to substituted 'overriddenDescriptors' 2016-02-16 12:01:13 +03:00
Denis Zharkov
87497a5dc6 Do not run enhancement for fake overrides with one overridden 2016-02-16 12:01:13 +03:00
Denis Zharkov
42d451f2d1 Optimize ErasedOverridabilityCondition
Do not start substitution if some basic conditions are failed
2016-02-16 12:01:13 +03:00
Denis Zharkov
44148107ae Optimize SamAdapterOverridabilityCondition
Do not calculate it for non-static members,
because SAM adapters only exist in static scope now
2016-02-16 12:01:13 +03:00
Denis Zharkov
9f22b17918 Optimize external overridability conditions
- Skip ones that can lead only to success after first success
- And vice versa
2016-02-16 12:01:13 +03:00
Denis Zharkov
1b4b8ab5db Memoize 'JavaTypeClassifierImpl.isRaw' result 2016-02-16 12:01:12 +03:00
Denis Zharkov
d4d289c881 Optimize ResolvedCallImpl for case of empty pararameter set 2016-02-16 12:01:12 +03:00
Alexey Andreev
f1fd701d0d Remove PackageDirectoryMismatch from testData scope since it never actually matches 2016-02-16 11:46:25 +03:00
Alexey Andreev
56cb7c2677 [KT-11027] Fix the issue 2016-02-16 11:46:24 +03:00
Zalim Bashorov
c28b701ccf JS: ignore annotation on expression when its retention is SOURCE
#KT-8258
2016-02-15 21:35:30 +03:00
Mikhail Glukhikh
90927cfd19 CallExpressionResolver.getQualifiedExpressionTypeInfo refactoring 2016-02-15 16:46:24 +03:00
Dmitry Jemerov
37bd08175f K
(cherry picked from commit 8549ec7)
2016-02-15 13:36:45 +01:00
Pavel V. Talanov
1800e5a7db Remove some usages of Name.guess (and rename this utility to discourage new usages) 2016-02-15 13:32:42 +03:00
Pavel V. Talanov
47ceb106c7 Fix "<" or ">" in member name leading to exception 2016-02-15 13:32:41 +03:00
Michael Bogdanov
69afc2316d Internal visibility to TestGroup 2016-02-15 13:15:43 +03:00
Pavel V. Talanov
735b37aa7c Fix stub/ast mismatch for old binaries (rc-1036) in newer versions of plugin 2016-02-15 12:45:13 +03:00
Jake Wharton
f713adc96e Add support for AOSP's nullability annotations.
These are different than 'android.support.annotation' in that they are used on the JVM for projects within AOSP.
2016-02-15 11:32:09 +03:00
Mikhail Glukhikh
84a072b9f0 getQualifiedExpressionTypeInfo refactoring 2016-02-15 10:42:56 +03:00
Mikhail Glukhikh
88e7b728df CallExpressionResolver: converted to Kotlin, cleanup 2016-02-15 10:42:52 +03:00
Mikhail Glukhikh
bd40d59a17 CallExpressionResolver.java --> CallExpressionResolver.kt 2016-02-15 10:42:48 +03:00
Dmitry Jemerov
2a8e1af489 trim -release- from plugin version number when checking whether the runtime is outdated 2016-02-14 15:36:21 +01:00
Ilya Gorbunov
24edbc36df Create at most one wrapper sequence for adjacent drop/take operations on sequences.
Based on PR #814 by Sargun Vohra
#KT-10821 Fixed
2016-02-14 16:46:46 +03:00
Mikhail Glukhikh
a663797cb8 Refactoring: use of EffectiveVisibility class inside isEffectivelyPublic/Private API extensions 2016-02-13 10:48:17 +03:00
Mikhail Glukhikh
0f7284f83a More accurate safe call handling in GenericCandidateResolver / CallExpressionResolver
(real receiver nullability is taken into account)
2016-02-13 10:48:12 +03:00
Mikhail Glukhikh
17593e4ef6 Call completer: safe call with nullable receiver has nullable return type #KT-11007 Fixed 2016-02-13 10:48:07 +03:00
Jake Wharton
0d6ec35f7f Include source folders from registered source-generating tasks.
This includes the output directories from tasks which generate Java code which were registered with registerJavaGeneratingTask().
2016-02-13 02:34:06 -05:00
Valentin Kipyatkov
4cd7193047 KT-11018 Ctrl + Mouse Hover shows a var as val
#KT-11018 Fixed
2016-02-13 10:20:20 +03:00
Valentin Kipyatkov
c9f26de9f5 Introduce/eliminate when subject intentions to keep line breaks and comments 2016-02-13 10:20:19 +03:00
Valentin Kipyatkov
ce54a2d4bd If to when conversion preserves comments too 2016-02-13 10:20:19 +03:00
Valentin Kipyatkov
0ed8eb0512 KT-5717 "Replace 'when' with 'if'" loses a comment
#KT-5717 Fixed
2016-02-13 10:20:19 +03:00
Valentin Kipyatkov
0809be59df KT-10619 Wrong completion after package name in annotation
#KT-10619 Fixed
2016-02-13 10:20:19 +03:00
Valentin Kipyatkov
17ac168b33 KT-10621 Non-top level packages shown after "@" in completion
#KT-10621 Fixed
2016-02-13 10:20:18 +03:00
Michael Bogdanov
4f0f81155a Weaken PRIVATE_CLASS_MEMBER_FROM_INLINE diagnostic 2016-02-12 17:24:30 +03:00
Michael Bogdanov
384d2ea0d1 Use bipush, sipush for byte and short constants 2016-02-12 11:55:21 +03:00
Anton Sukhonosenko
0073257841 Fix for KT-10313: ClassCastException with Generics
#KT-10313 Fixed
2016-02-12 10:53:28 +03:00
Dmitry Petrov
edf6a2142b Check local function declarations for overload conflicts.
In PSI unifier tests, disable errors for tests on local functions (as irrelevant).
2016-02-12 09:54:21 +03:00
Ilya Gorbunov
17a95384e1 Change default buffer size to be 8K (same default as in java BufferedReader).
Rename internal constants.
2016-02-12 05:07:10 +03:00
Nikolay Krasko
faba229b11 Use single constant for doNotAnalyze message 2016-02-11 17:39:51 +03:00
Nikolay Krasko
ca0346bdae Fix forgotten test data for 10648f44ac (KT-10212) 2016-02-11 16:24:38 +03:00
Nikolay Krasko
85436de2b3 Minor: Add new lines to make failure message more readable 2016-02-11 16:20:30 +03:00
Nikolay Krasko
ae36e9c4c4 Don't show message if there were no messages
Otherwise "Notification should have content" error is logged.
2016-02-11 16:05:18 +03:00
Nikolay Krasko
e1d12af2fd Check element is valid if canRefactor() 2016-02-11 15:36:16 +03:00
Nikolay Krasko
9b44b0b1c0 Check element is valid before requesting type (EA-74737) 2016-02-11 15:36:15 +03:00
Alexey Sedunov
eabe675dbf Create from Usage: Add delegation call to secondary constructor declaration 2016-02-11 14:25:26 +03:00
Alexey Sedunov
6696d2b70a Create from Usage: Do not generate secondary constructor body by default 2016-02-11 14:25:24 +03:00
Alexey Sedunov
cc2a65e874 Create from Usage: Always insert parentheses around secondary constructor parameter list
#KT-10912 Fixed
2016-02-11 14:25:23 +03:00
Alexey Sedunov
8e81d0ce5f Change Signature: Skip implicit receiver references if extension receiver is dropped 2016-02-11 14:25:22 +03:00
Alexey Sedunov
a9ddc4da1a Change Signature: Warn about safe call receiver being transformed to value argument
#KT-8744 Fixed
2016-02-11 14:25:16 +03:00
Alexey Sedunov
b3801ffac7 Change Signature: Fix implicit receiver ->argument convertion in recusrive calls
#KT-8744 In Progress
2016-02-11 14:25:04 +03:00
Alexey Sedunov
d8c0671d94 Minor: Remove unused property 2016-02-11 14:25:02 +03:00
Pavel V. Talanov
7d98103c0c overriddenDescriptors is empty for java static property and function declarations
Fake overrides are still created for java static with non-empty overriddenDescriptors

Add tests for inheriting visibility for java static members
Add test: check that java static declarations that shadow deprecated declarations should not be deprecated
Add test for corner case where "overriding" java static constant led to incorrect type in inheritor

Fix test data for existing tests
2016-02-11 14:08:14 +03:00
Pavel V. Talanov
7e78e8d8ab Refactor: Move and rename OverridingUtil.DescriptorSink -> OverridingStrategy 2016-02-11 14:08:13 +03:00
Valentin Kipyatkov
c9bb020d6e KT-9738 Code completion of "emptyList()" after elvis operator inserts explicit type arguments
#KT-9738 Fixed
2016-02-11 12:26:23 +03:00
Valentin Kipyatkov
8da01e7952 Minor 2016-02-11 12:26:22 +03:00
Valentin Kipyatkov
377f4af369 Fixed EA-74848 + conversion was incorrect! 2016-02-11 12:26:22 +03:00
Valentin Kipyatkov
2ce06f250b Fixed EA-74166 2016-02-11 12:26:22 +03:00
Valentin Kipyatkov
8056c5182a Fixed EA-73613 2016-02-11 12:26:22 +03:00
Dmitry Petrov
aed2f2b993 Property vs classifier conflict.
TODO get rid of duplicate diagnostics
(looks like OverloadResolver and DeclarationResolver are partially redundant; refactor them).
2016-02-11 10:32:46 +03:00
Dmitry Petrov
b2eb4200af OverloadResolver.kt: convert to Kotlin & cleanup 2016-02-11 10:32:45 +03:00
Dmitry Petrov
6278459cc4 OverloadResolver.java --> .kt 2016-02-11 10:32:45 +03:00
Nikolay Krasko
d8ba52e582 Print kotlin compiler version in build script 2016-02-11 02:52:01 +03:00
Nikolay Krasko
6fe416cc4a Null name in library fix (EA-78733) 2016-02-11 02:52:00 +03:00
Nikolay Krasko
3f5f892e1b Add html escaping for declaration names in calls (KT-10763)
#KT-10763 Fixed
2016-02-11 02:49:00 +03:00
Zalim Bashorov
45f21bc7fd Minor: drop content from touch files 2016-02-10 22:56:10 +03:00
Zalim Bashorov
ced23c02bd New IC: add processing changes for constants 2016-02-10 22:56:09 +03:00
Zalim Bashorov
e33e31ad16 KotlinBuilder: don't request additional round when it's unnecessary & fix warnings 2016-02-10 21:37:12 +03:00
Zalim Bashorov
88c8f24887 Caching results of JpsUtils#isJsKotlinModule
#KT-9636 Fixed
2016-02-10 21:30:25 +03:00
Denis Zharkov
12552d2fc1 Refine special bridges generation
#KT-10958 Fixed
2016-02-10 20:18:46 +03:00
Denis Zharkov
6d98909c7a Minor. Add not-nullable upper bound 2016-02-10 20:18:46 +03:00
Denis Zharkov
45bf300144 Minor. Rename variables 2016-02-10 20:18:46 +03:00
Denis Zharkov
0fb565851f Minor. Extract function 2016-02-10 20:18:46 +03:00
Denis Zharkov
8592a57be4 Drop unnecessary check and corresponding parameter 2016-02-10 20:18:46 +03:00
Denis Zharkov
0b37d032c8 Minor. Split complicated conditions 2016-02-10 20:18:46 +03:00
Natalia Ukhorskaya
9070eff6ad KotlinPositionManager: add progress when computing classnames for inline function 2016-02-10 18:30:29 +03:00
Denis Zharkov
9ac2da8c96 Optimize 'setResultingSubstitutor'
Replace Map with plain List, use parameter's index as a key
2016-02-10 16:18:59 +03:00
Denis Zharkov
b9e677fef4 Get rid of redundant Map copy 2016-02-10 16:18:59 +03:00
Denis Zharkov
de3f507744 Add minor memory optimization
Get rid of 'unsubstitutedValueArguments' in resolved call
2016-02-10 16:18:59 +03:00
Mikhail Glukhikh
a08b8f43b2 Control flow graph for safe calls corrected #KT-10913 Fixed
Also #KT-10186 Fixed
Also #KT-5198 Fixed
2016-02-10 12:29:45 +03:00
Natalia Ukhorskaya
5ae394fec0 Optimize reference search for convention functions 2016-02-10 11:36:30 +03:00
Natalia Ukhorskaya
1f6894cdd4 EA-77626 - KNPE: AnonymousFunctionToLambdaIntention.applicabilityRange 2016-02-10 11:36:30 +03:00
Nikolay Krasko
5c6c1173a6 Aggregate configuration messages into one notification (KT-10489)
#KT-10489 Fixed
2016-02-10 01:31:38 +03:00
Nikolay Krasko
e2f1a5c092 Minor: refactoring 2016-02-10 01:31:37 +03:00
Zalim Bashorov
cf173d6963 Improve test multifilePackagePartMethodAdded: add file which should not be affected 2016-02-09 23:27:26 +03:00
Zalim Bashorov
f6e7f8c3c0 Introduce TestingContext to pass data between tests and KotlinBuilder; introduce BuildLogger to log build events (build finished, files marked as dirty) in KotlinBuilder 2016-02-09 23:27:25 +03:00
Zalim Bashorov
4ec3865830 Log final exit code instead of intermediate; change log level for build result to INFO 2016-02-09 23:27:24 +03:00
Ilya Gorbunov
1fca1cc607 Use foreach loop instead of directly taking iterator in sum and average.
Use indexed loop for arrays in reduce and reduceIndexed.
#KT-10579 Fixed
2016-02-09 22:51:39 +03:00
Ilya Gorbunov
6c7cefaae3 Use HALF_EVEN rounding mode by default for BigDecimal division operator.
#KT-10462 Fixed
2016-02-09 22:51:02 +03:00
Dmitry Jemerov
8b5e9d1685 code review; add one more missing description 2016-02-09 19:23:00 +01:00
Dmitry Jemerov
6e1705dd16 port IDEA's InspectionDescriptionTest into Kotlin
#KT-10345 Fixed
2016-02-09 19:23:00 +01:00
Dmitry Jemerov
daf26f4db3 more consistent inspection display names; add missing inspection descriptions
#KT-10908 Fixed
2016-02-09 19:22:59 +01:00
Alexey Sedunov
bb2a5b00b7 Change Signature: Fix reference substitution when default value is a single simple name reference
#KT-10954 Fixed
2016-02-09 19:18:50 +03:00
Alexey Sedunov
792d9c1ae2 Introduce Variable: Skip type in template if no resolvable/non-error types are available in the current context
#KT-10808 Fixed
2016-02-09 19:18:45 +03:00
Zalim Bashorov
eacd50c4dc FIx possible NPEs when try to use TestModuleProperties in IDEA 144.x
#EA-78931 Fixed
2016-02-09 15:55:16 +03:00
Michael Bogdanov
0f90dc1649 Code clean and some refactorings in 'getLambdaIfExistsAndMarkInstructions' 2016-02-09 10:19:16 +03:00
Michael Bogdanov
c75b514551 Get rid of InstructionsAndFrames.kt 2016-02-09 10:19:15 +03:00
Michael Bogdanov
b8ee2ecdac Support extension lambda inlining in complex stack cases (nullable receiver) 2016-02-09 10:19:15 +03:00
Ilya Gorbunov
78b7fb15f3 J2K, expected errors: for each argument of removed overloads 2016-02-09 02:58:09 +03:00
Ilya Gorbunov
b4ebaad8f5 Drop previously deprecated API. 2016-02-09 02:58:07 +03:00
Stanislav Erokhin
434bd0707d Correcting rewrite type info after compete call.
#KT-10934 Fixed
#KT-10896 Fixed
2016-02-08 20:49:31 +03:00
Zalim Bashorov
74b2c8cd31 Minor: fix method name 2016-02-08 19:31:17 +03:00
Ilya Gorbunov
17ebb36128 Test Throwable properties in JS, don't work as expected, commiting as ignored.
#KT-10911
2016-02-08 18:10:46 +03:00
Ilya Gorbunov
5361f6e941 Make Throwable properties message and cause open.
#KT-5587 Fixed
2016-02-08 18:10:46 +03:00
Pavel V. Talanov
f12c653aed KtLightClassForFacade is not valid if any of the files it was built for doesn't have top level callables
#KT-9434 Fixed
2016-02-08 16:45:47 +03:00
Pavel V. Talanov
f59a4c537e Minor: remove some dead code 2016-02-08 16:45:46 +03:00
Nikolay Krasko
909ced5fa2 Use non-local functions to avoid creating lambdas in heap 2016-02-08 16:43:55 +03:00
Nikolay Krasko
99a693a14b Too many empty ArrayList stored for arguments 2016-02-08 16:43:54 +03:00
Nikolay Krasko
ff2029035e Don't generate new empty list with TypeParameterDescriptor 2016-02-08 16:43:54 +03:00
Denis Zharkov
cd3f7df28c Create deep descriptors copy for Change signature
It's needed to prevent accesses to invalid PSI
after changes has been applied
2016-02-08 16:40:47 +03:00
Denis Zharkov
c879f83037 Fix primitive types mapping
Use boxed version if type was enhaced to not-nullable
2016-02-08 16:40:47 +03:00
Denis Zharkov
68110f5859 Add minor optimization
Do not copy overrides while creating FAKE_OVERRIDE
2016-02-08 16:40:47 +03:00
Denis Zharkov
18e7272a1e Do not force overridden descriptors computation
Currently 'overriddenDescriptors' of substituted function is lazy
and in most cases it's unnecessary to compute it
(it's enough to use the same field from 'original')
2016-02-08 16:40:47 +03:00
Denis Zharkov
9e3d381eb3 Perform computation of overridden descriptors lazy
It's makes sense in cases when descriptors are being substituted, because
in many cases their overridden are not needed.
2016-02-08 16:40:47 +03:00
Denis Zharkov
fae6de9acd Replace 'addOverriddenDescriptor' with 'setOverriddenDescriptors'
It helps to get rid of redundant SmartSets (e.g. for top-level functions)
2016-02-08 16:40:47 +03:00
Denis Zharkov
c1f57b743b Do not build enhanced descriptors if they are unchanged 2016-02-08 16:40:47 +03:00
Denis Zharkov
924d706e79 Release original Java descriptors while enhancing
It's both more correct and helps to release memory retained by
descriptor before enhancement
2016-02-08 16:40:47 +03:00
Denis Zharkov
beea2d5d10 Use source elements instead of descriptors
It's needed because resulting descriptors are different
(because they are enhanced) from ones on which load error is reported.
See where latter happens

Currently we suppose that source elements should be stable
2016-02-08 16:40:47 +03:00
Michael Bogdanov
848549dd5d Rollback "Fix for KT-10659: Debugger: Evaluate Expression and Watches fail for inline function parameter passed by reference" 2016-02-08 16:43:22 +03:00
Pavel V. Talanov
9e5c387d6c PropertyCodegen: Diagnose descriptor not found for property 2016-02-08 16:18:36 +03:00
Natalia Ukhorskaya
25b8e4f1b2 Do not compute classnames during stepping
#KT-10827 Fixed
2016-02-08 15:49:11 +03:00
Natalia Ukhorskaya
d238df8525 Debugger: add test for line breakpoint variants with inline function call. Fix testData for muted test 2016-02-08 15:49:11 +03:00
Zalim Bashorov
3c4cb54573 Allow to use internal declarations from special modules in compiler (JPS)
(e.g. IDEA 16 gradle tests loaded in separate module)

 #KT-10595 Fixed
2016-02-08 15:42:49 +03:00
Zalim Bashorov
e328c24857 J2K KotlinBuilderModuleScriptGenerator: cleanup 2016-02-08 15:42:48 +03:00
Zalim Bashorov
21e69a0a4c J2K KotlinBuilderModuleScriptGenerator: convert 2016-02-08 15:42:48 +03:00
Zalim Bashorov
d5030335b6 J2K KotlinBuilderModuleScriptGenerator: .java -> .kt 2016-02-08 15:42:48 +03:00
Zalim Bashorov
2c1d1e84a6 Allow to use internal declarations from special modules in IDEA
(e.g. IDEA 16 gradle tests loaded in separate module)

 #KT-10595 Fixed
2016-02-08 15:42:47 +03:00
Dmitry Petrov
5968ce96df KT-10939 CANNOT_COMPLETE_RESOLVE for inherited generic interface method
'original' for value parameters of fake override is not a value parameter of unsubstituted fake override.
Match value parameters by index.
2016-02-08 10:08:35 +03:00
Alexander Udalov
9f786c00a7 Fix test data after removing old annotation classes 2016-02-07 10:03:19 +05:30
Nikolay Krasko
938a435346 Allow to process return statements without parent KtDeclaration (EA-70883) 2016-02-06 17:50:17 +03:00
Nikolay Krasko
1e50847985 SOE on setEnabled(). setEnabled() changes were propagated back to action group with the request to update state (EA-71014) 2016-02-06 17:50:16 +03:00
Alexander Udalov
e82d549853 Delete old metadata annotation classes 2016-02-06 15:53:55 +05:30
Alexander Udalov
8800782c83 Move constants from JvmAnnotationNames closer to usages 2016-02-06 15:53:55 +05:30
Alexander Udalov
2f5a6ac465 Minor, add extra constant to JvmAnnotationNames, drop unneeded utility 2016-02-06 15:53:55 +05:30
Alexander Udalov
5de1cf3bb4 Do not write old metadata annotations to bytecode 2016-02-06 15:53:55 +05:30
Alexander Udalov
ba80e8ba81 Use kotlin.Metadata instead of old annotations in IDE, reflection and tests 2016-02-06 15:53:55 +05:30
Mikhail Glukhikh
7da981e12c Regression tests #KT-8168 Obsolete 2016-02-05 18:29:40 +03:00
Denis Zharkov
0efe28a12a Do not inline non-const vals
#KT-10425 Fixed
2016-02-05 17:43:55 +03:00
Yan Zhulanow
f2edcd99a8 Illegal Dalvik identifier inspection 2016-02-05 17:28:50 +03:00
Denis Zharkov
8d87800a05 Fix JVM crash
Replace inlined 'let' containing complicated control flow with common `if`
2016-02-05 17:26:10 +03:00
Valentin Kipyatkov
affbefdfbe Better diagnostic for EA-70945 2016-02-05 16:29:58 +03:00
Valentin Kipyatkov
ce8e2d7a65 Added better diagnostic for EA-75805 2016-02-05 16:29:58 +03:00
Valentin Kipyatkov
3fe6f9cad2 More correct convertation to string template when number literals involved 2016-02-05 16:29:57 +03:00
Valentin Kipyatkov
9c426e70e1 Fixed EA-75114 2016-02-05 16:29:57 +03:00
Valentin Kipyatkov
c914ca0626 Fixed EA-75251 2016-02-05 16:29:57 +03:00
Valentin Kipyatkov
eca581ef43 Fixed EA-75979 2016-02-05 16:29:56 +03:00
Valentin Kipyatkov
8b6338ce62 Fixed EA-76497 2016-02-05 16:29:56 +03:00
Michael Bogdanov
bc2077bfaf More wise lambda search during inlining 2016-02-05 15:42:46 +03:00
Denis Zharkov
16f412f993 Generate multi-files facade even if it's empty
It still contains useful information about it's parts,
that may be used while building stubs for multi-file group
containing only InlineOnly functions
2016-02-05 15:02:24 +03:00
Denis Zharkov
889b136a68 Refine multi-file facades generation
Do not generate delegation from multi-file facade to inline-only functions
because they are effectively private in bytecode

 #KT-10858 Fixed
2016-02-05 15:02:24 +03:00
Dmitry Petrov
e4583fd275 Do not report IMPLICIT_CAST_TO_ANY on last statement of lambda with Unit(?) in at least one branch. 2016-02-05 10:44:50 +03:00
Dmitry Jemerov
fa8706b46a a bit more diagnostics to track down "Cannot find package fragment for file" 2016-02-04 15:50:25 +01:00
Ilya Gorbunov
6038bde3c1 Inline-only Lazy.getValue extension 2016-02-04 17:30:12 +03:00
Yan Zhulanow
8c17c5f40b Pack actual Kotlin Android compiler plugin sources into kotlin-android-extensions-ver-sources.jar 2016-02-04 17:24:44 +03:00
Pavel V. Talanov
c600fe1dc3 Fix "Select in project view" and "autoscroll from source" not working in some cases
#KT-9278 Fixed
  #KT-8356 Fixed
2016-02-04 17:13:21 +03:00
Stanislav Erokhin
9c72a388b2 Random code change to prevent JVM crash on windows (JRE version: 6.0_45-b06)
JVM crash log:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x06b1e0ae, pid=2908, tid=1656
#
# JRE version: 6.0_45-b06
# Java VM: Java HotSpot(TM) Client VM (20.45-b01 mixed mode windows-x86 )
# Problematic frame:
# J  org.jetbrains.kotlin.idea.formatter.KotlinPreFormatProcessor$Visitor.visitNamedDeclaration(Lorg/jetbrains/kotlin/psi/KtNamedDeclaration;)V
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x5f0bb800):  JavaThread "AWT-EventQueue-1 IDEA 15.0.4#IC-143.SNAPSHOT IDEA, eap:true, os:Windows Server 2008 R2 6.1, java-version:Sun Microsystems Inc. 1.6.0_45-b06 IDEA 15.0.4#IC-143.SNAPSHOT IDEA, eap:true, os:Windows Server 2008 R2 6.1, java-version:Sun Microsystems Inc. 1.6.0_45-b06" [_thread_in_Java, id=1656, stack(0x60520000,0x60570000)]

siginfo: ExceptionCode=0xc0000005, writing address 0x8b8721bf

Registers:
EAX=0x0b8721c0, EBX=0x0b655c10, ECX=0x00000000, EDX=0x4789df50
ESP=0x6056d620, EBP=0x6056df7c, ESI=0x0b0b3618, EDI=0x0b8721d0
EIP=0x06b1e0ae, EFLAGS=0x00010246

Top of Stack: (sp=0x6056d620)
0x6056d620:   00000006 0b86d8b8 0afd5c68 026112bb
0x6056d630:   0b86f1a6 0b86f1dc 6056e088 05632944
0x6056d640:   00000004 00000000 6056e088 0b86f214
0x6056d650:   00000086 6056d668 6dae8209 0b86f214
0x6056d660:   0b86f074 00000086 6056d8b0 049aec30
0x6056d670:   0b872170 0b655c10 0b871c80 0b0b5210
0x6056d680:   0b0b4df8 0b8721c0 00000005 0b8705c0
0x6056d690:   0afd5c68 0b86eef8 0afd5c68 0b86d8b8

Instructions: (pc=0x06b1e0ae)
0x06b1e08e:   b9 0e 00 00 89 79 34 8b 4a 68 89 08 89 50 04 33
0x06b1e09e:   c9 89 48 08 89 48 0c 89 44 24 64 b9 00 00 00 00
0x06b1e0ae:   89 88 ff ff ff 7f f0 83 04 24 00 83 fb 00 0f 84
0x06b1e0be:   12 00 00 00 81 7b 04 60 06 0d 45 0f 85 05 00 00

Register to memory mapping:

EAX=
[error occurred during error reporting (printing register info), id 0xc0000005]

Stack: [0x60520000,0x60570000],  sp=0x6056d620,  free space=309k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
J  org.jetbrains.kotlin.idea.formatter.KotlinPreFormatProcessor$Visitor.visitNamedDeclaration(Lorg/jetbrains/kotlin/psi/KtNamedDeclaration;)V
J  com.intellij.psi.impl.source.PostprocessReformattingAspect.doPostponedFormattingInner(Lcom/intellij/psi/FileViewProvider;)V
2016-02-04 15:48:18 +03:00
Nikolay Krasko
63a50ca3a9 Can't get file when event is invalid (EA-77748) 2016-02-04 15:12:02 +03:00
Pavel V. Talanov
7c84225cc4 Fix typechecker when initializer of destructuring declaration is unresolved or missing 2016-02-04 15:08:39 +03:00
Pavel V. Talanov
a4e3dd7030 Minor: refactor DestructuringDeclarationResolver 2016-02-04 15:08:39 +03:00
Zalim Bashorov
ba6c738cb5 Minor: don't init AnsiConsole when coloring is disabled 2016-02-04 14:36:31 +03:00
Dmitry Jemerov
bcc3102e05 highlight usages for parameter doesn't look at base declarations
#KT-10204 Fixed
2016-02-04 11:35:22 +01:00
Dmitry Jemerov
37976e516c postpone isJsProject() check
#KT-9026 Fixed
2016-02-04 11:31:46 +01:00
Pavel V. Talanov
abcdae8e69 Prevent recursion when computing parameter list of KtLightMethod (part 2)
Use ClsWrapperStubPsiFactory when building light classes for decompiled kotlin classes
2016-02-04 12:55:19 +03:00
Alexey Sedunov
5f037d372d Intentions: Move member of companion object to corresponding class
#KT-9697 Fixed
2016-02-04 12:26:19 +03:00
Alexey Sedunov
d13ac6b5a4 Intentions: Move class member to companion object
#KT-9697 In Progress
2016-02-04 12:26:18 +03:00
Alexey Sedunov
fe8a0ec2bc Move: Additional test for KT-10553 (private top-level property with default accessors) 2016-02-04 12:26:17 +03:00
Alexey Sedunov
48b538cebf Light Classes: Provide backing fields (if any) as one of property's light elements 2016-02-04 12:26:15 +03:00
Dmitry Petrov
b5145ea68b Use implementation part class for SMAP generation when inlining function both from binaries and sources. 2016-02-04 10:17:30 +03:00
Dmitry Jemerov
0a46033d40 ensure Kotlin's move handlers run before Java's
#KT-10703 Fixed
2016-02-03 17:44:29 +01:00
Alexey Andreev
e9d5d8f0fe [KT-7683] Implement translation of 'when .. in' clause to JS 2016-02-03 19:08:58 +03:00
Natalia Ukhorskaya
6ee4071462 Debugger: use top elements to cache classnames to minimize cache size 2016-02-03 18:53:50 +03:00
Natalia Ukhorskaya
2fa00f87e0 Minor: add some clarifications 2016-02-03 18:53:50 +03:00
Natalia Ukhorskaya
9b978377d0 Debugger: merge KotlinPositionManagerCache into KotlinDebuggerCaches 2016-02-03 18:53:50 +03:00
Natalia Ukhorskaya
b5b2bbc9ab Minor: rename KotlinEvaluateExpressionCache 2016-02-03 18:53:50 +03:00
Natalia Ukhorskaya
ccd22cd5ca KotlinPositionManager: use cache for classNames where possible 2016-02-03 18:53:50 +03:00
Natalia Ukhorskaya
f28f7eaa3b ExtraSteppingFilter: do not compute classNames for inline 2016-02-03 18:53:50 +03:00
Natalia Ukhorskaya
876e458c04 Add cache for library files 2016-02-03 18:53:50 +03:00
Natalia Ukhorskaya
e89638f937 Move typeMappers cache to KotlinPositionManagerCache 2016-02-03 18:53:50 +03:00
Natalia Ukhorskaya
c808f4ec2a KotlinPositionManager: add cache for classNames by psiElement 2016-02-03 18:53:50 +03:00
Mikhail Glukhikh
60d56b30bf Safe call arguments are now handled as nullable in generic resolver #KT-9985 Fixed 2016-02-03 18:34:10 +03:00
Dmitry Jemerov
187694d1b0 don't veto rename of constructors
#KT-9693 Fixed
2016-02-03 15:58:05 +01:00
Stanislav Erokhin
34d8dd9127 Add optimization for fake overrides creation. 2016-02-03 17:47:40 +03:00
Stanislav Erokhin
ec991b4ced Minor. Update run configuration. 2016-02-03 17:47:39 +03:00
Zalim Bashorov
030c55ebb2 Minor: fix testdata 2016-02-03 17:35:14 +03:00
Ilya Gorbunov
805410bb19 J2K: Remove special conversion for String.format. 2016-02-03 17:14:02 +03:00
Ilya Gorbunov
c243a2bdd5 In addition to extension String.format introduce String.Companion.format(format, args) to be used like in java. 2016-02-03 17:14:01 +03:00
Ilya Gorbunov
7105c7c182 Documentation stubs for new packages. 2016-02-03 17:04:28 +03:00
Mikhail Glukhikh
0c32fab690 Type comparison: first check for star projections, then obtain constructor parameters #KT-10893 Fixed
Also #EA-78405 Fixed
2016-02-03 16:26:39 +03:00
Pavel V. Talanov
c5be8ce1d3 Prevent recursion when computing parameter list of KtLightMethod
#KT-10890 Fixed
 #KT-10851 Fixed
2016-02-03 16:08:05 +03:00
Dmitry Petrov
4afe98a0f6 Better diagnostics for conflicting overloads.
Skip declarations without sources in reporting, not when determining redeclaration groups:
this allows emitting informative diagnostics for incremental compilation.
Provide containing declaration with "kind", e.g., "package '<root>'", "class A", and so on.
2016-02-03 15:53:07 +03:00
Zalim Bashorov
130301aa27 Minor: log the content of module.xml when a source root not found on FS
Related issues: #KT-9587 #KT-10394
2016-02-03 15:28:20 +03:00
Dmitry Jemerov
e227f6fc74 use more deterministic check to determine that "Configure Kotlin in project" notification should be displayed
#KT-10898 Fixed
2016-02-03 13:18:54 +01:00
Michael Bogdanov
394221fefb Updated test data 2016-02-03 10:35:32 +03:00
Michael Bogdanov
6ae6f72156 Fix for crashed build 2016-02-03 10:35:31 +03:00
Michael Bogdanov
4b203de608 INVISIBLE_MEMBER_FROM_INLINE renamed to NON_PUBLIC_CALL_FROM_PUBLIC_INLINE 2016-02-03 10:35:29 +03:00
Michael Bogdanov
d1db404959 Error diagnostic for private classes in inline functions; Fix for KT-7545: IllegalAccessError when accessing private nested class through inlined function from different package
#KT-7545 Fixed
2016-02-03 10:32:41 +03:00
Michael Bogdanov
71c2a6e792 Generate package private visibility in bytecode for private classes 2016-02-03 10:32:41 +03:00
Ilya Gorbunov
751ac3912d IDEA version for bootstrapping (use IDEA built with kotlin rc branch) 2016-02-03 00:23:10 +03:00
Ilya Gorbunov
f19ef6e3d5 SAM-constructors for Iterable and Sequence interfaces. 2016-02-03 00:13:17 +03:00
Ilya Gorbunov
947fd84f1e Minor: reorder primitive specializations in generated code (according to the order they defined in java). 2016-02-02 22:06:34 +03:00
Ilya Gorbunov
7a50562a4e Minor: reorder families in generated code. 2016-02-02 22:06:34 +03:00
Ilya Gorbunov
477b57cdfd Rearrange stdlib, part 2: rename files to better represent their content. 2016-02-02 22:06:33 +03:00
Ilya Gorbunov
57cfa54957 Rearrange stdlib between files and folders, rename files to better represent their content.
Fix package part name in testData
2016-02-02 22:06:32 +03:00
Dmitry Jemerov
c881cd1070 use new API for excluding Kotlin plugin from update checks 2016-02-02 16:19:29 +01:00
Dmitry Jemerov
45a387668b don't show two "Rename variables" checkboxes for a Kotlin class
#KT-8509 Fixed
2016-02-02 15:55:54 +01:00
Dmitry Jemerov
db5191041f better place for J2K options
#KT-10513 Fixed
2016-02-02 14:43:26 +01:00
Mikhail Glukhikh
45298e0bad Delegated properties now cannot be used before initialization #KT-10869 Fixed 2016-02-02 16:27:20 +03:00
Dmitry Petrov
65f754ffca Fix KT-10764 IDEA doesn't show overload conflict between constructor and function...
When checking for overloads in package, consider functions and top-level class constructors as possibly conflicting between each other. NB OverloadUtil uses containing package scope from module descriptor.

Change diagnostic message for CONFLICTING_OVERLOAD: it's misleading in case of fun vs constructor conflict.

Add custom multifile test for diagnostics in IDE (probably not the best; should preprocess file content if it's required to check highlighting in multiple files, not only in the first file).

Add test for KT-10765 Incremental compilation misses overload conflict between constructor and function ...
2016-02-02 16:21:26 +03:00
Nikolay Krasko
7dd725f0a4 Failed build is good enough for version increment 2016-02-02 16:10:54 +03:00
Dmitry Jemerov
4a1d282de6 don't try to parse empty text as XML 2016-02-02 13:40:23 +01:00
Denis Zharkov
8df05c6c4c Refine 'isMoreSpecific' calculation
Choose member with better visibility, it's needed for proper calculation
of types intersection member scope

 #KT-10481 Fixed
2016-02-02 15:26:49 +03:00
Ilya Gorbunov
148b53fc62 Add UTF_32 charsets to Charsets object as lazy initialized properties.
#KT-10379 Fixed
2016-02-02 15:23:22 +03:00
Natalia Ukhorskaya
f29efc2ca2 Evaluate expression shouldn't be applicable for class name of Java class in static call
#KT-7261 Fixed
2016-02-02 15:16:14 +03:00
Natalia Ukhorskaya
893c2495fe Minor: regenerate tests 2016-02-02 15:16:14 +03:00
Natalia Ukhorskaya
51ea804d88 Debugger: do not write exception to log in some valid cases 2016-02-02 15:16:14 +03:00
Natalia Ukhorskaya
45f96f8f32 Evaluate expression shouldn't be applicable for name of named parameter in function call
#KT-7266 Fixed
2016-02-02 15:16:14 +03:00
Natalia Ukhorskaya
4f76207a27 Fix breakpoints in inline function with generic crossinline argument
#KT-10673 Fixed
2016-02-02 15:16:14 +03:00
Natalia Ukhorskaya
b19d32e4f2 Public members should have bigger priority in debugContext
#KT-10634 Fixed
2016-02-02 15:16:14 +03:00
Natalia Ukhorskaya
d60a5e65c1 Debugger: skip visibility check 2016-02-02 15:16:14 +03:00
Dmitry Petrov
bad8320038 Fix for KT-10881 Declaring constant in a mutlifile class causes an IllegalAccessError on its usage.
Generate fields for 'const' properties in facade class.

NB reading annotations for 'const' vals in multifile class doesn't work, KT-10892.
2016-02-02 15:06:21 +03:00
Dmitry Jemerov
970d6f6834 generate local variables table for @JvmOverloads-generated methods
#KT-7319 Fixed
2016-02-02 12:11:51 +01:00
Yan Zhulanow
da7acd5e73 Check annotations on default property getter/setter 2016-02-02 13:14:56 +03:00
Mikhail Glukhikh
7e528da00a Regression codegen test #KT-8344 Obsolete 2016-02-02 12:43:52 +03:00
Denis Zharkov
816c66063b Report special diagnostic when fake-call receiver is nullable
#KT-3602 Fixed
2016-02-02 08:17:49 +03:00
Denis Zharkov
829a5639f1 Rework error reporting for fake call resolution
Move diagnostic creation to one place
2016-02-02 08:17:48 +03:00
Denis Zharkov
9b3f557337 Report MEMBER_PROJECTED_OUT on calls with smart cast receiver
#KT-10856 Fixed
2016-02-02 08:17:48 +03:00
Ilya Gorbunov
05192547da Make DEFAULT_BUFFER_SIZE a constant. 2016-02-01 22:20:31 +03:00
Ilya Gorbunov
801a26a544 Fix testData 2016-02-01 22:20:30 +03:00
Ilya Gorbunov
a192915c82 Do not inline Regex.replace 2016-02-01 22:20:28 +03:00
Ilya Gorbunov
dccae6c3ff Introduce annotation InlineExposed to indicate internal members effectively public due to usage in inlined functions.
Currently, doesn't affect anything.

Make collectionSizeOrDefault and collectionSizeOrNull internal, but expose them via inlining together with mapCapacity.

Make Regex(Pattern) constructor exposed by inlined Pattern.toRegex
2016-02-01 22:20:27 +03:00
Ilya Gorbunov
dacf25fdec Make all assert inline. Field _Assertions.ENABLED instead of property ASSERTIONS_ENABLED 2016-02-01 22:09:19 +03:00
Ilya Gorbunov
c763b592a5 IDEA version for bootstrapping
Build markdown every time (again).
2016-02-01 22:09:18 +03:00
Ilya Gorbunov
1cef327880 Throw assertion when inline-only is applied without inline 2016-02-01 22:09:17 +03:00
Ilya Gorbunov
a12fe2c18a Do not use inline-only in java 2016-02-01 22:09:17 +03:00
Ilya Gorbunov
8a00db5661 Include internal annotatations in mock runtime 2016-02-01 22:09:16 +03:00
Ilya Gorbunov
fc3f98dae2 Deprecate currentThread property 2016-02-01 22:09:15 +03:00
Ilya Gorbunov
42bd8df2ca Drop CharSequence.get extension 2016-02-01 22:09:14 +03:00
Ilya Gorbunov
1eee1fa803 Swap parameters in File.forEachBlock 2016-02-01 22:09:13 +03:00
Ilya Gorbunov
abe927056b Inline-only in kotlin.comparisons 2016-02-01 22:09:13 +03:00
Ilya Gorbunov
54977ee09a Inline-only in kotlin.io 2016-02-01 22:09:12 +03:00
Ilya Gorbunov
47d580cbc5 Inline-only in kotlin.text 2016-02-01 22:09:11 +03:00
Ilya Gorbunov
56c5758db1 Inline-only in kotlin and kotlin.system packages, split Float/Double extension implementations for JVM and JS to make them inline-only in JVM. 2016-02-01 22:09:10 +03:00
Ilya Gorbunov
40fae0463f Inline-only in kotlin.concurrent, make all timer utilities inline. 2016-02-01 22:09:09 +03:00
Ilya Gorbunov
ce5fd3ee77 Inline-only in kotlin.collections 2016-02-01 22:09:08 +03:00
Ilya Gorbunov
c7bd70732c Inline-only in generated code 2016-02-01 22:09:07 +03:00
Ilya Gorbunov
8c0008aa2e StdLib Generators: support three flavors of inline 2016-02-01 22:09:07 +03:00
Dmitry Jemerov
38b58db4f9 don't apply StandardScriptDefinition in REPL 2016-02-01 19:16:31 +01:00
Dmitry Jemerov
84f9cb9bfd correctly separate stdout and stderr when parsing REPL output 2016-02-01 19:06:17 +01:00
Ilya Gorbunov
3ae4c033b6 Wrap exceptions thrown by class builders and add details about class file being generated. 2016-02-01 19:59:06 +03:00
Michael Bogdanov
5f38c1d571 Fix for KT-10729: Accessing private const field in companion object from a function in the same companion generates run-time error 2016-02-01 18:42:19 +03:00
Michael Bogdanov
9790afb1bd Idea dependency updated to 143.2072 2016-02-01 18:32:13 +03:00
Michael Bogdanov
328b9bfeda Removed old default generation 2016-02-01 18:32:12 +03:00
Pavel V. Talanov
a90f8122bd Fix NPE on trying to compile script files
(There is still no design)
2016-02-01 17:33:46 +03:00
Mikhail Glukhikh
d194af5c4e Correct report of NO_VALUE_FOR_PARAMETER when function call contains no brackets and lambda at the end #KT-7813 Fixed 2016-02-01 17:11:54 +03:00
Mikhail Glukhikh
84100abd9e Annotations on object literals are now correctly resolved #KT-9320 Fixed 2016-02-01 16:24:57 +03:00
Yan Zhulanow
a041414f35 Kapt: compile kotlinAfterJava without Jdk as well in Android projects (KT-10854) 2016-02-01 14:33:02 +03:00
Denis Zharkov
e5f644a64a Temporary disable warning about unchecked reified argument
#KT-10847 Fixed
 #KT-6484 Reopened
2016-02-01 13:36:38 +03:00
Alexey Sedunov
b0c808082f Pull Members Up: Skip visibility checking between members to move 2016-02-01 13:18:47 +03:00
Alexey Sedunov
f9632c1ad6 Pull Members Up: Use light field if property doesnt't have light methods
#KT-10552 Fixed
2016-02-01 13:18:46 +03:00
Alexey Sedunov
e386a6b0e9 Go to Test Action: Make available in the entire class text range
#KT-10757 Fixed
2016-02-01 13:18:45 +03:00
Alexey Sedunov
3e2036b6ec Convert Member to Extension Intention: Drop open/final modifiers, add imports when necessary, transform Java-site calls
#KT-8876 Fixed
2016-02-01 13:18:44 +03:00
Alexey Sedunov
99e4c8c06d Create from Usage: Add commas after enum entries
#KT-10800 Fixed
2016-02-01 13:18:43 +03:00
Alexey Sedunov
26c47cda47 Convert Object Literal to Lambda Intention: Move lambda out of parentheses when possible. Fix after-template
#KT-10778 Fixed
2016-02-01 13:18:41 +03:00
Alexey Sedunov
1c65797950 Intentions: Fix contentRange() on empty KtBlockExpression
#KT-10776 Fixed
2016-02-01 13:18:40 +03:00
Alexey Sedunov
c5b1d205a2 Initialize Property with Constructor Parameter Quick-Fix: Skip secondary constructors with this-delegation. Use containing class as a Change Signature context
#KT-10818 Fixed
2016-02-01 13:18:39 +03:00
Alexey Sedunov
fcbb18d876 Generate equals()/hashCode(): Forbid in interfaces
#KT-10815 Fixed
2016-02-01 13:18:38 +03:00
Alexey Sedunov
58963f7053 Move: Improved file chooser with search
#KT-9752 Fixed
2016-02-01 13:18:37 +03:00
Alexey Sedunov
625bfe12eb Move: Do not create target directory outside of write-action 2016-02-01 13:18:36 +03:00
Alexey Sedunov
222dfd265b Move: Forbid target annotation classes in class chooser 2016-02-01 13:18:35 +03:00
Alexey Sedunov
8e18bf647e Move: Fix refactoring command name 2016-02-01 13:18:34 +03:00
Alexey Sedunov
a05a16c1e6 Move: Fix name lengthening when moving from default package
#KT-10696 Fixed
2016-02-01 13:18:33 +03:00
Alexey Sedunov
d92bfd20d7 Move Class To Upper Level: Fix file name validation 2016-02-01 13:18:31 +03:00
Ilya Gorbunov
4f1418bb72 Verify index expectations for reduceIndexed/reduceRightIndexed 2016-01-31 02:45:05 +03:00
Ilya Gorbunov
1357c77d0b Minor: verify exception type of failed fold/reduce 2016-01-31 02:45:04 +03:00
Gabriel Borges
d58efff974 Add foldIndexed and reduceIndexed groups of functions
- foldIndexed, foldRightIndexed, reduceIndexed and reduceRightIndexed have been added, in line with filterIndexed etc.;
- Test cases added appropriately for the new functions.
2016-01-31 02:45:02 +03:00
Dmitry Petrov
b3f390abe5 Fix KT-10775 Empty when causes compilation exception.
Expression type for an empty 'when' is 'kotlin.Unit'.
2016-01-29 18:50:48 +03:00
Mikhail Glukhikh
dcc6262f47 Regression test #KT-7804 Obsolete 2016-01-29 17:23:40 +03:00
Denis Zharkov
505dc61611 Treat extension receiver as noinline parameter
#KT-9574 Fixed
2016-01-29 14:36:53 +03:00
Denis Zharkov
2cd88b8cbc Make crossinline and noinline incompatible 2016-01-29 14:36:53 +03:00
Denis Zharkov
87741e9b9f Minor. Get rid of redundant diagnostic parameters 2016-01-29 14:36:53 +03:00
Denis Zharkov
855a0b3493 Force type calculation for local function if it should be inferred
It helps to catch TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM errors
because they appear after return type calculation began

 #KT-6271 Fixed
 #KT-3272 Obsolete
2016-01-29 14:36:53 +03:00
Denis Zharkov
7d6310d88c Add test for obsolete issue
#KT-9571 Obsolete
2016-01-29 14:36:53 +03:00
Denis Zharkov
36f21932bb Approximate captured type before mapping
#KT-7415 Fixed
2016-01-29 14:36:53 +03:00
Denis Zharkov
5b0fdcb3fe Fix stack overflow caused star projection 2016-01-29 14:36:53 +03:00
Denis Zharkov
6b33e3fb67 Minor. Rename variables and add assertion 2016-01-29 14:36:53 +03:00
Mikhail Glukhikh
4691351e76 Fix for unprocessed lambda under not-null assertion #KT-10843 Fixed
Also #EA-76890 Fixed
2016-01-29 12:57:52 +03:00
Michael Bogdanov
e1fa6491c1 Test for obsolete KT-10044: "Don't know how to generate outer expression for class" with lambda in init block
#KT-10044 Obsolete
2016-01-29 12:42:37 +03:00
Michael Bogdanov
b9c30c739e Test for obsolete KT-7224: Redundant result boxing on ?. call on a primitive
#KT-7224 Obsolete
2016-01-29 12:13:16 +03:00
Michael Bogdanov
c9cc9c55cd Added assertion for super call with default arguments in function default impl body 2016-01-29 11:02:21 +03:00
Mikhail Glukhikh
767729ba2a Regression test #KT-9633 Obsolete 2016-01-29 10:55:22 +03:00
Dmitry Petrov
112e54b35a KT-10752: if (inferred) type for an expression refers to a Java class
non-accessible in the current context, it is a compiler error.
Otherwise we might generate a CHECKCAST instruction that causes IAE at run-time.
Here we are somewhat less permissive then Java
(see inaccessibleType.kt in diagnostics tests).
2016-01-29 10:30:00 +03:00
Dmitry Petrov
1b78d01ae6 Effective visibility issues in FileBasedKotlinClass.
Make exposed nested classes public.
2016-01-29 10:30:00 +03:00
Evgeny Gerashchenko
c242ad94fd Minor. Syntax error cosmetics. 2016-01-29 01:00:47 +03:00
Evgeny Gerashchenko
0d79c65d73 KT-8275 Unterminated multi-line comment should be compilation error
#KT-8275 fixed
2016-01-29 01:00:47 +03:00
Tim Steinbach
7cad65a1e7 Remove which dependency from startup scripts 2016-01-28 21:48:16 +03:00
Alexander Udalov
2a5b4d2c83 Fix annotations on Java elements in reflection
#KT-10840 Fixed
2016-01-28 21:48:16 +03:00
Alexander Udalov
b946d725d7 Filter out methods without return type to fix EA-73795 2016-01-28 21:48:16 +03:00
Alexander Udalov
7e17482698 Delete kotlin-jdk-annotations and kotlin-android-sdk-annotations
They were empty anyway for a long time
2016-01-28 21:48:16 +03:00
Ilya Gorbunov
911940d458 InlineOnly annotation suppresses NOTHING_TO_INLINE diagnostics. 2016-01-28 19:37:44 +03:00
Mikhail Glukhikh
0f1e6ba8be Refactoring: noTypeCheckingErrorsInExpression introduced 2016-01-28 19:30:25 +03:00
Mikhail Glukhikh
ed8ccdc15a Take into account data flow info changes for special call (if/when/elvis/!!) arguments #KT-10824 Fixed
Smart casts on complex expressions look as no more possible
2016-01-28 19:30:20 +03:00
Dmitry Jemerov
7c59592212 Quickfix for "Expression cannot be invoked as a function" with no arguments to remove parentheses
#KT-10825 Fixed
2016-01-28 17:04:44 +01:00
Dmitry Jemerov
6d7e1c69dc remove logic to filter perf output from compiler output 2016-01-28 16:12:56 +01:00
Dmitry Jemerov
6f7aed2601 report perf only if enabled in command line 2016-01-28 16:12:55 +01:00
Mikhail Glukhikh
7fd1f507e4 Additional catch for ReenteringLazyValueComputationException #KT-8448 Fixed
Also #EA-76264 Fixed
2016-01-28 17:52:33 +03:00
Mikhail Glukhikh
5062ce2804 Regression: correct smart cast from Type? to Type! 2016-01-28 17:08:15 +03:00
Mikhail Glukhikh
26a2319d7c ControlFlowBuilder.getExitPoint() now can return null if nothing was found #KT-10823 Fixed
Also #EA-73355 Fixed
2016-01-28 16:19:54 +03:00
Mikhail Glukhikh
c5d6e8edb4 More detailed error message for EA-77641 2016-01-28 16:19:49 +03:00
Mikhail Glukhikh
7c8cdf84fd ControlFlowProcessor: converted to Kotlin #EA-77380 Fixed 2016-01-28 16:19:45 +03:00
Mikhail Glukhikh
59c2a96eb5 ControlFlowProcessor.java --> ControlFlowProcessor.kt 2016-01-28 16:19:41 +03:00
Mikhail Glukhikh
42b6b41378 ControlFlowInstructionsGenerator: converted to Kotlin 2016-01-28 16:19:37 +03:00
Mikhail Glukhikh
80338ecb88 ControlFlowInstructionsGenerator.java --> ControlFlowInstructionsGenerator.kt 2016-01-28 16:19:33 +03:00
Mikhail Glukhikh
6ba171297c ControlFlowBuilderAdapter: converted to Kotlin 2016-01-28 16:19:29 +03:00
Mikhail Glukhikh
5a405f3ddb ControlFlowBuilderAdapter.java --> ControlFlowBuilderAdapter.kt 2016-01-28 16:19:24 +03:00
Mikhail Glukhikh
605da5b7b9 ControlFlowBuilder: converted to Kotlin 2016-01-28 16:19:20 +03:00
Mikhail Glukhikh
41eed948be ControlFlowBuilder.java --> ControlFlowBuilder.kt 2016-01-28 16:19:16 +03:00
Mikhail Glukhikh
171cdfe08a Unnecessary comments removed 2016-01-28 16:19:12 +03:00
Mikhail Glukhikh
1ddaf465cd PseudocodeImpl: converted to Kotlin 2016-01-28 16:19:08 +03:00
Mikhail Glukhikh
381c1c4bba PseudocodeImpl.java --> PseudocodeImpl.kt 2016-01-28 16:19:03 +03:00
Mikhail Glukhikh
1d6eadbd37 Pseudocode: converted to Kotlin 2016-01-28 16:18:59 +03:00
Mikhail Glukhikh
c54f8ebac7 Pseudocode.java --> Pseudocode.kt 2016-01-28 16:18:55 +03:00
Dmitry Jemerov
95683bbf38 remove old API usage inspection 2016-01-28 14:13:57 +01:00
Nikolay Krasko
e79ad386ef Parametrize maven deploy to allow pushing to bintray 2016-01-28 15:03:27 +03:00
Michael Bogdanov
dc2cb401ad KT-10670: Debugger: Evaluate Expression/Watches fail for inline function parameter initialized with default value
#KT-10670 Fixed
2016-01-28 14:23:24 +03:00
Michael Bogdanov
d4df7aaabc Fix for KT-10659: Debugger: Evaluate Expression and Watches fail for inline function parameter passed by reference
#KT-10659 Fixed
2016-01-28 14:23:24 +03:00
Mikhail Glukhikh
069282cb6e Regression test #KT-8277 Can't Reproduce 2016-01-28 13:33:29 +03:00
Mikhail Glukhikh
12b100c541 Regression test #KT-9529 Obsolete 2016-01-28 12:56:12 +03:00
Ilya Gorbunov
6ac52d19ac Move IndexedValue to kotlin.collections. 2016-01-28 12:41:36 +03:00
Natalia Ukhorskaya
54fa9eff61 Debugger: do not compute classnames for inline functions during stepping 2016-01-28 11:16:44 +03:00
Denis Zharkov
e69b115d9a Remove wrong assertion 2016-01-28 08:36:24 +03:00
Denis Zharkov
29c24267fa Fix project compilation
First parameters of `DiagnosticFactory.on` methods are annotated as 'NotNull'
2016-01-28 08:36:24 +03:00
Denis Zharkov
11a96ee8c8 Introduce not null type parameter capability
Java nullability annotations may generate types that currently are not denotable in Kotlin:
class Java {
  void <F> foo(@NotNull F f) {}
}

Type of given value parameter should be not nullable under any substitution:
String/String?/String! because of annotation contract.

NB: Currently there is no full analogues for such types in pure kotlin
2016-01-28 08:36:23 +03:00
Denis Zharkov
08dd675fcd Minor. Drop unused property 2016-01-28 08:36:23 +03:00
Denis Zharkov
8e3bdd6a0f Minor. Rename parameter and get rid of labels 2016-01-28 08:36:22 +03:00
Denis Zharkov
c26ca5e7ef Turn on inference when resolving constructor super-calls
It's only needed when one of candidates has it's own type parameters
Otherwise it does not make sense as arguments are already specified
2016-01-28 08:35:18 +03:00
Denis Zharkov
6542d091ee Support generic constructors defined in Java
#KT-10686 Fixed
 #KT-10410 Fixed
2016-01-28 08:35:18 +03:00
Alexander Udalov
a02d1b75b8 Mark array constructors with 'inline'
To allow non-local returns from lambdas passed to them
2016-01-28 03:10:40 +03:00
Alexander Udalov
70e847b794 Reimplement generation of intrinsic array constructors
Instead of relying on a class from the runtime (which thus cannot be deleted
from the runtime ever), rely on a class from the compiler instead. This has a
minor downside: that class is compiled by the bootstrap compiler, so if codegen
of 'for'-loops or something else used in that class changes, it won't
immediately have an effect on a local working copy (on the build server
everything will be fine because of a 2-step building process).

In the future it may make sense to just manually create all the bytecode
instructions and dump them into a MethodNode. Currently the amount of work
needed for that seems rather significant
2016-01-28 03:10:39 +03:00
Alexander Udalov
0e11aa098f Minor, prettify Kotlin code in source maps 2016-01-28 03:10:39 +03:00
Alexander Udalov
7d880f10ec Optimize getFqName calls in KotlinBuiltIns
Check the simple name first, and only then construct the full FqName, in all
'is*' methods
2016-01-28 03:10:38 +03:00
Alexander Udalov
04026dbe84 Make Array<T>(size, init) a constructor of Array
It's not marked as inline, this is why 'crossinline' was added in
jaggedArray.kt/jaggedDeep.kt. Will be fixed in the following commits
2016-01-28 03:10:37 +03:00
Alexander Udalov
18238bd6f3 Minor, drop DescriptorRendererOptions#prettyFunctionTypes 2016-01-28 03:10:19 +03:00
Alexander Udalov
9e8b6571f4 Make primitive array factory functions constructors 2016-01-28 03:10:19 +03:00
Alexander Udalov
4b03adaa57 Minor, improve AbstractLazyType#toString for debug 2016-01-28 03:10:19 +03:00
Alexander Udalov
0e481a4340 Minor, fix Array kdoc 2016-01-28 03:10:19 +03:00
Ilya Gorbunov
3d468aaab9 Allow call assertFailsWith<T> with default message. 2016-01-28 00:13:51 +03:00
Mikhail Glukhikh
7e26fa6002 One non-processed branch is now allowed for if statement #KT-10805 Fixed
Also #EA-64033 Fixed
2016-01-27 22:44:52 +03:00
Yan Zhulanow
43b176de7e Minor: fix typo 2016-01-27 19:31:45 +03:00
Yan Zhulanow
c6e6547559 Kapt: add Java task classpath to processorpath 2016-01-27 19:31:45 +03:00
Yan Zhulanow
203d9e150b Kapt: Add kapt.kotlin.generated to the supported options list 2016-01-27 19:31:45 +03:00
Yan Zhulanow
bfae2afdb5 Android Extensions: Remove deprecated k.a.s.<layout> convention 2016-01-27 19:31:45 +03:00
Ilya Gorbunov
d49f5b95b0 Fix deprecations in testData 2016-01-27 19:05:19 +03:00
Ilya Gorbunov
eabac9dcf6 Rename measureTimeNano to measureNanoTime 2016-01-27 18:34:33 +03:00
Ilya Gorbunov
d46501e11b Make all remaining deprecations to be errors. 2016-01-27 18:34:32 +03:00
Ilya Gorbunov
263e1b4b5d Drop deprecated mapIndexedTo on Maps. 2016-01-27 18:34:31 +03:00
Ilya Gorbunov
744a7a83f7 Cleanup RC deprecations in compiler and plugin. 2016-01-27 18:34:30 +03:00
Yan Zhulanow
c7a0375c25 Fix AndroidSubplugin applicability check (plain Java Gradle project) 2016-01-27 17:17:47 +03:00
Yan Zhulanow
16958d7a66 Android Extensions: Clear findViewById cache just before RETURN (KT-10720) 2016-01-27 17:17:47 +03:00
Yan Zhulanow
ec4f1b16de Remove obsolete Android Extensions plugin 2016-01-27 17:17:47 +03:00
Yan Zhulanow
32037fdd2e Do not remove all imports if "Optimize Imports" is executed on a file outside source dirs #KT-9925 2016-01-27 17:17:47 +03:00
Yan Zhulanow
4e82fabc7d kapt: Pass Kotlin annotations to process() 2016-01-27 17:17:47 +03:00
Dmitry Petrov
c5fd496cc9 Fix KT-10805 for 'when'. 2016-01-27 17:07:20 +03:00
Dmitry Petrov
9db3440e72 Fix type inference issues for 'if' and 'when'.
Use 'expectedType' (when present) as an explicit type argument for a special construct call.
Unfortunately, this approach can't be used for elvis due to other elvis-related inference hacks.
Fixes KT-10807, KT-10811.
This also affects KT-6189: now we can infer proper type for 'if'.

If type inference for special call failed, and we found no type errors in sub-expressions,
report TYPE_INFERENCE_FAILED_ON_SPECIAL_CONSTRUCT error.
This (and the hack above) fixes KT-10809: code no longer compiles.
2016-01-27 17:07:20 +03:00
Dmitry Jemerov
e3e463ef70 nicer UI for choosing a configurator when multiple options are available 2016-01-27 13:49:45 +01:00
Nikolay Krasko
7c8a5b0b83 Make change signature fix non-applicable for constructors (EA-76554) 2016-01-27 14:00:16 +03:00
Alexey Tsvetkov
8331442661 Fix clause that causes removing deleted files from LookupStorage 2016-01-27 12:31:14 +03:00
Alexey Tsvetkov
0a48d83176 Make LookupStorage thread safe
#KT-10792: Fixed
2016-01-27 12:31:14 +03:00
Alexey Tsvetkov
44b3159867 Move InlineFunctionsMap to IncrementalCacheImpl 2016-01-27 12:28:44 +03:00
Alexey Tsvetkov
2abc422577 Fix updating java mappings for multifile facade 2016-01-27 12:28:44 +03:00
Alexey Tsvetkov
56942930c9 Minor: remove unreachable code 2016-01-27 12:28:44 +03:00
Alexey Tsvetkov
cfc45aa763 Update incremental cache version 2016-01-27 12:28:44 +03:00
Alexey Tsvetkov
a474165a8f Recompile subtypes when class member is changed 2016-01-27 12:28:44 +03:00
Ilya Gorbunov
4296b7f882 Breaking: make copyTo return target file instead of its size. 2016-01-27 00:29:09 +03:00
Ilya Gorbunov
8d02467e6d Introduce plusElement and minusElement to disambiguate situations like List<List<T>> + List<T>
#KT-9992 Fixed
2016-01-27 00:00:01 +03:00
Zalim Bashorov
fb21ef2e1d Use interner in LookupTracker implementations to reduce memory consuming 2016-01-26 23:14:20 +03:00
Dmitry Jemerov
c83b4b3842 clean ZipHandler cache after disposing CoreApplicationEnvironment to avoid storing stale ZipHandlers referring to disposed CoreJarFileSystem instance in ZipHandler.ourFileAccessorCache 2016-01-26 19:51:59 +01:00
Yan Zhulanow
26ed1c3756 Move Android Extensions subplugin to the main kotlin-gradle-plugin artifact 2016-01-26 21:13:37 +03:00
Mikhail Glukhikh
d94930149b Warning for open members in objects 2016-01-26 19:04:17 +03:00
Mikhail Glukhikh
1b8f938260 Report EXPOSED_PROPERTY_TYPE on a property name only #KT-10760 Fixed 2016-01-26 19:04:13 +03:00
Mikhail Glukhikh
b1e3e1c32d A few forgotten checks added for objects (function members effective visibility, multiple varargs) #KT-10753 Fixed 2016-01-26 19:04:08 +03:00
Mikhail Glukhikh
0368631aa3 Source code fix: exposed visibility in object members 2016-01-26 19:04:04 +03:00
Mikhail Glukhikh
22c0ddaa48 Destructuring declaration initializer now cannot use extension componentX() on nullable #KT-7794 Fixed 2016-01-26 19:03:28 +03:00
Mikhail Glukhikh
850dc89b38 For-loop now cannot use extension iterator on a nullable #KT-7428 Fixed 2016-01-26 19:03:23 +03:00
Alexey Sedunov
218dd41a08 Move: More accurate visibility analysis
#KT-10553 Fixed
2016-01-26 18:19:20 +03:00
Alexey Sedunov
64f6c62d4f Move: Implement "Move nested class to another class" UI
#KT-9027 Fixed
2016-01-26 18:19:16 +03:00
Alexey Sedunov
e943508d87 Move: Implement "Move nested class to upper level" UI
#KT-9027 In Progress
2016-01-26 18:19:13 +03:00
Alexey Sedunov
d662b02e95 Move: Nested classes support
#KT-9027 In Progress
2016-01-26 18:19:09 +03:00
Yan Zhulanow
0304bd1dc1 More precise diagnostic messages about "operator modifier is not applicable" 2016-01-26 17:21:44 +03:00
Yan Zhulanow
3fa506fd45 "Inapplicable operator modifier" and "Inapplicable infix modifier" are now errors 2016-01-26 17:21:44 +03:00
Denis Zharkov
f560799bb7 Support top level wildcard types
#EA-73650 Fixed
2016-01-26 16:41:29 +03:00
Nikolay Krasko
5b6f7486ce KotlinSetupEnvironmentNotificationProvider now uses indecies so it not DumbAware anymore (EA-78406) 2016-01-26 16:29:56 +03:00
Nikolay Krasko
d5768dc4ff Fix PsiInvalidElementAccessException in suppression check (EA-71132) 2016-01-26 16:29:55 +03:00
Nikolay Krasko
e7685735bb KtUnaryExpression.baseExpression may be null (EA-78379) 2016-01-26 16:29:53 +03:00
Nikolay Krasko
06939b11e4 Fix NPE in GotoSuperActionHandler.java (EA-77295) 2016-01-26 14:58:44 +03:00
Zalim Bashorov
aebf681809 Rename module "build" -> "build-common" 2016-01-26 14:32:21 +03:00
Denis Zharkov
8ec63bd4dd Use type arguments from supertype when resolving constructor delegation call
#KT-3357 Fixed
2016-01-26 13:53:45 +03:00
Denis Zharkov
8b828f1d9a Use known type substitutor if it exists 2016-01-26 13:53:45 +03:00
Natalia Ukhorskaya
b442cf9fec Debugger: check that virtual machine allows to get bytecodes 2016-01-26 13:36:39 +03:00
Ilya Gorbunov
23080f78f7 Map.getOrPut: treat nulls as missing values. 2016-01-26 11:49:18 +03:00
Ilya Gorbunov
a49db730a9 Map.getOrElse: treat nulls as missing values. 2016-01-26 11:49:17 +03:00
Ilya Gorbunov
90a239e74c Provide toMutableList as a replacement for toArrayList. 2016-01-26 11:49:15 +03:00
Ilya Gorbunov
a709ba4a6e Provide toMap with the destination mutable map to populate.
Tune type projections of map mutating operations.
2016-01-26 11:49:13 +03:00
Ilya Gorbunov
564155734b Introduce associateTo and associateByTo with the destination MutableMap to fill. 2016-01-26 11:49:12 +03:00
Ilya Gorbunov
e41bf687d9 Deprecate toLinkedMap 2016-01-26 11:49:10 +03:00
Ilya Gorbunov
8224a4e186 Rename toMap and toMapBy to associate and associateBy 2016-01-26 11:49:03 +03:00
Ilya Gorbunov
45c9cc4add Breaking: Change File.copyTo contract to be similar to Files.copy from JDK8. 2016-01-26 11:49:02 +03:00
Ilya Gorbunov
67663c43ae Introduce overwrite parameter to File.copyRecursively.
#KT-8924 Fixed
2016-01-26 02:26:33 +03:00
Ilya Gorbunov
d03c174650 Deprecate assertFailsWith with java Class<T> parameter.
#KT-10377
2016-01-26 02:26:33 +03:00
Ilya Gorbunov
28ab9eebbc minor: manual cleanup 2016-01-26 02:26:33 +03:00
Alexander Udalov
36e41554e1 Do not load old metadata annotation in check-library-abi-version.kts
Also do not force recompiling markdown since we've moved to 1.1.0 now
2016-01-25 22:41:45 +03:00
Stanislav Erokhin
e53e152f83 Removed hacks for code migration from ConstraintSystemImpl. 2016-01-25 21:53:09 +03:00
Ilya Gorbunov
7703252239 Provide groupBy and groupByTo with keySelector and valueTransform.
Rename parameters of groupBy, add type parameter for MutableMap to groupByTo.
2016-01-25 21:15:56 +03:00
Ilya Gorbunov
0eaaee8202 StdLib Generators: parse generic function parameters into primitive model 2016-01-25 21:15:19 +03:00
Stanislav Erokhin
210c9ab3db Minor. Added regression tests for: KT-3927, KT-9522, KT-10036, KT-7440, KT-9682, KT-9808, KT-9517, KT-9810, KT-9345. 2016-01-25 19:13:32 +03:00
Stanislav Erokhin
298a075381 Minor. removed functions which declared in Standard.kt from diagnostic testdata.
Removed declaration for functions: TODO, run, with, apply, let.
2016-01-25 19:13:31 +03:00
Stanislav Erokhin
d7438d9f2b Add mock runtime to diagnostic tests.
Mock runtime contains function from file Standard.kt
2016-01-25 19:13:30 +03:00
Nikolay Krasko
6ac73eb760 Remove blocking cache in Kotlin JavaElementFinder (KT-9811)
Attempt to remove cache completely. There's now cache in JavaPsiFacadeImpl.findClass() that probably solves the original problem.
2016-01-25 17:08:22 +03:00
Michael Bogdanov
874560df9d Fix for KT-10715: Verify error on incrementing backing field from accessor 2016-01-25 16:56:57 +03:00
Michael Bogdanov
cf09949354 Fix for KT-10590: IllegalAccessError when protected getter of Java base class is accessed from lambda using property access syntax 2016-01-25 16:56:56 +03:00
Natalia Ukhorskaya
9d66852ae2 J2K: convert method references according to special methods 2016-01-25 15:02:48 +03:00
Natalia Ukhorskaya
25b64b198c Minor: fix NPE 2016-01-25 12:47:45 +03:00
Natalia Ukhorskaya
ba323098ea Debugger: fix EE for localvariables inside inline function call
#KT-10674 Fixed
2016-01-25 12:47:45 +03:00
Natalia Ukhorskaya
203cab8d1b Debugger: fix step over for if with inline function call without lambda arguments 2016-01-25 12:47:45 +03:00
Nikolay Krasko
dbc2299cf2 Update test jar during runtime library update (KT-10773)
#KT-10773 Fixed
2016-01-25 11:37:56 +03:00
Stanislav Erokhin
aca19ed27a KT-10772 Problem with daemon on Idea 15.0.3 & 1-dev-25
# KT-10772 Fixed
2016-01-24 12:29:23 +03:00
Ilya Gorbunov
a78b08d9c7 Use generic coerceIn for nullable primitives, provide specialization for non-nullable ones.
Fix docs for coerceAtMost.
2016-01-24 06:44:13 +03:00
Alexander Udalov
7981e5aa3a Increase metadata version to 1.1, hardcode incompatibility with 1.0
Add a temporary option to suppress incompatibility errors when compiling Kotlin
against current IDEA libraries until they are migrated
2016-01-23 10:00:19 +03:00
Ilya Gorbunov
13b1e91eb5 StdLib Generators: fix type projections, do not use concat. 2016-01-23 05:13:26 +03:00
Alexander Udalov
714df7b433 Add temporary compiler option to suppress incompatibility errors
To compile Kotlin against current IDEA libraries until they are migrated to 1.1
2016-01-22 23:53:47 +03:00
Stanislav Erokhin
f688b1b786 Relax rules for type parameters in property receivers 2016-01-22 22:18:57 +03:00
Stanislav Erokhin
30bb8d4828 Minor. Optimized enhanceSignature method 2016-01-22 22:09:33 +03:00
Stanislav Erokhin
f710ba88f8 Minor. Removed TypeParameterDescriptor#getLowerBounds 2016-01-22 22:09:33 +03:00
Ilya Gorbunov
9a41e07ac0 Use IDEA 143.1960 built with master kotlin branch.
Remove tweaks required to bootstrap packages.
Restore non-star imports of kotlin.text.Charsets.
2016-01-22 22:06:22 +03:00
Alexey Tsvetkov
cfc410261b Minor: fix test data 2016-01-22 21:04:46 +03:00
Mikhail Glukhikh
0ff07af3ef DelegatingDataFlowInfo: potential concurrent modification in multi map fixed 2016-01-22 20:44:58 +03:00
Denis Zharkov
982dfa9183 Minor. Specify variables type explicitly
It's needed because 'assertEquals' has 'OnlyInputType' annotation
on type parameter, and type of 're.exec(string)!!' is 'Array<String?>',
while 'arrayOf("A5D5", "A5", "D5")' is 'Array<String>'
2016-01-22 19:17:22 +03:00
Denis Zharkov
6c0cd70a22 Introduce PureReifiable annotation
It prevents reporting unsafe substitution warning on expressions
like 'arrayOf(arrayOf(""))'
2016-01-22 19:17:22 +03:00
Denis Zharkov
32755a269c Support annotations on type parameters in stub builder 2016-01-22 19:17:22 +03:00
Denis Zharkov
d7e035fd9b Serialize annotations on type parameters in builtins 2016-01-22 19:17:22 +03:00
Denis Zharkov
4cf1393e81 Minor. Render annotations on type parameters 2016-01-22 19:17:22 +03:00
Denis Zharkov
70dc5b5403 Prohibit use of captured type as argument for reified parameter
#KT-8093 Fixed
2016-01-22 19:17:22 +03:00
Denis Zharkov
751f66c656 Report warning on generic type as argument for reified parameter
#KT-6484 Fixed
2016-01-22 19:17:22 +03:00
Denis Zharkov
ae6c62ddff Minor. Report reified-related diagnostics on arguments if possible 2016-01-22 19:17:22 +03:00
Denis Zharkov
5baa0ed4bb Minor. Rename TypeUtils.containsSpecialType -> contains 2016-01-22 19:17:22 +03:00
Denis Zharkov
a5c13ce8cf Approximate projections in SAM type when creating SAM adapter
Use the same approach as Java 8 applies to function types
(see non-wildcard parametrization in §9.9 of JLS)

 #KT-6918 Fixed
2016-01-22 19:17:22 +03:00
Denis Zharkov
d87b13931d Create special type for missing dependencies when resolving annotations
#KT-10748 Fixed
2016-01-22 19:17:22 +03:00
Nikolay Krasko
76f60294a8 Temporary revert old system of source roots for idea-full and intellij-core 2016-01-22 19:01:39 +03:00
Dmitry Jemerov
4846776242 don't show "Kotlin not configured" notification for files outside a source root 2016-01-22 16:42:58 +01:00
Mikhail Glukhikh
e9af4d25d0 Handling of try / catch / finally with 'Nothing' in all catch blocks #KT-10735 Fixed 2016-01-22 16:37:22 +03:00
Mikhail Glukhikh
60f5d9ef8b DelegatingDataFlowInfo: do not create redundant instances 2016-01-22 16:37:19 +03:00
Mikhail Glukhikh
2ee9f22242 DelegatingDataFlowInfo: never store original type or its supertypes #KT-10666 Fixed 2016-01-22 16:37:16 +03:00
Mikhail Glukhikh
e04338f4fa Minor refactoring: DelegatingDataFlowInfo.create() 2016-01-22 16:37:13 +03:00
Mikhail Glukhikh
366ab508e1 Data flow analysis: assignment of null makes variable effectively of type 'Nothing?' 2016-01-22 16:37:10 +03:00
Mikhail Glukhikh
859059d714 Bug fix: jump out of a loop inside if condition 2016-01-22 16:37:07 +03:00
Mikhail Glukhikh
b3c5760eb5 Type intersection fix: T & (final A) is no more calculated as just A #KT-7801 Fixed 2016-01-22 16:37:04 +03:00
Mikhail Glukhikh
3106a8508a Front-end and back-end test for KT-7801 2016-01-22 16:37:00 +03:00
Mikhail Glukhikh
7ac55cefcb Extra test with smart cast to 'T' 2016-01-22 16:36:57 +03:00
Mikhail Glukhikh
d5ffa0bbca DelegatingDataFlowInfo: default constructor 2016-01-22 16:36:54 +03:00
Mikhail Glukhikh
7870ad2445 DataFlowInfo converted to Kotlin, DataFlowInfoFactory introduced 2016-01-22 16:36:51 +03:00
Mikhail Glukhikh
9e1c2f396e DataFlowInfo.java --> DataFlowInfo.kt 2016-01-22 16:36:48 +03:00
Alexey Tsvetkov
f63a9ee556 Optimize adding lookups to lookup storage 2016-01-22 16:01:36 +03:00
Alexey Tsvetkov
f32ff42ba3 Recompile implicit type usages when class signature is changed 2016-01-22 16:01:36 +03:00
Alexey Tsvetkov
310a995bb1 Add lookup for every expression's type 2016-01-22 16:01:36 +03:00
Alexey Tsvetkov
1ef615e020 Add incremental compilation test with change of annotation class 2016-01-22 16:01:36 +03:00
Alexey Tsvetkov
5ce692a75c Improve proto comparison test with changes of annotation list 2016-01-22 16:01:35 +03:00
Alexey Tsvetkov
58a91b3d20 Add proto comparison tests with changes of class/member flags 2016-01-22 16:01:35 +03:00
Alexey Tsvetkov
a7c432ebe8 Add incremental compilation tests with changes of companion object 2016-01-22 16:01:35 +03:00
Alexey Sedunov
618f9f62f6 Code Insight: "Generate toString" action
#KT-10309 Fixed
2016-01-22 15:50:19 +03:00
Alexey Sedunov
77b637e238 Change Signature: Skip Java methods which can't be resolved from Kotlin (such as methods of local classes)
#KT-10432 Fixed
2016-01-22 15:50:17 +03:00
Alexey Sedunov
0104bfec86 Add val/var to Constructor Parameter: Fix caret position before starting template 2016-01-22 15:50:16 +03:00
Alexey Sedunov
8da986ff24 Add Initializer Quick-Fix: Place caret at the end of generated initializer
#KT-10704 Fixed
2016-01-22 15:50:15 +03:00
Alexey Sedunov
9081f5df52 Introduce Variable: Move caret to the end of declaration when replacing "statement" expression
#KT-10663 Fixed
2016-01-22 15:50:14 +03:00
Pavel V. Talanov
16ab4bec34 Try to diagnose NoDescriptorForDeclarationException in completion 2016-01-22 15:32:37 +03:00
Dmitry Petrov
55b7e4bbf0 Ignore special resolved calls for 'when' in PSI unifier. 2016-01-22 10:41:56 +03:00
Dmitry Petrov
a33c840939 Fix Kotlin build after fixing when-related type checking issues.
Filed: KT-10752, KT-10755.
2016-01-22 10:41:55 +03:00
Dmitry Petrov
f371e67ce8 PatternMatchingTypingVisitor:
rewrite type inference for 'when' using special constructs.
This fixes several type inference issues for 'when':
KT-9929, KT-9972, KT-10439, KT-10463
along with some other diagnostics-related issues.
2016-01-22 10:41:55 +03:00
Dmitry Petrov
b49e08fe04 PatternMatchingTypingVisitor:
separate condition data flow info analysis and exhaustiveness check
from type inference for "incomplete" (statement-like) 'when'.
2016-01-22 10:41:55 +03:00
Michael Bogdanov
a76d16931c Temporary generate old default method 2016-01-22 10:10:32 +03:00
Michael Bogdanov
829978a37d Added additional parameter for default methods 2016-01-22 10:10:32 +03:00
Ilya Gorbunov
875287574f Update testData for LoadBuiltinsTest and BuiltInDecompilerTest 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
4d5ec9be3f Drop identityEquals from builtins, compiler and tests. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
f5f5a2dcc1 Move progression final element test to stdlib tests.
Less values are tested for iteration not to timeout in js tests.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
2a125ca92d Drop deprecated builtins: PropertyMetadata, progression internal utils, HiddenDeclaration and Extension annotations 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
31ec7bcbea Deprecate String.concat with error severity.
Fix concat j2k conversion.
Add expected deprecation errors for Java String constructors that must be converted to special Kotlin String methods.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
2257fa36ec Drop deprecations: text and system
Fix import in testData
Fix testData: replace removed method.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
8bf638c60f Drop deprecations: FileTreeWalk deprecated API elements. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
e9c14a02d3 Make FilePathComponents internal, temporary disable tests of internal API 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
c1ad82ff8c Harden charset-as-string taking function deprecations.
Fix usages in compiler.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
6d5a65cac6 Minor: remove File?.readTextOrEmpty() 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
d728a1a6c7 Replace File.relativePath from stdlib with File.descendantRelativeTo in fileUtils.
IO utils: cleanup java usages.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
b39b29dfea Drop deprecations: io and threading functions. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
25c4453dc5 Cleanup deprecated symbol usages in testData 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
eefbd72a64 Remove AddStarProjectionsFix for removed javaClass<T> function. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
cbc3a3b595 Make IndexingIterator and IndexingIterable internal. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
9142025df6 Drop deprecations: reflection utilites. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
69f884dcd3 Drop deprecations: preconditions with non-lazy message. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
768a23f7eb Drop deprecations: functions that were converted to properties. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
2813840769 Fix testData: diagnostics changed. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
ef0d998fbc Drop deprecations: *Raw functions. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
d1a5988bfc Drop deprecations: complicated map delegates and kotlin.support.AbstractIterator. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
4f1d2252f0 Make test for replacement, which requires adding import to the package with operator, independent from stdlib. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
d7f8754282 Drop deprecated classes inheriting multifile facade classes moved out of kotlin package. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
473773723b Drop deprecations in kotlin.test 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
85a02d40c6 Drop hidden declarations provided for binary compatibility 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
264c9a0fc9 Drop deprecated toGenerator and toLinkedList (again). 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
b97e436a50 Fix deprecated Range and Progression usages in testData 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
d48ec7e296 Update testData for LoadBuiltinsTest 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
91f4cf0ebc Drop Progression<T> and its deprecated properties: start, end, increment.
Drop deprecated range extensions.
Make progression constructors private.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
6dd8470835 Drop deprecated primitive ranges and progressions: for Byte and Short 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
e8621cb738 Drop Range<T> interface and its extensions. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
face6d449b Make values in Typography constant, add dollar sign. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
6eabd1d692 Move stdlib classes between packages. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
f4822cd757 Fix testData in compiler: add collections and ranges package to fq-names. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
98e2d27c77 Resolve types from all builtin default packages in TypeUnifierTest 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
c84cbfb36a Allow to specify fq-names in expected resolve testData 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
3262a4ddc2 LoadBuiltinsTest inspects three packages: kotlin, kotlin.collections and kotlin.ranges 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
db9e458cf9 Fix imports in maven kotlin from java usage example. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
46a59b7550 Fix imports in java: temporary replace with star imports. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
0213a129ce Increment STUB_VERSION due to changed fq-names in signatures. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
26a6147a56 Minor: array constructor names formatting. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
1129cee0ff Collect nested classes from all 4 builtin packages. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
e500e4bdf4 Obtain purely implemented interface class descriptor by its fq-name. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
e485bd4909 Fix mutability-flexible types rendering. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
83ef48d0ac Refer to builtin names in HeuristicSignatures and j2k TypeVisitor 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
346291af7b Use fq-names from KotlinBuiltins.FQ_NAMES instead of hardcoded ones. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
9c0f0cad70 Packages: move collections to kotlin.collections. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
9fbbc9db98 Packages: move Ranges, Progression, ProgressionIterators to kotlin.ranges and PrimitiveIterators to kotlin.collections. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
a3efa1ea6c Temporary allow-kotlin-package for building compiler 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
3176f7d06c Restore downloading IDEA from teamcity, build markdown every time (temporary) 2016-01-22 05:54:38 +03:00
Alexander Udalov
0b7d2e3a68 Do not write old callable proto flags, use only new ones 2016-01-22 05:51:14 +03:00
Ilya Gorbunov
300a4be060 Deprecate Map.minus and minusAssign operators.
Disable tests failing in JS.
2016-01-22 01:13:33 +03:00
Ilya Gorbunov
7896e58afc Rename sequence function to generateSequence 2016-01-22 01:13:31 +03:00
Ilya Gorbunov
63e8865123 Make Lazy an interface open to implementation.
#KT-9287 Fixed
2016-01-22 01:03:18 +03:00
Ilya Gorbunov
dbcad08a35 Regex: MatchResult.groupValues do not exclude zeroth group, use the same indices as in groups collection.
Provide destructured property for destructured assignment.
2016-01-22 00:59:13 +03:00
Ilya Gorbunov
3459a24b0a Regex: Introduce MatchResult.groupValues to get list of numbered group values exlcuding zeroth group with the entire match. 2016-01-22 00:56:08 +03:00
Pavel V. Talanov
1fe749c114 Refactor: get rid of LightClassUtil#getPsiClass() in favor of KtClassOrObject:toLightClass extension 2016-01-21 20:47:22 +03:00
Pavel V. Talanov
2972dbca00 Rename LightClassGenerationSupport.getPsiClass -> getLightClass and make it return KtLightClass 2016-01-21 20:47:21 +03:00
Pavel V. Talanov
06215ca932 Correctly avoid calculation of autogenerated parameter name in ClsParameterImpl.calcName() 2016-01-21 20:47:21 +03:00
Pavel V. Talanov
36d5798a2e Regression test for old issue
#KT-7656 Fixed
2016-01-21 20:47:20 +03:00
Zalim Bashorov
1e6b3c5ae1 Add own PathStringDescriptor to compare paths properly on case-insensitive filesystems 2016-01-21 19:47:10 +03:00
Ilya Chernikov
c585d91e79 Adding generation states destroying to module-based compilation, to fix kapt usage with this compilation path 2016-01-21 19:47:09 +03:00
Ilya Chernikov
3615ca5b02 build.xml: add kotlin-build target 2016-01-21 19:47:08 +03:00
Ilya Chernikov
a61e5a6736 build.xml: add manifest to kotlin-daemon-client.jar 2016-01-21 19:47:07 +03:00
Ilya Chernikov
6198d0abbc Move compiler running utils to common module 2016-01-21 19:47:06 +03:00
Ilya Chernikov
a36e6a2e07 J2K KotlinModuleXmlBuilder: convert 2016-01-21 19:47:05 +03:00
Ilya Chernikov
60892f2b9c J2K KotlinModuleXmlBuilder: rename file 2016-01-21 19:47:04 +03:00
Zalim Bashorov
cc1c5b7e10 Move back classes which used only in JPS 2016-01-21 19:47:04 +03:00
Zalim Bashorov
e2e0167880 Minor: don't override clean in SourceToClassesMap 2016-01-21 19:47:03 +03:00
Ilya Chernikov
5ead2edaa0 Creating shared module "build", copying lookup storage, tracker and incremental cache related files into it from jps plugin 2016-01-21 19:47:02 +03:00
Valentin Kipyatkov
84e530bc1a KT-6079 Show "parameter information" popup for type arguments
#KT-6079 Fixed
2016-01-21 19:07:39 +03:00
Michael Bogdanov
bf16783fb7 Fix for KT-9591: Exception on inlining
#KT-9591 Fixed
2016-01-21 18:44:05 +03:00
Valentin Kipyatkov
53fe1568c9 KT-8529 Code completion for parameter name and type together replaces wrong range on Tab
#KT-8529 Fixed
2016-01-21 18:30:09 +03:00
Valentin Kipyatkov
bc8095ce33 KT-9424 "Exclude from import and completion" with "Project" scope
#KT-9424 Fixed
2016-01-21 18:30:08 +03:00
Alexey Tsvetkov
9bb876e6da Test incremental facade to class conversion and vice versa 2016-01-21 18:16:01 +03:00
Alexey Tsvetkov
94d4dae1fe Recompile all class usages when constructor is changed 2016-01-21 18:14:56 +03:00
Nikolay Krasko
5fcb9ca2bd Add speed to perfomance output 2016-01-21 17:45:51 +03:00
Nikolay Krasko
10648f44ac Do not auto-import convention methods without 'operator' modifier (KT-10212)
#KT-10212 Fixed
2016-01-21 17:45:51 +03:00
Dmitry Jemerov
84d507b770 code review 2016-01-21 15:30:13 +01:00
Dmitry Jemerov
4910b06f2c show "kotlin not configured" editor notification 2016-01-21 15:30:11 +01:00
Dmitry Jemerov
170ba98b20 show unsupported ABI notification only when current module or its dependencies have libraries with bad ABI 2016-01-21 15:30:11 +01:00
Dmitry Jemerov
6f80f36f2e UnsupportedAbiVersionNotificationPanelProvider: fix compilation and cleanup after J2K 2016-01-21 15:30:10 +01:00
Dmitry Jemerov
b1c5d3644e UnsupportedAbiVersionNotificationPanelProvider: J2K 2016-01-21 15:30:10 +01:00
Dmitry Jemerov
e20fdac9df UnsupportedAbiVersionNotificationPanelProvider: rename to .kt 2016-01-21 15:30:09 +01:00
Dmitry Jemerov
2379fd80fc don't show "kotlin not configured" notification for modules where the runtime is outdated 2016-01-21 15:30:08 +01:00
Dmitry Jemerov
85ea295e92 OutdatedKotlinRuntimeNotification: J2K and cleanup 2016-01-21 15:30:08 +01:00
Dmitry Jemerov
ca9979f9fb OutdatedKotlinRuntimeNotification.java: rename to .kt 2016-01-21 15:30:07 +01:00
Dmitry Jemerov
2272516d09 KotlinRuntimeLibraryUtil: J2K 2016-01-21 15:30:07 +01:00
Dmitry Jemerov
f588ef2912 KotlinRuntimeLibraryUtil: rename to .kt 2016-01-21 15:30:06 +01:00
Dmitry Jemerov
6c2a2b91b4 offer "All modules" choice in "Configure Kotlin in project" dialog, allow to invoke the action when there are no Kotlin files in the project
#KT-7979 Fixed
2016-01-21 15:30:05 +01:00
Dmitry Jemerov
4ffac80710 ConfigureKotlinInProjectUtils: convert to Kotlin, cleanup 2016-01-21 15:30:05 +01:00
Dmitry Jemerov
cff06cccf7 ConfigureKotlinInProjectUtils.kt: rename 2016-01-21 15:30:04 +01:00
Dmitry Jemerov
3b4a6afe01 Kotlin-produced test run configurations replace Java-produced ones (to avoid duplicate run configuration suggestions appearing since KtFile.getClasses() was implemented) 2016-01-21 14:46:26 +01:00
Dmitry Jemerov
51799ef70e fix tests on Windows agents: report canonical paths to conflicting Kotlin runtimes 2016-01-21 11:33:32 +01:00
Denis Zharkov
ad24092fd1 Move InlineOnly to kotlin.internal package 2016-01-21 11:26:01 +03:00
Denis Zharkov
ba506170e9 Use 'mapToCallableMethod' for delegateTo signature calculation
#KT-9707 Fixed
2016-01-21 11:24:23 +03:00
Valentin Kipyatkov
3a7ed33de1 KT-10747 "Incompatible stack heights" when compiling call to Java setter with non-void return type using property syntax
#KT-10747 Fixed
2016-01-21 10:48:47 +03:00
Alexander Udalov
d2d0f399db Minor, save parameters to field in ValueArgumentsToParametersMapper 2016-01-21 00:36:35 +03:00
Alexander Udalov
8fe964f269 Resolve array access RHS always as the last argument of the call
Also do not attempt to match any of the arguments in the brackets with the last
parameter of the 'set' method

 #KT-10633 Fixed
2016-01-21 00:36:35 +03:00
Dmitry Jemerov
ccef1ad49e report presence of multiple different versions of kotlin-runtime on the classpath as compilation error if other compilation errors have occurred 2016-01-20 21:02:44 +01:00
Dmitry Jemerov
4f5b2ec4b4 AnalyzerWithCompilerReport: some more cleanup after J2K 2016-01-20 21:00:24 +01:00
Dmitry Jemerov
bf5cdcb6b4 AnalyzerWithCompilerReport: J2K 2016-01-20 21:00:24 +01:00
Dmitry Jemerov
ae1e680319 AnalyzerWithCompilerReport: rename to .kt 2016-01-20 21:00:23 +01:00
Pavel V. Talanov
b34a91eeaa Changes inside init blocks should be considered out of block modifications 2016-01-20 19:02:53 +03:00
Pavel V. Talanov
d72bc78550 Resolve annotations on parameters of function type 2016-01-20 18:06:23 +03:00
Pavel V. Talanov
7d72875227 Create descriptors for parameters inside parameter list of KtFunctionType
Do not throw when trying to resolveToDescriptor those parameters
2016-01-20 18:06:19 +03:00
Michael Bogdanov
23480a5698 Supported inline of array convention simple cases; Fix for KT-9211: M13 an extension function that is inline, and for get(v) causes an exception when called using brackets
#KT-9211 Fixed
2016-01-20 17:33:50 +03:00
Michael Bogdanov
84dbdf2ccb Get rid of ValueParameterDescriptor in 'afterParameterPut' fun 2016-01-20 17:33:49 +03:00
Dmitry Jemerov
aacf2ad68c proguard: keep all JNA methods (some of them are accessed from native code) 2016-01-20 14:34:50 +01:00
Dmitry Jemerov
f88f38f7d2 Android Studio adds Android-Gradle facet to all modules, so we need to check for Android facet and Gradle module instead
#KT-9600 Fixed
2016-01-20 14:32:10 +01:00
Dmitry Jemerov
4ab6436f93 avoid index access in KtFile.getClasses() when the file isn't part of a multi-file class (helps with KT-10684) 2016-01-20 13:45:42 +01:00
Denis Zharkov
ede4b61980 Add tests for obsolete issue
#KT-7412 Obsolete
2016-01-20 14:27:53 +03:00
Denis Zharkov
06fbc9bdd3 Support reification of arrays containing reified parameters
#KT-10555 Fixed
2016-01-20 14:27:53 +03:00
Valentin Kipyatkov
28331bca9f KT-9418 Suggest name for new declaration basing on unresolved names in code
#KT-9418 Fixed
2016-01-20 13:55:56 +03:00
Valentin Kipyatkov
83ca4b84f9 Minor optimization 2016-01-20 13:55:55 +03:00
Alexander Udalov
17e8eafe33 Pass -Xallow-kotlin-package to compiler in project
To compile the 'builtins' module
2016-01-20 00:55:43 +03:00
Valentin Kipyatkov
59fb90a5ee Dropped KtTypedef 2016-01-19 19:31:44 +03:00
Valentin Kipyatkov
808c7453a4 Added test for 'typealias' being keyword 2016-01-19 19:31:44 +03:00
Valentin Kipyatkov
68853fecc3 Removed support for "typealias" declarations from the parser
#KT-10683 Fixed
2016-01-19 19:31:44 +03:00
Valentin Kipyatkov
38d374d4b9 Added test for nested class 2016-01-19 19:30:19 +03:00
Valentin Kipyatkov
2791d99f9d Direct implementation of ImportingScope 2016-01-19 19:30:19 +03:00
Valentin Kipyatkov
d337dff5fa Minor 2016-01-19 19:30:18 +03:00
Valentin Kipyatkov
d749f85a60 Inaccessible classes from the current package to not conflict with visible classes from somewhere else 2016-01-19 19:30:18 +03:00
Valentin Kipyatkov
bfe728526a Alias imports to hide symbols by original name from the current package too 2016-01-19 19:30:18 +03:00
Valentin Kipyatkov
e83bd759e6 Minor 2016-01-19 19:30:18 +03:00
Alexander Udalov
e2f49536f5 Move OldPackageFacadeClassUtils to module light-classes 2016-01-19 18:54:08 +03:00
Alexander Udalov
c78bf6c807 Set bytecode version to 1.0.0
It was 1.0.2 only because it was introduced as a clone of the metadata version,
which is 1.0.2 at the moment
2016-01-19 18:43:07 +03:00
Alexander Udalov
27dbfc7aef Rethrow InvalidProtocolBufferException with class file location info 2016-01-19 18:39:59 +03:00
Alexander Udalov
4d93d18af7 J2K DeserializedDescriptorResolver: prettify 2016-01-19 18:39:59 +03:00
Alexander Udalov
3efa51af40 J2K DeserializedDescriptorResolver: convert 2016-01-19 18:39:59 +03:00
Alexander Udalov
432d458c02 J2K DeserializedDescriptorResolver: rename .java -> .kt 2016-01-19 18:39:59 +03:00
Alexander Udalov
b216ed99b4 Simplify UTF-8 decoding, just trivially convert bytes to 16-bit Unicode
ASM will do the rest (see ByteVector#encodeUTF8)
2016-01-19 18:39:59 +03:00
Alexander Udalov
9620893fa4 Drop synthetic class kind Function, drop Metadata#xi 2016-01-19 18:39:59 +03:00
Alexander Udalov
aef6d49b48 Drop isLocalClass, do not write KotlinLocalClass 2016-01-19 18:39:59 +03:00
Alexander Udalov
e17cd12c3c Report error on generating calls to binary incompatible classes 2016-01-19 18:39:59 +03:00
Alexander Udalov
4bd1d064bb Do not load built-ins in old format, drop class_name extension 2016-01-19 18:39:59 +03:00
Alexander Udalov
625c46d568 Delete obsolete and unused class_annotation JVM proto extension 2016-01-19 18:39:59 +03:00
Alexander Udalov
6dbd29e6a4 Support decoding of both old and new encoded metadata 2016-01-19 18:39:59 +03:00
Alexander Udalov
5585c7da7f Minor, simplify utfEncoding, add option to force using 8to7 encoding 2016-01-19 18:39:59 +03:00
Andrey Breslav
fe15984a59 Direct encoding into UTF-8 bytes, without the 8-to-7-bit conversion 2016-01-19 18:39:59 +03:00
Alexander Udalov
693a9c9453 Write new flags to proto messages for callables
This is needed to get rid of two unused bits: Flags.RESERVED_1 and
Flags.RESERVED_2. The old flags are still there temporarily because of the
bootstrap dependency on built-ins. Soon the old flags will be dropped and the
current flags will be transformed to the new format
2016-01-19 18:39:59 +03:00
Alexander Udalov
86bbc9f15b Read new Metadata annotation in check-library-abi-version.kts 2016-01-19 18:39:59 +03:00
Alexander Udalov
a4daa08e5c Write module name as proto extension instead of another annotation argument 2016-01-19 18:39:59 +03:00
Alexander Udalov
d4c4515944 Refactor BinaryVersion and subclasses, get rid of static factories 2016-01-19 18:39:59 +03:00
Alexander Udalov
e37bd4eba6 Do not write and read KotlinInterfaceDefaultImpls
This was only used in InlineTestUtil.kt and had no effect in the condition
2016-01-19 18:39:59 +03:00
Alexander Udalov
7906ac63b5 Read Metadata annotation, support option to ignore old annotations 2016-01-19 18:39:59 +03:00
Alexander Udalov
59dab0a558 Combine all metadata annotations into one kotlin/Metadata 2016-01-19 18:39:59 +03:00
Alexander Udalov
661af854fa Drop KotlinClassHeader#filePartClassNames, use 'data' instead 2016-01-19 18:39:59 +03:00
Alexander Udalov
b587d3a78d Use JvmMetadataVersion where appropriate instead of bytecode version 2016-01-19 18:39:59 +03:00
Alexander Udalov
bd47e9d47b Split JVM binary version into two: metadata and bytecode interface
Currently all code only uses the first one (JvmMetadataVersion), later the
bytecode interface version (JvmBytecodeBinaryVersion) will be used only in
codegen and reflection to avoid compiling against or calling methods with
unsupported conventions like default method naming and signature,
getters/setters naming etc.
2016-01-19 18:39:59 +03:00
Alexander Udalov
fc88a0186f Drop obsolete synthetic class kind in KotlinClassHeader 2016-01-19 18:39:59 +03:00
Alexander Udalov
9552accaec Introduce BinaryVersion.isCompatible()
To decrease the chance to mix up the receiver and the first argument when
checking version compatibility
2016-01-19 18:39:59 +03:00
Alexander Udalov
04d335db15 Move version constants to corresponding BinaryVersion subclasses 2016-01-19 18:39:59 +03:00
Alexander Udalov
2f64680b63 Add several subclasses of BinaryVersion
To simplify comparison of expected vs actual versions in the future
2016-01-19 18:39:59 +03:00
Yan Zhulanow
4cd2ff040d J2K: convert hex Java literal to hex Kotlin literal 2016-01-19 23:29:58 +09:00
Zalim Bashorov
bd9b2f9f06 Restore logging changes when process them using lookups and add assert to avoid getting parent from root FqName 2016-01-19 16:33:44 +03:00
Mikhail Glukhikh
9360bd49a6 Data flow info: correct disjunction of a type with Nothing: Type U Nothing = Type #KT-9578 Fixed 2016-01-19 16:01:10 +03:00
Mikhail Glukhikh
5d3186ac49 DelegatingDataFlowInfo: converted to Kotlin 2016-01-19 16:01:08 +03:00
Mikhail Glukhikh
4cc2450b37 DelegatingDataFlowInfo.java --> DelegatingDataFlowInfo.kt 2016-01-19 16:01:05 +03:00
Valentin Kipyatkov
a1d760fc36 KT-10631 Consider creating a synthetic property even when the setter returns 'this'
#KT-10631 Fixed
2016-01-19 15:57:20 +03:00
Dmitry Petrov
eef68e0a94 J2K: PatternMatchingTypingVisitor.kt: convert to Kotlin and cleanup 2016-01-19 15:02:45 +03:00
Dmitry Petrov
3e2d9a6a27 J2K: PatternMatchingTypingVisitor.java -> PatternMatchingTypingVisitor.kt 2016-01-19 14:24:09 +03:00
Pavel V. Talanov
ce42d47383 Resolve lambda argument types when failing to resolve call 2016-01-19 14:14:33 +03:00
Nikolay Krasko
adbf098166 Store information is file was compiled with Kotlin in attributes (KT-10312)
- Add boolean attribute for all binary files in the project
- Stop using JarUserDataManager for full file indexing
- Store full header of files compiled with Kotlin in file UserData
2016-01-19 13:33:51 +03:00
Nikolay Krasko
5431c6937f Allow to configure print accuracy and fetch temprory results from profiler 2016-01-19 13:33:51 +03:00
Nikolay Krasko
61bd0e7265 Refactoring: Remove unused class 2016-01-19 13:33:51 +03:00
Nikolay Krasko
803bd55f70 Minor: refactoring 2016-01-19 13:33:51 +03:00
Dmitry Jemerov
f85c4dd458 cleanup KotlinProjectViewProvider 2016-01-19 11:04:10 +01:00
Dmitry Jemerov
52acd34a61 fix Maven build 2016-01-19 10:54:04 +01:00
Dmitry Jemerov
b60621c428 tests fixed 2016-01-19 10:53:53 +01:00
Dmitry Jemerov
39c6e3712b add test to check that "Only the Kotlin standard library is allowed to use the 'kotlin' package" is reported in JPS builds 2016-01-19 10:53:49 +01:00
Dmitry Jemerov
39ad2b2378 return correct exit code when script execution fails 2016-01-19 10:53:48 +01:00
Dmitry Jemerov
f3faa10fcc forbid compiling code in packages with names starting with 'kotlin' unless the -Xallow-kotlin-package command line option is specified 2016-01-19 10:53:47 +01:00
Dmitry Jemerov
6b354748ba KotlinToJVMBytecodeCompiler: cleanup after J2K 2016-01-19 10:53:45 +01:00
Dmitry Jemerov
bccd64de19 KotlinToJVMBytecodeCompiler: J2K 2016-01-19 10:53:44 +01:00
Dmitry Jemerov
0d88595baf KotlinToJVMBytecodeCompiler: rename to .kt 2016-01-19 10:53:43 +01:00
Dmitry Jemerov
e4903c1a47 proguard: don't exclude native libraries when repackaging jna.jar (IDEA core code now accesses FileSystemUtil which uses JNA) 2016-01-19 10:51:21 +01:00
Mikhail Glukhikh
7f2624c9a1 Handling of annotations on delegated property in descriptor loader & stub builder 2016-01-19 11:38:58 +03:00
Mikhail Glukhikh
e4f7446bec JvmSynthetic forbidden for delegated properties (and searched for different use-site targets) 2016-01-19 11:38:53 +03:00
Mikhail Glukhikh
a2bba7c8f1 JvmField forbidden for delegated properties 2016-01-19 11:38:49 +03:00
Mikhail Glukhikh
ec909d0775 Volatile forbidden for delegated properties (and checked for other use-site targets) 2016-01-19 11:38:45 +03:00
Mikhail Glukhikh
b78d481bb1 delegate use-site targeted annotations: parser, front-end, codegen with some tests #KT-10502 Fixed 2016-01-19 11:38:41 +03:00
Mikhail Glukhikh
474076a550 Annotation use-site refactoring: field, property, getter 2016-01-19 11:38:36 +03:00
Denis Zharkov
e9693e987f Humanize type mismatch diagnostic caused by type projections
#KT-10581 Fixed
2016-01-19 11:05:41 +03:00
Dmitry Petrov
0c52960d7a KT-10706: do not report IMPLICIT_CAST_TO_ANY on expressions of type Nothing 2016-01-19 10:50:09 +03:00
Zalim Bashorov
5889ba4293 Minor: extract most of JPS (old IC) specific part from IncrementalCacheImpl 2016-01-18 22:13:29 +03:00
Dmitry Jemerov
f1b5e72b99 always add mavenCentral() as buildscript repository dependency (KT-10342)
#KT-10342 Fixed
2016-01-18 20:09:30 +01:00
Ilya Gorbunov
14f17e76e1 Deprecate dropWhileTo and takeWhileTo on CharSequences. 2016-01-18 21:46:33 +03:00
Ilya Gorbunov
5bbce7a1de Deprecate 'comparator { ... }' in favor of Comparator SAM-constructor. Provide SAM-like constructor for JS. 2016-01-18 21:46:32 +03:00
Ilya Gorbunov
67ef790abc Move comparison related functions to kotlin.comparisons, update imports in stdlib. 2016-01-18 21:46:31 +03:00
Ilya Gorbunov
c250921643 Deprecate getOrImplicitDefault to make it private later. 2016-01-18 21:46:30 +03:00
Ilya Gorbunov
aafd79078f Provide mutableSetOf and mutableMapOf
#KT-9663 Fixed
2016-01-18 21:46:29 +03:00
Ilya Gorbunov
fe8ba4d356 Provide mutableListOf.
Deprecate linkedListOf.
#KT-9663
2016-01-18 21:46:28 +03:00
Dmitry Jemerov
60ca1cbcf3 don't represent Kotlin project view nodes as light classes (KT-10703) 2016-01-18 19:07:51 +01:00
Dmitry Jemerov
8cca34a00e KotlinProjectViewProvider: J2K 2016-01-18 19:00:56 +01:00
Dmitry Jemerov
f4d4ab691b KotlinProjectViewProvider: rename to .kt 2016-01-18 18:58:52 +01:00
Stanislav Erokhin
206fecf872 Possible fix for KT-10603. 2016-01-18 19:45:34 +03:00
Valentin Kipyatkov
4c62304a1d KT-10337 Object marked as unused
#KT-10337 Fixed
2016-01-18 17:40:04 +03:00
Valentin Kipyatkov
4c2a14ff43 KT-9834 Optimizing imports with named import (kinda like static import)
#KT-9834 Fixed
2016-01-18 17:40:03 +03:00
Valentin Kipyatkov
bec16efbd7 Add/remove argument name intentions to work for super class constructor call 2016-01-18 17:40:03 +03:00
Valentin Kipyatkov
c44340a351 Corrections on code review 2016-01-18 15:34:20 +03:00
Valentin Kipyatkov
65f5dd1dd5 Got rid of special methods "applyTo" without editor parameter in intentions 2016-01-18 15:34:20 +03:00
Valentin Kipyatkov
552359ce03 KT-7443 Inspection + intention to replace assert (x != null) with "!!" or elvis
#KT-7443 Fixed
2016-01-18 15:34:20 +03:00
Mikhail Glukhikh
5ad4571ddf 'IMPLICIT_NOTHING_PROPERTY_TYPE' is now an error 2016-01-18 14:04:38 +03:00
Mikhail Glukhikh
380e2dd153 Diagnostic message fixed for 'PRIVATE_SETTER_FOR_OPEN_PROPERTY' 2016-01-18 14:04:34 +03:00
Mikhail Glukhikh
1c789f6862 minor 2016-01-18 14:04:25 +03:00
Dmitry Petrov
a073f29006 KT-10460: use unsubstituted descriptors
while comparing overloaded generic functions  for specificity.
2016-01-18 12:25:04 +03:00
Alexander Udalov
d21ce08548 Minor, remove pointless environment creation in LoadJava test 2016-01-17 22:55:55 +03:00
Alexander Udalov
f88abc5b1f Minor, cleanup InlineTestUtil.kt 2016-01-17 20:00:13 +03:00
Alexander Udalov
d50a531934 Slightly improve bytecode version check during inline
Add class name to the exception message and provide a system property to
disable the check
2016-01-17 16:28:22 +03:00
Alexander Udalov
cf7f2b762f Minor, refactor and simplify RuntimePackagePartProvider
Lazy was unnecessary because we effectively were immediately evaluating it
after creation anyway
2016-01-17 16:28:22 +03:00
Alexander Udalov
0f2befd327 Minor, fix typos in GenerateProtoBufCompare.kt 2016-01-17 16:28:22 +03:00
Alexander Udalov
f6b5c31e39 build.xml: build kotlin-test along with rest of runtime JARs 2016-01-17 16:28:22 +03:00
Alexander Udalov
8c3661c01c build.xml: add option to skip jarjar of reflect 2016-01-17 16:28:22 +03:00
Alexander Udalov
078a53e6a0 Minor, add regression test for KT-10444
#KT-10444 Obsolete
2016-01-17 16:28:22 +03:00
Alexander Udalov
4a31ad0d53 Make PropertyMetadata internal and deprecated with error
To make them inaccessible from Kotlin sources and drop them later. They're
still needed in runtime because Kotlin tests run old IDEA code (which depends
on PropertyMetadata) with our own runtime
2016-01-17 16:28:22 +03:00
Alexander Udalov
d1f2255d38 Extract JS-related LibraryUtils utilities to JsLibraryUtils 2016-01-17 16:28:22 +03:00
Alexander Udalov
f9085327e7 Minor, export kotlin-reflect in 'util'
To allow many modules which depend on 'util' not depend explicitly on
kotlin-reflect
2016-01-17 16:28:22 +03:00
Ilya Gorbunov
57dcbe0aea Cleanup in libraries and tools: use property access syntax. 2016-01-17 15:52:14 +03:00
Ilya Gorbunov
19a4f65fd1 Cleanup in libraries 2016-01-17 15:52:12 +03:00
Ilya Gorbunov
92c2d17910 Cleanup leftovers in compiler and IDE 2016-01-17 15:52:11 +03:00
Ilya Gorbunov
3d5e415c87 Annotate Iterable.forEach and Map.forEach with HidesMembers.
#KT-10538 Fixed
#KT-10479 Fixed
2016-01-16 15:33:12 +03:00
Stanislav Erokhin
133155f4cc Minor. Temporary import forEach as forEachStdLib to avoid problem with introducing HidesMembers annotation 2016-01-16 11:30:38 +03:00
Ilya Gorbunov
56ddd496c5 Hide listFiles as it's no more preferred by overload resolution over synthetic SAM invocations.
#KT-10652 Fixed
2016-01-15 23:53:44 +03:00
Stanislav Erokhin
b185316a6e Create new HidesMembers annotation 2016-01-15 23:32:34 +03:00
Dmitry Jemerov
0c995d0ae1 Merge pull request #808 from mcgee/KT-10196
KT-10196: Suggest to replace 'substring' calls by take/drop/dropLast calls when possible
2016-01-15 19:52:35 +01:00
Dmitry Jemerov
63dd0fc4ae streamlined plugin update logic 2016-01-15 19:18:26 +01:00
Dmitry Jemerov
765d58b8eb plugin autoupdate fixed: always provide plugin descriptor with new version number to plugin downloader 2016-01-15 19:18:26 +01:00
Michael Bogdanov
9cbde911ce Revert of 'Minor. workaround for KT-10679 Wrong outer after inline.' 2016-01-15 18:24:34 +03:00
Michael Bogdanov
7eec1d8e1d Skip inline lambdas in 'InlineCallSite' parameter calculation; Fix for KT-10679: Wrong outer after inline
#KT-10679 Fixed
2016-01-15 18:24:33 +03:00
Pavel V. Talanov
abf4a5cf43 Show kotlin builtIn classes in "go to symbol"
#KT-10474 Fixed
2016-01-15 18:04:59 +03:00
Pavel V. Talanov
af1e83422e Move KotlinGotoClassContributor and KotlinGotoSymbolContributor to a single Kotlin file (j2k on the fly)
Move the file to "goto" package
2016-01-15 18:04:58 +03:00
Pavel V. Talanov
db07d783a2 Member is considered deprecated if it overrides only deprecated members
Property accessor is considered deprecated when the property is
Provide IDE inspection to strikeout members overriding deprecated members (like in java)
2016-01-15 17:53:23 +03:00
Michael Bogdanov
9b3d97470f Prohibit super calls with default parameters 2016-01-15 17:50:48 +03:00
Mikhail Glukhikh
c48c3fc8ed Cleanup: DataFlowAnalyzer, ignore MethodMayBeStatic for SmartCastManager 2016-01-15 17:22:57 +03:00
Mikhail Glukhikh
6157ebe3b8 Separate UNSAFE_IMPLICIT_INVOKE_CALL diagnostics introduced (see KT-8252) 2016-01-15 17:22:54 +03:00
Mikhail Glukhikh
fe11b5a473 Minor 2016-01-15 17:22:50 +03:00
Mikhail Glukhikh
1049d4c53a Nullable function-like property call is prohibited now #KT-8252 Fixed 2016-01-15 17:22:46 +03:00
Mikhail Glukhikh
0f80df7b2e initialDataFlowInfoForArguments introduced in CallExpressionResolver methods #KT-10175 Fixed 2016-01-15 17:22:42 +03:00
Mikhail Glukhikh
16d97ab72c Get rid of MutableDataFlorInfoForArguments.setInitialDataFlowInfo 2016-01-15 17:22:38 +03:00
Mikhail Glukhikh
5ceb973ee9 Minor refactoring of getQualifiedExpressionTypeInfo 2016-01-15 17:22:35 +03:00
Alexander Udalov
bb68aacee4 Minor refactoring in TowerResolver 2016-01-15 17:15:00 +03:00
NataliaUkhorskaya
b73ce68dbd Debugger: quote package fqName properly. Fix muted tests 2016-01-15 15:57:35 +03:00
NataliaUkhorskaya
d4fcb59965 Gradle plugin: fix compatibility with android-gradle plugin 2.0.0-alpha5
#KT-10676 Fixed
2016-01-15 15:56:47 +03:00
Stanislav Erokhin
8f441a020e Minor. workaround for KT-10679 Wrong outer after inline. 2016-01-15 14:44:24 +03:00
Stanislav Erokhin
3a9ecf0bce Change resolution priority about implicit receivers and synthesized member-like descriptors.
Change resolution to consider extensions to implicit receiver before members of another implicit receiver.
Make synthesized member-like extensions resolve right after the members.

#KT-10510 Fixed
#KT-10219 Fixed
2016-01-15 13:11:38 +03:00
Stanislav Erokhin
dee040a5b5 Minor. Extract tower data creation to separate function. 2016-01-15 13:11:37 +03:00
Stanislav Erokhin
dbd6982b3a Move levels to TowerResolver 2016-01-15 13:11:36 +03:00
Denis Zharkov
a2f8ad1396 Minor. Extract constant FQ names 2016-01-15 09:46:30 +03:00
Denis Zharkov
be2f857670 Introduce inline-only functions
They have private visibility in bytecode
2016-01-15 09:46:30 +03:00
Anton Sukhonosenko
b2e98e9353 Suggest to replace 'substring' calls by take/drop/dropLast calls when possible
Code review fixes
#KT-10196 Fixed
2016-01-14 22:40:50 +03:00
Valentin Kipyatkov
15930a42b8 Fixed containingDeclaration for descriptors inside init-blocks for the case of no primary constructor
KT-10226 Wrong Imports optimization ("Unresolved reference" is being added)

 #KT-10226 Fixed
2016-01-14 21:53:41 +03:00
Denis Zharkov
f4613b8db1 Support foreign nullability annotations
#KT-10418 Fixed
 #KT-10594 Fixed
2016-01-14 19:24:10 +03:00
Denis Zharkov
fd8a718797 Get rid of duplicating annotations FQ names usages
E.g. JETBRAINS_NOT_NULL_ANNOTATION were used both in NULLABLE_ANNOTATIONS
and for ANNOTATIONS_COPIED_TO_TYPES
2016-01-14 19:24:10 +03:00
Denis Zharkov
01fd3905be Minor. Fix typo in package name: typeEnhacement -> typeEnhancement 2016-01-14 19:24:10 +03:00
Valentin Kipyatkov
7c6a33a36c KT-10664 No code completion after variable initialized with elvis
#KT-10664 Fixed
2016-01-14 19:23:01 +03:00
Valentin Kipyatkov
b41f2dcda3 KT-10655 No "in" in code completion popup after "!"
#KT-10655 Fixed
2016-01-14 19:23:01 +03:00
Valentin Kipyatkov
2f1108421e Added container information when needed 2016-01-14 19:23:01 +03:00
Denis Zharkov
23d2b87a52 Ignore redundant projections for declaration-site variance 2016-01-14 19:20:00 +03:00
Pavel V. Talanov
06d0a7c17c Avoid throwing on trying to obtain module info by some unexpected light element 2016-01-14 18:35:05 +03:00
Ilya Gorbunov
7ddac1945e Unify functional parameter name for 'let', 'run', 'with', 'apply' scope function with 'use' and 'synchronize'. 2016-01-14 18:31:57 +03:00
Ilya Gorbunov
4eb3cff129 Unify functional parameter name for 'forEachLine', 'forEachBlock', 'repeat' methods with 'forEach' 2016-01-14 18:31:56 +03:00
Ilya Gorbunov
c9ddea6d03 Breaking: File.(buffered)reader/writer now returns less specific InputStreamReader/OutputStreamReader and use UTF-8 encoding by default, allowing to specify different encoding with optional parameter.
File.printWriter supports specifying Charset and uses UTF-8 by default.
#KT-10454 Fixed
2016-01-14 18:31:55 +03:00
Ilya Gorbunov
a64c1ff0f4 Rename defaultBufferSize to DEFAULT_BUFFER_SIZE. 2016-01-14 18:31:43 +03:00
Ilya Gorbunov
d64882e19b File.useLines and Reader.readLines. 2016-01-14 18:30:45 +03:00
Ilya Gorbunov
ddcafdd9b3 J2K: Avoid to convert to deprecated String methods, namely toByteArray. 2016-01-14 18:30:44 +03:00
Ilya Gorbunov
ac15807ba4 Deprecate functions taking charset name as string. 2016-01-14 18:30:42 +03:00
Ilya Gorbunov
68971e2162 Remove redundant JvmName annotations for Array.copyOf, copyOfRange 2016-01-14 18:30:41 +03:00
Ilya Gorbunov
b99e1111f6 Do not use out projection for Array where appropriate. 2016-01-14 18:30:40 +03:00
Ilya Gorbunov
eb5b5331fb Minor: reorder invariant arrays of objects in generated code 2016-01-14 18:30:39 +03:00
Ilya Gorbunov
362e463b26 Preserve type projection for Array.requireNoNulls.
#KT-10039 Fixed
2016-01-14 18:30:37 +03:00
Ilya Gorbunov
90a33fb19c Make return type more specific for File.inputStream and File.outputStream, for String.byteInputStream 2016-01-14 18:30:20 +03:00
Ilya Gorbunov
ea3a2eefe7 File.deleteRecursively returns true even if path specified by File does not exist.
False is returned only in case of incomplete deletion.
Distinguish situations when file was not deleted because it's vanished after listing and because of some other error.
2016-01-14 18:14:12 +03:00
Ilya Gorbunov
5e6489f1a2 Minor: refactor file utils test not to use 'assert' to make test assertions. Use assertTrue, assertFalse, assertEquals, assertFailsWith instead. 2016-01-14 18:14:11 +03:00
Ilya Gorbunov
3ee9c2b9d8 Introduce exitProcess(status) returning Nothing.
#KT-10441 Fixed
2016-01-14 18:14:10 +03:00
Valentin Kipyatkov
5a079defc7 "Rename on import" hides importing of the same symbol by other imports with the original name 2016-01-14 17:05:28 +03:00
Valentin Kipyatkov
47041885ca Do not use incorrect import 2016-01-14 17:05:13 +03:00
Valentin Kipyatkov
866f3f189f Minor 2016-01-14 17:05:13 +03:00
Valentin Kipyatkov
89843685c2 Renamed class 2016-01-14 17:05:13 +03:00
Dmitry Jemerov
af66af07a0 adapt move refactoring to new behavior of KtFile.getClasses() 2016-01-14 14:20:41 +01:00
Dmitry Jemerov
1bc4420734 implement KtFile.getClasses() in plugin (required to have coverage work, among other things) 2016-01-14 14:20:35 +01:00
Michael Bogdanov
607f32615f Type uncapturing 2016-01-14 15:32:50 +03:00
Michael Bogdanov
2228cb6a9a Rollback parameter descriptor propagation to CapturedTypeConstructor 2016-01-14 15:32:50 +03:00
Alexey Sedunov
6e5a2208c0 Misc: Partially revert cleanup (44138f499e) as accessing synthetic properties leads to IllegalAccessError
#KT-10653 Fixed
2016-01-14 13:55:11 +03:00
Alexey Sedunov
1d9bafe196 PSI Unifier: Fix matching of this-expressions
#KT-8293 Fixed
2016-01-14 13:55:10 +03:00
Alexey Sedunov
ed8674c0f9 Safe Delete: Skip usages inside of overriding to-be-deleted declarations
#KT-7253 Fixed
2016-01-14 13:55:09 +03:00
Alexey Sedunov
59bacd932a Minor: Add test for KT-8295 2016-01-14 13:55:08 +03:00
Alexey Sedunov
e7de6400e5 Create from Usage: Make 'Create annotation' low-priority action
#KT-9116 Fixed
2016-01-14 13:55:07 +03:00
Alexey Sedunov
70a851fe44 Move/Change Package Directive Intention: Skip callee references to inner class constructors
#KT-10554 Fixed
2016-01-14 13:55:05 +03:00
Alexey Sedunov
73233b2e90 Change Variable Mutability Quick-Fix: Forbid on non-primary-constructor parameters
#KT-10601 Fixed
2016-01-14 13:55:03 +03:00
Alexey Sedunov
5a108c5cde Generate equals/hashCode Action: Use Arrays.equals/Arrays.hashCode for properties of array types
#KT-10514 Fixed
2016-01-14 13:55:02 +03:00
Natalia Ukhorskaya
7b67eed3dd Qoute package name if needed
#KT-10649 Fixed
2016-01-14 13:42:19 +03:00
Natalia Ukhorskaya
128440b16f Use intention to simplify for in j2k
#KT-7157 Fixed
2016-01-14 13:41:54 +03:00
Natalia Ukhorskaya
ea3ba6f534 Intention to simplify for using destructing declaration 2016-01-14 13:41:45 +03:00
Natalia Ukhorskaya
5667a92472 Debugger: add breakpoint variant for line with lambda in init block
#KT-KT-1061 Fixed
2016-01-14 13:39:01 +03:00
Natalia Ukhorskaya
2b1d60397d Object to lambda intention is inapplicable when reference to this is used
#KT-10202 In Progress
2016-01-14 13:39:00 +03:00
Natalia Ukhorskaya
41e7c3d70b Debugger: generate package parts only for debug file
#KT-10126 Fixed
2016-01-14 13:38:59 +03:00
Mikhail Zarechenskiy
29af6586f2 Get rid of ContainerUtil usages in ide-common 2016-01-14 12:06:52 +03:00
Mikhail Zarechenskiy
dd11fa9320 Move logic related to expression occurrence searching to ide-common 2016-01-14 12:06:50 +03:00
Mikhail Zarechenskiy
bd57096b66 Move AnalyzerUtil to ide-common 2016-01-14 12:06:49 +03:00
Mikhail Zarechenskiy
bde556fc10 Move QuickFixUtil to ide-common 2016-01-14 12:06:47 +03:00
Mikhail Zarechenskiy
85b4f5d593 Move part of resolutionApi to ide-common 2016-01-14 12:06:45 +03:00
Mikhail Zarechenskiy
1523586717 Extract interface out from KotlinCacheService to provide separate implementation in Eclipse plugin 2016-01-14 12:06:44 +03:00
Dmitry Petrov
609ffc10a9 KT-10322, KT-10646, KT-10647:
- update diagnostic to (supposedly) more useful
- also report IMPLICIT_CAST_TO_ANY if expected type is DONT_CARE
 (effectively "no expected type" for lambda expression).
2016-01-14 10:08:20 +03:00
Dmitry Petrov
f54de08073 KT-10646, KT-10647:
Move IMPLICIT_CAST_TO_UNIT_OR_ANY to ControlFlowInformationProvider
(where checks for 'if' and 'when' used as expressions are performed).
2016-01-14 10:08:20 +03:00
Ilya Gorbunov
f91c01919b kotlin.test: 'fail' returns Nothing, 'assertFails' returns Throwable (not nullable).
Js tests now fail at the first failed assertion.
#KT-10289 Fixed
#KT-10369 Fixed
2016-01-14 06:03:40 +03:00
Dmitry Jemerov
8fdd8179b9 Workaround for KtEnumEntrySuperclassReferenceExpression which implements KtSimpleNameExpression in a weird way and can break Move refactoring (EA-75268 - assert: TextRange.<init>) 2016-01-13 20:28:39 +01:00
Zalim Bashorov
c1dbfee2a9 Don't fail when create IncrementalCacheImpl for target without output directory, and fail when try to use this info instead.
#KT-10505 Fixed
2016-01-13 21:37:36 +03:00
Zalim Bashorov
d9af9472f0 Don't fail when output directory not specified for "friend" build target
#KT-10505 Fixed
2016-01-13 21:09:06 +03:00
Zalim Bashorov
3df091e7cf Report error when output directory not specified for build target
#KT-10505 Fixed
2016-01-13 21:09:05 +03:00
Mikhail Glukhikh
6b09c5dfae Minor when missing cases renderer refactoring 2016-01-13 19:54:54 +03:00
Denis Zharkov
b8c79e689b Make all nested inlined closure classes public
#KT-6987 Fixed
2016-01-13 19:41:59 +03:00
Anton Sukhonosenko
ba0efda2f0 Suggest to replace 'substring' calls by take/drop/dropLast calls when possible
#KT-10196 Fixed
2016-01-13 19:05:50 +03:00
Alexey Tsvetkov
328169cd2e Minor: fix test data as exhaustive when error message was changed 2016-01-13 18:47:05 +03:00
Mikhail Glukhikh
e54471abbc Formatting rule: new line before when entry 2016-01-13 18:04:24 +03:00
Mikhail Glukhikh
b7790177e0 KotlinParserDefinition.kt: converted to Kotlin 2016-01-13 18:04:15 +03:00
Mikhail Glukhikh
6ae7309c54 KotlinParserDefinition.java --> KotlinParserDefinition.kt 2016-01-13 17:54:53 +03:00
Alexey Sedunov
2e18ad7160 Remove Right Part of Binary Expression Quick-Fix: Split to separate quick fixes for cast- and elvis-expressions 2016-01-13 17:47:23 +03:00
Alexey Sedunov
6be44f59da Remove Function Body Quick-Fix: Convert to Kotlin & refactor. Add tests with comments 2016-01-13 17:47:22 +03:00
Alexey Sedunov
de8a3c17a2 Remove Function Body Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:47:21 +03:00
Alexey Sedunov
ed679fef9d Remove Element Quick-Fixes: Convert to Kotlin & refactor 2016-01-13 17:47:20 +03:00
Alexey Sedunov
28a0e8ebe6 Remove Element Quick-Fixes: Convert to Kotlin (rename to .kt) 2016-01-13 17:47:19 +03:00
Alexey Sedunov
9a8aef6b6d Remove Right Part of Binary Expression Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:47:18 +03:00
Alexey Sedunov
0a4a486048 Remove Right Part of Binary Expression Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:47:17 +03:00
Alexey Sedunov
cac479102a Remove Supertype Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:47:16 +03:00
Alexey Sedunov
2fcce20c73 Remove Supertype Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:47:15 +03:00
Alexey Sedunov
0fea86c10a Remove 'val'/'var' from Parameter Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:47:14 +03:00
Alexey Sedunov
f2a6805f8b Remove 'val'/'var' from Parameter Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:47:13 +03:00
Alexey Sedunov
474ab531ea Rename Parameter to Match Overridden Method Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:47:12 +03:00
Alexey Sedunov
c3b3ad52a9 Rename Parameter to Match Overridden Method Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:47:11 +03:00
Alexey Sedunov
012a36d97c Remove Nullable Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:47:10 +03:00
Alexey Sedunov
f1c38f5f16 Remove Nullable Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:47:09 +03:00
Alexey Sedunov
111a670d66 Move 'else' Branch in 'when' Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:47:08 +03:00
Alexey Sedunov
212504bbd4 Move 'else' Branch in 'when' Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:47:07 +03:00
Alexey Sedunov
b8a8f1638f Change Visibility Modifier Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:47:06 +03:00
Alexey Sedunov
1e77caedbc Change Visibility Modifier Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:47:05 +03:00
Alexey Sedunov
c44d0ed619 Add 'override' to equals/hashCode/toString Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:47:04 +03:00
Alexey Sedunov
96e6319ee1 Add 'override' to equals/hashCode/toString Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:47:03 +03:00
Alexey Sedunov
64eeaf8b9d Make Class an Annotation Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:47:02 +03:00
Alexey Sedunov
04b8f16576 Make Class an Annotation Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:47:01 +03:00
Alexey Sedunov
6c44aa4d76 Change to Function Invocation Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:47:00 +03:00
Alexey Sedunov
584d3ad374 Change to Function Invocation Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:46:59 +03:00
Alexey Sedunov
a7a5619523 Change to Star-Projection Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:46:58 +03:00
Alexey Sedunov
625967fc15 Change to Star-Projection Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:46:57 +03:00
Alexey Sedunov
3153196343 Change Type Quick-Fix: Convert to Kotlin & refactor. Wrap in delegating quick fix to decrease memory footprint 2016-01-13 17:46:56 +03:00
Alexey Sedunov
11ef780adf Change Type Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:46:55 +03:00
Alexey Sedunov
05506a24d7 Add Star Projections Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:46:54 +03:00
Alexey Sedunov
2e25d2d885 Add Star Projections Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:46:53 +03:00
Alexey Sedunov
a696efc3ef Change Accessor Type Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:46:52 +03:00
Alexey Sedunov
54b149ce71 Change Accessor Type Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:46:51 +03:00
Alexey Sedunov
4e54cee693 Cast Expression Quick-Fix: Convert to Kotlin & refactor. Wrap in delegating quick fix to decrease memory footprint 2016-01-13 17:46:49 +03:00
Alexey Sedunov
63ab9df275 Cast Expression Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:46:48 +03:00
Alexey Sedunov
7cb5bc8902 Add Else Branch to When Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:46:47 +03:00
Alexey Sedunov
c0ca4e6b79 Add Else Branch to When Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:46:46 +03:00
Alexey Sedunov
f8be2f23a1 Add Function Body Quick-Fix: Convert to Kotlin & refactor 2016-01-13 17:46:45 +03:00
Alexey Sedunov
50497e8013 Add Function Body Quick-Fix: Convert to Kotlin (rename to .kt) 2016-01-13 17:46:43 +03:00
Alexey Sedunov
8264cef004 Quick Fixes: Pass original element to KotlinIntentionActionFactoryWithDelegate.createFix() 2016-01-13 17:46:42 +03:00
Michael Bogdanov
66ab1c484c StackOverflow fix on type remapping 2016-01-13 16:57:36 +03:00
Alexey Tsvetkov
94cea25e2e Recompile all sealed class usages when new derived class is added 2016-01-13 15:46:54 +03:00
Alexey Tsvetkov
0cf2928761 Recompile all enum usages when new entry is added 2016-01-13 15:46:54 +03:00
Alexey Tsvetkov
e7f8d7103f Recompile all class and member usages when flag and member are changed 2016-01-13 15:46:53 +03:00
Alexander Udalov
b0627b4ce6 Minor, add system property to suppress color output in CLI 2016-01-13 14:24:42 +03:00
Mikhail Glukhikh
c3cce53aa2 Quick fix "add when remaining branches" refactoring + enum / sealed generated name w/o package name 2016-01-13 12:32:14 +03:00
Valentin Kipyatkov
0a3631db6a Fixed KT-10602 Incorrect completion for class name
#KT-10602 Fixed
2016-01-12 22:09:12 +03:00
Nikolay Krasko
12b9002c0e Remove assert that isn't valid in UpSource (UP-5742) 2016-01-12 21:40:11 +03:00
Dmitry Jemerov
7390e0ac66 editor is nullable in SelfTargetingIntention.applyTo() 2016-01-12 19:23:51 +01:00
Pavel V. Talanov
9bfa90dc0e Analyze local variable declarations in expression position
Fixes exception on invalid code "val c = 1 < val Int.f: Int = 3"
2016-01-12 19:31:16 +03:00
Pavel V. Talanov
060864f7af Minor: prettify code after autoconversion 2016-01-12 16:47:38 +03:00
Pavel V. Talanov
94ce1d1193 Refactor: extract type checking code for local variables to a separate component, extract code that creates descriptors for local variable out of DescriptorResolver 2016-01-12 16:47:31 +03:00
Pavel V. Talanov
9fea22885e AnnotationUtil: Do not throw on ErrorValue constant 2016-01-12 16:08:59 +03:00
Michael Bogdanov
657b9ff808 Write enclosing method info for transformed objects 2016-01-12 15:51:57 +03:00
Michael Bogdanov
8ab1190082 Don't try remap type parameter of inline lambda parent context 2016-01-12 15:51:57 +03:00
Michael Bogdanov
fee6d4f282 Type parameters mapping
#KT-10429 Fixed
2016-01-12 15:51:56 +03:00
Michael Bogdanov
5cdf170511 TypeRemapper.java -> TypeRemapper.kt 2016-01-12 15:51:56 +03:00
Michael Bogdanov
cb41f1cc2a Signature remapping moved to RemappingSignatureAdapter inside TypeRemapper 2016-01-12 15:51:55 +03:00
Michael Bogdanov
dd336a5581 ReifiedTypeParameterMappings renamed to TypeParameterMappings, add isReified property 2016-01-12 15:51:55 +03:00
Michael Bogdanov
833cdb0706 TypeParameterDescriptor propagation to CapturedTypeConstructor 2016-01-12 15:51:54 +03:00
Mikhail Glukhikh
0bcae4e0c0 Build fix: nullable exhaustiveness checker is now only a part of other exhaustiveness checkers 2016-01-12 15:44:55 +03:00
Alexey Tsvetkov
d928ac744e Make withSubtypesOf more efficent 2016-01-12 15:32:48 +03:00
Alexey Tsvetkov
756c78bfcc Append in a more safe way 2016-01-12 15:32:47 +03:00
Alexey Tsvetkov
f137910e63 Make doProcessChangesUsingLookups extension again 2016-01-12 15:32:47 +03:00
Alexey Tsvetkov
f20b39d02e Use one loop for changes processing 2016-01-12 15:32:47 +03:00
Alexey Tsvetkov
d36810ab42 Minor: rename getSubtypeOf->withSubtypes 2016-01-12 15:32:47 +03:00
Alexey Tsvetkov
9190029fcc Add tests for class hierarchy incremental recompilation 2016-01-12 15:32:47 +03:00
Alexey Tsvetkov
e2794cfa3f Do not write inline calls to cache when experimental incremental compilation is enabled 2016-01-12 15:32:47 +03:00
Alexey Tsvetkov
2286268929 Append to class map should use IOUtil.writeUTF 2016-01-12 15:32:47 +03:00
Alexey Tsvetkov
a9fb5647b8 Get caches for targets transitively for exported dependencies 2016-01-12 15:32:46 +03:00
Alexey Tsvetkov
dfc08b8f38 Process changed signatures of classes 2016-01-12 15:32:46 +03:00
Alexey Tsvetkov
ab13b2ddfc Minor: move processChanges 2016-01-12 15:32:46 +03:00
Mikhail Glukhikh
8b6156abd6 Quick fix "Add remaining when branches" with some tests 2016-01-12 14:33:20 +03:00
Mikhail Glukhikh
44b07d8dfa Refactoring: context instead of trace in WhenChecker and around 2016-01-12 14:19:29 +03:00
Mikhail Glukhikh
936fee0afa KT-10295: long enum (sealed) special case 2016-01-12 14:18:36 +03:00
Mikhail Glukhikh
c085eb650f Better diagnostics for non-exhaustive whens, relevant test #KT-10295 Fixed 2016-01-12 14:18:23 +03:00
Mikhail Glukhikh
61c2a88a32 Separate when exhaustiveness checkers with list of missing cases as result 2016-01-12 14:07:08 +03:00
Mikhail Glukhikh
a99b2a6799 J2K: WhenChecker converted to Kotlin 2016-01-12 11:17:09 +03:00
Mikhail Glukhikh
e59fed7d9b J2K: WhenChecker 2016-01-12 11:17:06 +03:00
Dmitry Jemerov
682a61ad26 use PARTIAL_FOR_COMPLETION resolve mode when checking whether reference will resolve to the property, otherwise we're going to miss local variables which shadow the property 2016-01-11 19:05:37 +01:00
Dmitry Jemerov
76c9bbc06d handle setter calls used as expression bodies in "Use property access syntax" intention
#KT-10587 Fixed
2016-01-11 18:53:07 +01:00
Dmitry Jemerov
36488d21da remove empty modifier list after removing visibility modifier 2016-01-11 18:46:04 +01:00
Dmitry Jemerov
d0a4e542af use StubIndex.getElements() with required class specified to diagnose CCE problems when using stub index 2016-01-11 16:29:41 +01:00
Pavel V. Talanov
8d22eafe3f Minor: prettify code 2016-01-11 16:33:20 +03:00
Pavel V. Talanov
41a8ded182 getting rid of ClsFileImpl.setPhysical
patch by Roman Shevchenko
2016-01-11 16:29:19 +03:00
Michael Bogdanov
0274ce4619 Always generate ACC_SUPER flag for all classes; Fix for KT-10260: java.lang.VerifyError in Android 4.x when Instant Run is used
#KT-10260 Fixed
2016-01-11 09:55:56 +03:00
Dmitry Jemerov
b11acdfbea regenerate builtins (don't remove 'public' modifiers until we agree that we don't want them in stdlib) 2016-01-08 16:01:34 +01:00
Dmitry Jemerov
f885459a43 fix compilation after cleanup 2016-01-08 16:01:28 +01:00
Dmitry Jemerov
5d3ba1ad6c remove "public" from generated code template 2016-01-08 16:01:26 +01:00
Dmitry Jemerov
d5903c5374 workaround for KT-10590: ensure that the inherited getProject() method is public, not protected 2016-01-08 16:01:20 +01:00
Dmitry Jemerov
44138f499e plugins: cleanup 'public', property access syntax 2016-01-07 18:15:44 +01:00
Dmitry Jemerov
d6a11b839b js: cleanup 'public', property access syntax 2016-01-07 18:15:19 +01:00
Dmitry Jemerov
33ef7ad024 jps-plugin: cleanup 'public', property access syntax 2016-01-07 18:14:31 +01:00
Dmitry Jemerov
6684dff14b j2k: cleanup 'public', property access syntax 2016-01-07 18:13:10 +01:00
Dmitry Jemerov
43a6e13f4b idea: cleanup 'public', property access syntax 2016-01-07 18:12:36 +01:00
Dmitry Jemerov
4afbf02bdd generators: cleanup 'public', property access syntax 2016-01-07 18:07:13 +01:00
Dmitry Jemerov
951a313331 eval4j: cleanup 'public', property access syntax 2016-01-07 18:03:29 +01:00
Dmitry Jemerov
3870bd04b8 core: cleanup 'public', property access syntax 2016-01-07 18:03:09 +01:00
Dmitry Jemerov
117a0d8b7b compiler: cleanup 'public', property access syntax 2016-01-07 17:57:38 +01:00
Dmitry Jemerov
b72ea1ff07 ant: cleanup 'public', property access syntax 2016-01-07 17:53:32 +01:00
Dmitry Jemerov
e47e9f6763 inspection and code cleanup for redundant visibility modifiers 2016-01-05 13:31:43 +01:00
Dmitry Petrov
b736880787 KT-6646, KT-10482:
when a method (or a property getter) returns Nothing, emit
  ACONST_NULL
  ATHROW
after a call so that class files verifier knows that this is an exit point in a method.
Note that if an inline method returning Nothing throws an exception explicitly
(or via a chain of inline methods), this code will be deleted by DCE.
2015-12-31 11:07:56 +03:00
Nikolay Krasko
ffd1bcf72f Update icons (KT-10516)
#KT-10516 Fixed
2015-12-30 17:26:34 +03:00
Nikolay Krasko
f9a6da05df Add explicit type (local builds othen fail here) 2015-12-30 17:26:06 +03:00
Nikolay Krasko
0518c6f618 Set "No" as default button 2015-12-30 17:19:16 +03:00
Natalia Ukhorskaya
ad9303b97b Support breakpoints in anonymous objects with usages of cross inline argument 2015-12-30 14:49:30 +03:00
Natalia Ukhorskaya
754b02aa3c Fix EA-76946 - IOOBE: LineSet.checkLineIndex: do not try to get line start offset for line out off document 2015-12-30 14:49:29 +03:00
Natalia Ukhorskaya
0a6dbc91ae Fix EA-75128 - KNPE: IdentifierKt.declarationIdentifier 2015-12-30 14:49:29 +03:00
Natalia Ukhorskaya
5c83e2ac5b KotlinSyntheticTypeComponentProvider: catch UnsupportedOperationException
#KT-10526 Fixed
2015-12-30 14:49:28 +03:00
Natalia Ukhorskaya
36d154babf Support breakpoints for inline function with cross inline argument 2015-12-30 14:49:27 +03:00
Natalia Ukhorskaya
c351293394 KotlinPositionManager: drop PositionElement, classNameForPosition now returns collection of names 2015-12-30 14:49:26 +03:00
Natalia Ukhorskaya
e8aef7d29e Minor: move methods from companion object 2015-12-30 14:49:26 +03:00
Natalia Ukhorskaya
3678bda409 InlineUtil: extract method 2015-12-30 14:49:25 +03:00
Michael Bogdanov
1d70b58d17 Fixed test data 2015-12-30 14:42:12 +03:00
Michael Bogdanov
11268331a8 Added '@' for annotation names in diagnostic messages 2015-12-30 12:25:13 +03:00
Dmitry Petrov
74c13906ed Drop "substitute with upper bounds" mode for calls with mapped arguments
(we don't need it since we build constraint system for generic types).
Cleanup tests.
2015-12-30 10:44:01 +03:00
Dmitry Petrov
4b3290dd8c Check specificity relation for generant types of the constraint system.
Otherwise we can't properly chose between 'dynamic' and generic type.
2015-12-30 10:44:00 +03:00
Dmitry Petrov
c97294a066 stdlib fixes:
- 'sequence(initialValue: T?, ...)' should have LowPriorityInOverloadResolution
(otherwise 'sequence({...}, {...})' is ambiguous).
- 'copyOf' and 'copyOfRange' should be defined for 'Array<T>' only
('Array<out T>' version always loses to 'Array<T>', since the second one
is always more specific).
2015-12-30 10:44:00 +03:00
Dmitry Petrov
02daeac41b Use constraint system for comparing for specificity against a generic signature.
Drop "discrimiate generics" mode where it's unneeded.
2015-12-30 10:44:00 +03:00
Alexey Sedunov
aeefdffaab Implement Abstract Member Intention: Support primary constructor parameters
#KT-8427 Fixed
2015-12-30 00:56:34 +03:00
Alexey Sedunov
2b4f03feef Implement Members Quick-Fix: Support primary constructor parameters
#KT-8427 In Progress
2015-12-30 00:56:34 +03:00
Alexey Sedunov
00cc9d4150 Specify Type Explicitly: Filter out types which can't be resolved in the target scope
#KT-10066 Fixed
2015-12-30 00:56:34 +03:00
Alexey Sedunov
21fd894d75 Create From Usage: Place caret at the end of initializer selection
#KT-10120 Fixed
2015-12-30 00:56:34 +03:00
Alexey Sedunov
c391882651 Minor: Fix NPE (EA-76742) 2015-12-30 00:56:34 +03:00
Alexey Sedunov
5b5e7fb9b7 'Change parameter type' Quick-Fix: Use Change Signature API
#KT-9812 Fixed
2015-12-30 00:56:34 +03:00
Alexey Sedunov
9180a99342 Convert to Kotlin: ChangeParameterTypeFix.java 2015-12-30 00:56:34 +03:00
Alexey Sedunov
3af7c7b57a Convert to Kotlin: ChangeParameterTypeFix.java (rename to .kt) 2015-12-30 00:56:34 +03:00
Pavel V. Talanov
004c266433 Minor: fix missed error marker in test data 2015-12-29 18:13:10 +03:00
Ilya Gorbunov
0aef321c73 Cleanup in idea plugin, src and tests 2015-12-29 18:04:24 +03:00
Ilya Gorbunov
145722b20d Cleanup in idea plugin modules, misc 2015-12-29 18:04:23 +03:00
Ilya Gorbunov
865fdd7962 Cleanup in idea plugin modules, idea-core 2015-12-29 18:04:22 +03:00
Ilya Gorbunov
6ffc407158 Cleanup in idea plugin modules, idea-completion 2015-12-29 18:04:21 +03:00
Ilya Gorbunov
be590312f7 Cleanup in idea plugin modules, idea-analysis 2015-12-29 18:04:20 +03:00
Ilya Gorbunov
bce9514739 Cleanup in idea plugin modules, ide-common 2015-12-29 18:04:19 +03:00
Ilya Gorbunov
fcfb063eca Cleanup in modules: j2k, jps, ant and generators. 2015-12-29 18:04:18 +03:00
Ilya Gorbunov
da4b1ae0fb Cleanup in js modules 2015-12-29 18:04:16 +03:00
Ilya Gorbunov
80916d5ed7 Cleanup in compiler modules 2015-12-29 18:04:15 +03:00
Ilya Gorbunov
911adfd04d Cleanup in core modules 2015-12-29 18:04:14 +03:00
Ilya Gorbunov
b71b336a69 Fix fq names of moved facade classes in imports and other code occurrences 2015-12-29 18:04:13 +03:00
Nikolay Krasko
f9944e28b0 Show full library panel. Add warning on attempt to create project without library. 2015-12-29 18:01:15 +03:00
Michael Bogdanov
d54c3f4fc7 Added '@' to annotation names in diagnostic messages 2015-12-29 17:20:16 +03:00
Michael Bogdanov
91f27ba176 Report error on 'JvmStatic' annotation on const or @JvmField property
#KT-10415 Fixed
2015-12-29 17:20:07 +03:00
Michael Bogdanov
ae4ca3b5bb Report JvmStatic diagnostic on primary constructor properties 2015-12-29 16:45:24 +03:00
Michael Bogdanov
bb63bcd520 Removed obsolete tests 2015-12-29 16:45:24 +03:00
Michael Bogdanov
e671d05105 Companion public val annotated with @JvmFIeld or const 2015-12-29 16:45:23 +03:00
Michael Bogdanov
e116cc3206 Private visibility for non-const, non-jvmField class companion property backing field 2015-12-29 16:45:22 +03:00
Michael Bogdanov
85ae0cb78e Restrict companion properties copying to interface by const 2015-12-29 16:45:22 +03:00
Pavel V. Talanov
6f0c2a0260 Project configuration: Add source directories for kotlin builtIns to KotlinRuntime 2015-12-29 15:57:02 +03:00
Pavel V. Talanov
9096a443ea Do not build light classes for local classes when the there is no class descriptor
These cases should be dealt with and this is only a way to degrade gracefully
2015-12-29 15:57:01 +03:00
Pavel V. Talanov
b38fc7b3c1 Parse local interfaces in expression position 2015-12-29 15:57:00 +03:00
Pavel V. Talanov
1c4d4f3e36 Create class descriptors for local classes in illegal positions
Typecheck code in illegal selector position
Fixes exceptions on "val p = A.class" erroneous code
2015-12-29 15:56:44 +03:00
Pavel V. Talanov
06e829936e Fix codegen predictor for properties and property accessors 2015-12-29 12:32:14 +03:00
Pavel V. Talanov
4f5f56e4a5 Add and use KtPropertyAccessor#getProperty() 2015-12-29 12:32:12 +03:00
Denis Zharkov
d511059cfa Unify code generation of as/is operation
They should be the same for common and reified cases
2015-12-28 18:32:15 +03:00
Denis Zharkov
da53d8cbf4 Replace reified operations instanceof/checkcast with is/as
It's more consistent with how they effectively work
2015-12-28 18:31:40 +03:00
Denis Zharkov
87b6374351 Get rid of redundant intrinsic
Also drop 'safe' parameter from TypeIntrinsics.checkcast,
because it's supposed to work as JVM checkcast (i.e. accepting nulls)
2015-12-28 18:31:40 +03:00
Denis Zharkov
39bbd7c795 Rework reified markers format
Use integer operation identifier instead of method name to differentiate
reified operations
2015-12-28 18:31:40 +03:00
Alexander Udalov
890c961383 Fix reflection internal error on enum nested classes query
#KT-10520 Fixed
2015-12-28 16:40:34 +03:00
Denis Zharkov
688a1b6305 Adjust type approximation to broken code and missing dependencies
- Do not run approximation if arguments number is different
- Add nullable Any? as supertype to MissingDependencyErrorClass

The latter is needed because otherwise TypeArgument.isConsistent became false
2015-12-28 11:13:39 +03:00
Denis Zharkov
722a152a74 Fix supertypes calculation for types with projections
Use captured types as replacement for non top-level entries

 #KT-7296 Fixed
2015-12-28 11:13:39 +03:00
Denis Zharkov
397d2ca312 Fix captured approximation for case of flexible types
#KT-9294 Fixed
2015-12-28 11:13:38 +03:00
Denis Zharkov
b6edddbe8b Make project compilable after member scope refinement 2015-12-28 11:13:38 +03:00
Denis Zharkov
ec0ec55ab5 Replace type entries of JsContext<*> with JsContext<JsNode>
It's needed to make method calls (e.g. replaceMe) on it typesafe,
otherwise it's value parameter type is subtype of captured
2015-12-28 11:13:37 +03:00
Denis Zharkov
9773e98d8a Refine type from property setter parameter on assignment
In most cases these types are equals, the only known exception is
var-property contained in projected type member scope (see test data)
2015-12-28 11:13:37 +03:00
Denis Zharkov
e2c02f825f Refine member scope for types with projections
Instead of erasing descriptors with conflicting substitution,
use invariant CapturedType(<projection>) as replacement for type parameter
within default member scope.

After substitution leave such types 'as is' everywhere except return types,
use common approximation for them.

 #KT-9294 In Progress
 #KT-5411 Fixed
 #KT-8647 Fixed

 #KT-9462 Fixed
 #KT-9893 Fixed
 #KT-7581 Fixed
 #KT-7296 In Progress
2015-12-28 11:13:37 +03:00
Denis Zharkov
365ff593f3 Extract and normalize member scope calculation
Basically it's wrong to use original types' member scope
as a worker for SubstitutionScope.
Member scope should always be determined by type constructor's default one
and substitution/arguments

 #KT-10448 Fixed
2015-12-28 07:44:56 +03:00
Denis Zharkov
58caff3411 Minor. Add tests checking not-null assertions
More precisely these tests check cases when expected type
was somehow obtained from captured type (in member scope with projections)
2015-12-28 07:44:56 +03:00
Denis Zharkov
7aaa6422b4 Introduce CustomSubstitutionCapability.substitutionToComposeWith
Mainly it's needed to prevent creation of subsituions composition
everytime we replacing arguments, because it's both unoptimal and wrong

When replace arguments in `A<E, F>` with <String, E> you got `A<String, String>`
as a result, that is unexpected.

But composition is only needed when previous substituion was abnormal
(e.g. RawSubsitution that should actually wrap new arguments), see RawTypes tests
2015-12-28 07:44:55 +03:00
Denis Zharkov
8d0a90a838 Preserve type capabilities of captured type 2015-12-28 07:44:55 +03:00
Denis Zharkov
e7dbcfe21f Minor. Cleanup code 2015-12-28 07:44:54 +03:00
Denis Zharkov
555286849e Minor. Move declaration closer to usages and optimize imports 2015-12-28 07:44:54 +03:00
Denis Zharkov
48b89a5db7 Replace unchecked 'is' on local class with unchecked 'as'
It became unchecked after latest changes (see parent commit)
2015-12-28 07:44:54 +03:00
Denis Zharkov
3fd35636ad Fix type parameter list for local classes
Add captured parameters from enclosing functions

 #KT-9584 Fixed
2015-12-28 07:44:53 +03:00
Denis Zharkov
73b961e885 Clean project code after #KT-3996 fix
No overload resolution ambiguity in smart-casts
2015-12-28 07:44:53 +03:00
Mikhail Glukhikh
0cc09872b6 Implicit exhaustive when annotation / highlighting 2015-12-26 10:46:44 +03:00
Mikhail Glukhikh
7d6ccc40c2 Implicit exhaustive whens now have exception in else branch #KT-8700 Fixed 2015-12-26 10:46:39 +03:00
Mikhail Glukhikh
011a9f23b9 Implicit exhaustive when check for definite variable initialization (KT-8700) 2015-12-26 10:46:35 +03:00
Mikhail Glukhikh
52c3fb03a2 ControlFlowInfo introduced to store variable states, related refactoring 2015-12-26 10:46:30 +03:00
Mikhail Glukhikh
0f3997c6ca InitState / VariableUseState / VariableControlFlowState moved to a separate file 2015-12-26 10:46:25 +03:00
Mikhail Glukhikh
4c4456c808 PseudocodeVariablesData converted to Kotlin 2015-12-26 10:46:20 +03:00
Mikhail Glukhikh
7179b37d95 PseudocodeVariablesData.java --> PseudocodeVariablesData.kt 2015-12-26 10:46:16 +03:00
Mikhail Glukhikh
b93894953d Exhaustive whens without else and 'Nothing' as the result are considered 'implicit exhaustive' 2015-12-26 10:46:11 +03:00
Mikhail Glukhikh
d62d7dd84f Introduced binding context storage for implicit exhaustive when (KT-8700) 2015-12-26 10:46:06 +03:00
Mikhail Glukhikh
b805ce06c2 CFG exhaustive when else instruction for KT-8700 2015-12-26 10:46:01 +03:00
Alexander Udalov
697228eae0 Mark enum entry names as name ids for incremental compilation purposes 2015-12-25 20:16:18 +03:00
Alexander Udalov
3513a64351 Move utilities about companion property fields to JvmAbi
To reuse that logic in reflection
2015-12-25 20:16:18 +03:00
Alexander Udalov
0685f06200 Drop outdated stuff from metadata annotations
Make KotlinLocalClass and KotlinInterfaceDefaultImpls not retained at runtime,
to be maybe deleted in the future
2015-12-25 20:16:18 +03:00
Alexander Udalov
0ecf04dcc5 Drop KotlinDelegatedMethod, simplify related code in codegen 2015-12-25 20:16:18 +03:00
Alexander Udalov
39c10867a0 Drop 'index' JVM binary format extension
Compute the JVM parameer index manually instead
2015-12-25 20:16:18 +03:00
Alexander Udalov
8dc604ac8b Drop compatibility flag, suppressing optimized generation of callable references 2015-12-25 20:16:18 +03:00
Alexander Udalov
64b48f4458 Drop compatibility flag, suppressing optimized generation of delegated property metadata 2015-12-25 20:16:18 +03:00
Alexander Udalov
002dc92d89 Drop old antlib.xml in org/jetbrains/jet/buildtools/ant
Use the new one in org/jetbrains/kotlin/ant instead
2015-12-25 20:16:18 +03:00
Alexander Udalov
dc6a176282 Drop old JVM binary format extensions: static in outer, impl class name 2015-12-25 20:16:18 +03:00
Alexander Udalov
fc74759231 Drop old enum entries from binary format 2015-12-25 20:16:18 +03:00
Alexander Udalov
57b96f38a9 Minor, remove/simplify unnecessary utilities in util.runtime 2015-12-25 20:16:18 +03:00
Alexander Udalov
b4addd0567 Move builtins-related logic from DeserializedPackageFragment to BuiltinsPackageFragment 2015-12-25 20:16:18 +03:00
Alexander Udalov
e7da56baf4 Restructure code in BuiltInsSerializer 2015-12-25 20:16:18 +03:00
Alexander Udalov
ddcdc11099 Write and read built-ins binary version 2015-12-25 20:16:18 +03:00
Alexander Udalov
906d706961 Deserialize builtins from new message 2015-12-25 20:16:18 +03:00
Alexander Udalov
7592f31596 Serialize built-ins to separate file .kotlin_builtins 2015-12-25 20:16:18 +03:00
Alexander Udalov
07a23cab10 Minor, make SerializedResourcePaths an interface 2015-12-25 20:16:18 +03:00
Alexander Udalov
75f046fa81 Drop Throwable#printStackTrace, make it a JVM-specific extension 2015-12-25 20:16:18 +03:00
Stanislav Erokhin
3d44471659 KT-10483 Missing smart cast on variable in variable as function call
#KT-10483 Fixed
2015-12-25 20:13:08 +03:00
Alexey Sedunov
4de26bed93 Minor: Add test for now-obsolete KT-8035 "Extended class is not open" quickfix fails on nested classes " 2015-12-25 18:51:03 +03:00
Alexey Sedunov
c90d283ff5 Quick Fixes: Implement 'Add val/var to primary constructor parameter' quick-fix for data classes
#KT-4038 Fixed
2015-12-25 18:50:59 +03:00
Alexey Sedunov
6978d842fb Intentions: Implement 'Add val/var to primary constructor parameter' intention
#KT-4038 In Progress
2015-12-25 18:50:55 +03:00
Alexey Sedunov
5dcf531048 Formatter: Leave single space between val/var and value parameter 2015-12-25 18:50:52 +03:00
Alexey Sedunov
2895e2e86f Change Signature: Process implicit usages of data class 'componentN' functions
#KT-9393 Fixed
2015-12-25 18:50:48 +03:00
Alexey Sedunov
4fba251fba Intentions: 'Implement abstract member' (Kotlin -> Java)
#KT-8467 Fixed
2015-12-25 18:50:41 +03:00
Alexey Sedunov
03641ffbee Intentions: 'Implement abstract member' (Kotlin -> Kotlin)
#KT-8467 In Progress
2015-12-25 18:50:37 +03:00
Alexey Sedunov
123b813073 'Replace with infix call' Intention: Disable on calls without explicit receiver
#KT-6332 Fixed
2015-12-25 18:50:34 +03:00
Alexey Sedunov
ae636a0d32 Iterate Intention: Add support of destructuring declarations 2015-12-25 18:50:30 +03:00
Alexey Sedunov
1d3054e7a6 Iterate Intention: Filter out functions without 'operator' modifier 2015-12-25 18:50:27 +03:00
Alexey Sedunov
1c74bab1cc Iterate Intention: Fix detection of extension iterators
#KT-8616 Fixed
2015-12-25 18:50:23 +03:00
Alexey Sedunov
ee9389d089 Create from Usage: Strip first parameter of extension function when expected type is non-extension 2015-12-25 18:50:19 +03:00
Alexey Sedunov
da2806acde Minor: Fix IllegalAccessError on referencing synthetic property 2015-12-25 12:59:15 +03:00
Michael Bogdanov
f870e365fa Removed accessors for const properties 2015-12-25 11:28:10 +03:00
Michael Bogdanov
b4db23a7b3 Removed 'INSTANCE' field from companions 2015-12-24 13:59:45 +03:00
Michael Bogdanov
2e73559f33 Removed 'INSTANCE$' field generation 2015-12-24 13:59:44 +03:00
Michael Bogdanov
aeb6486473 Deprecated 'INSTANCE$' replaced with 'INSTANCE' 2015-12-24 13:59:43 +03:00
Denis Zharkov
80fd9e3cbb Fix wrong contract assumption
Currently SamAdapterOverridabilityCondition can be called
even for incompatible descriptors

 #KT-10486 Fixed
2015-12-24 12:25:31 +03:00
Ilya Gorbunov
f9ba35af64 Place Char constants into builtin Char companion object. 2015-12-24 06:18:51 +03:00
Ilya Gorbunov
de11ed4fc6 Primitive Companion objects do not longer implement IntegerConstants and FloatingPointConstants. All declarations moved inside companions.
IntegerConstants and FloatingPointConstants are dropped.
#KT-8897 Fixed
2015-12-24 06:17:03 +03:00
Mikhail Glukhikh
fc4250b02b EA-75872 / KT-10473 fix: both JVM- and JS-diagnostic factories are now used as extensions 2015-12-23 18:33:50 +03:00
Mikhail Glukhikh
99a32b93fb Implemented missed checks for local functions #KT-10449 Fixed
Relevant code/test fixes
2015-12-23 18:22:32 +03:00
Mikhail Glukhikh
15746cbf56 Implicit callable type check refactoring, additional check for property with explicit Nothing type 2015-12-23 18:04:25 +03:00
Mikhail Glukhikh
6b8b39a7bd Intersection types are no more allowed in signatures #KT-10244 Fixed 2015-12-23 18:04:21 +03:00
Mikhail Glukhikh
f56dc722d9 Lateinit property backing field now inherits visibility from the property setter 2015-12-23 18:02:20 +03:00
Mikhail Glukhikh
ebda21c68a Codegen tests for lateinit var with private setter 2015-12-23 18:02:07 +03:00
Mikhail Glukhikh
60521e20ff SETTER_VISIBILITY_DIFFERS_FROM_LATEINIT_VISIBILITY diagnostic removed 2015-12-23 17:48:28 +03:00
Pavel V. Talanov
cfacd5da1e Fix a problem caused by getting project using an invalid psi element 2015-12-23 17:07:51 +03:00
Alexander Udalov
a7324ebad2 Minor, additional constructor for JvmPackagePartSource 2015-12-23 16:45:26 +03:00
Alexander Udalov
12e921ab15 Minor, add test on annotation in enum companion 2015-12-23 16:45:26 +03:00
Alexander Udalov
7170d488bd Fix package part class name calculation
Package part name can contain dollars
2015-12-23 16:45:26 +03:00
Alexander Udalov
e67318e049 Minor, add DescriptorUtils.isClassOrEnumClass 2015-12-23 16:45:26 +03:00
Alexander Udalov
48a0a95e8f Fix nested class context in cls stub builder
Previously two contexts were created for a nested class stub: one with the
replaced NameResolver, another with everything else. Now only one is created
2015-12-23 16:45:26 +03:00
Alexander Udalov
cd435c4130 Do not load implClassName JVM proto extension
Use JvmPackagePartSource instead for functions/properties in package parts,
check containing class kind for properties in interfaces
2015-12-23 16:45:26 +03:00
Alexander Udalov
03606c13aa Introduce PackagePartSource to store part class name in deserialized descriptors
Not used at the moment, will be in the following commits
2015-12-23 16:45:26 +03:00
Alexander Udalov
f4c5289cfc Minor, fix typo in class name: jmv -> jvm 2015-12-23 16:45:26 +03:00
Alexander Udalov
51cdb981f4 Remove obsolete code in IncrementalPackageFragmentProvider 2015-12-23 16:45:26 +03:00
Alexander Udalov
f7969621d6 Don't read isStaticInOuter message for fields
It's only written for fields of properties of companion objects of classes;
handle that case manually in deserialization
2015-12-23 16:45:26 +03:00
Alexander Udalov
696dce68fb Move deserialized callable descriptors to single file, convert to Kotlin 2015-12-23 16:45:26 +03:00
Alexander Udalov
19372a7210 Minor, make ProtoContainer sealed with two subclasses 2015-12-23 16:45:26 +03:00
Alexander Udalov
745de229cc Minor, split IMPL_CLASS_NAME_FOR_CALLABLE to two slices 2015-12-23 16:45:26 +03:00
Yan Zhulanow
b3877b5f0b Always compile Android projects without JDK in classpath #KT-10479 2015-12-23 16:42:35 +03:00
Pavel V. Talanov
70dc5a5c4c IDELightClassGenerationSupport: fix a problem when marking source root as both source and library source led to SO
# KT-10413 Fixed
2015-12-23 16:08:34 +03:00
Pavel V. Talanov
a8c5e0cc95 Minor, ProjectRootsUtil: extract a couple of utils and use them 2015-12-23 16:08:34 +03:00
Pavel V. Talanov
f20aba63a6 Add better diagnostic for "could not create stub for nested class" failures 2015-12-23 15:13:13 +03:00
Pavel V. Talanov
6a1ca7b9c9 Fix an exception caused by objects literals in supertype list not considered local 2015-12-23 14:56:27 +03:00
Dmitry Petrov
00db7d150b Fix KT-10472: compare all overloads including varargs in a single pass. 2015-12-23 10:05:40 +03:00
Nikolay Krasko
f25d80c38b Make add test lib quick-fix applicable only when there is unresolved import 2015-12-22 19:44:15 +03:00
Nikolay Krasko
259397db9d Add library for Gradle 2015-12-22 19:44:15 +03:00
Nikolay Krasko
2fba6c361a Determine maven library version from kotlin-stdlib 2015-12-22 19:44:15 +03:00
Nikolay Krasko
5467671a21 Add libraries to maven 2015-12-22 19:44:15 +03:00
Nikolay Krasko
1b92fa94bc Add kotlin-test.jar to classpath quickfix 2015-12-22 19:44:14 +03:00
Pavel V. Talanov
99966c17da Go to (show) implementations: skip light methods that are generated with DELEGATION or DELEGATION_TO_DEFAULT_IMPLS JvmDeclarationOriginKind
Add some unrelated tests for fake overrides
2015-12-22 17:30:51 +03:00
Stanislav Erokhin
de6f52030c Hack for unavailable archive.apache.org: use bintray.com instead 2015-12-22 16:44:10 +03:00
Dmitry Petrov
142e85be04 Prohibit functions (and constructors) with multiple vararg parameters. 2015-12-22 10:40:41 +03:00
Alexander Udalov
ed2ad8e8e3 Minor, fix warnings related to OperatorNameConventions 2015-12-21 20:41:45 +03:00
Alexander Udalov
97ce61ac44 Throw exception on inlining bytecode of version > 1.6
To prevent ASM from failing with a meaningless exception in this case as soon
as we support target 1.8 and someone tries to compile some code with the
current compiler against the new (1.8) code.
2015-12-21 20:38:18 +03:00
Alexander Udalov
7449ad2763 Rename Extension annotation to ExtensionFunctionType
The old one is kept temporarily and will be removed later
2015-12-21 20:33:32 +03:00
Alexander Udalov
6d40d94127 Minor, use String instead of DeprecationLevel
Using classes from runtime in the compiler is confusing and doesn't allow to
incompatibly change them
2015-12-21 20:28:40 +03:00
Alexander Udalov
c10cc30f40 Drop kotlin.jvm.internal.Intrinsic, use only one mechanism for intrinsics 2015-12-21 20:28:40 +03:00
Alexander Udalov
6048ebf871 Fix terminology: internal name instead of FQ name 2015-12-21 20:27:41 +03:00
Alexander Udalov
2ccd6d54b7 Add kotlin-reflect as a separate library
Exclude in core modules, since they do not have kotlin-reflect.jar in
dependencies when are built in build.xml
2015-12-21 18:46:08 +03:00
Alexander Udalov
a9476dfe37 Replace 'kotlin-runtime' in module dependencies with 'util' 2015-12-21 18:46:08 +03:00
Alexander Udalov
fa8c1f1a37 Delete obsolete tests on metadata annotations 2015-12-21 18:46:08 +03:00
Alexander Udalov
12922c3abd Minor, delete kunit source root from StdlibTest 2015-12-21 18:46:08 +03:00
Sergey Mashkov
c5e43a1327 kotlin-test: fix manifest description caused by copy-paste 2015-12-21 18:43:54 +03:00
Sergey Mashkov
2b6ae3127b kotlin-test: exclude OnlyInpuType from dist kotlin-test as well 2015-12-21 15:39:44 +03:00
Sergey Mashkov
8139070754 kotlin-test: exclude OnlyInputTypes annotation from jar 2015-12-21 15:14:55 +03:00
Sergey Mashkov
5ad0a84039 rename kotlin.test to kotlin-test 2015-12-21 15:10:24 +03:00
Andrey Breslav
a7e7d53e2b Reserve "async* {}", extend the quick-fix 2015-12-21 07:15:37 +03:00
Andrey Breslav
45074841a4 Minor. Additional test for "async {}" 2015-12-21 07:15:37 +03:00
Stanislav Erokhin
318f0c89b2 Completion fix for reserved 'async' syntax 2015-12-21 07:15:37 +03:00
Nikolay Krasko
afc1e24571 Quick fix for deprecated async syntax 2015-12-21 07:15:37 +03:00
Nikolay Krasko
01095bc652 More usages for getTestRoots method 2015-12-19 14:32:40 +03:00
Nikolay Krasko
2c1bf4dbd9 Remove filenameStartsLowerCase flag and clean warnings 2015-12-19 14:32:39 +03:00
Nikolay Krasko
aee36c40cd Request resolve only for modifier list for suppression check 2015-12-19 14:32:39 +03:00
Nikolay Krasko
b79aa686bb Avoid analyze in suppression check if there are no suppression annotations 2015-12-19 14:32:38 +03:00
Nikolay Krasko
697132561f Allow to override suppression key for inspections 2015-12-19 14:32:38 +03:00
Nikolay Krasko
8196621be5 Add test for inspections suppression 2015-12-19 14:32:38 +03:00
Nikolay Krasko
aff83087a3 Allow to suppress warnings at file level 2015-12-19 14:32:37 +03:00
Nikolay Krasko
712d2bdec0 Enable suppression actions for Kotlin inspections 2015-12-19 14:32:37 +03:00
Nikolay Krasko
94c0ccf2bf Fix test with dummy diagnostic 2015-12-19 14:32:36 +03:00
Nikolay Krasko
36210f0a27 Allow to suppress kotlin inspections with Suppress() annotation 2015-12-19 14:32:36 +03:00
Nikolay Krasko
ef265e23f8 Refactoring: SuppressionManager -> KotlinSuppressCache 2015-12-19 14:32:35 +03:00
Nikolay Krasko
b61b4e1c90 Allow to check suppression by string keys 2015-12-19 14:32:35 +03:00
Nikolay Krasko
20379028e8 Refactoring: extract separate class that can store suppressions 2015-12-19 14:32:34 +03:00
Nikolay Krasko
e562b73eff Refactoring: extract method for check test is AllFilesPresent test 2015-12-19 14:32:33 +03:00
Nikolay Krasko
5cd23daf4e Allow to run additional resolve from KtFileAnnotationList 2015-12-19 14:32:33 +03:00
Nikolay Krasko
0aa8d89b16 Minor: regenerate, optimize imports 2015-12-19 14:32:32 +03:00
Ilya Gorbunov
0a1f4d6088 Deprecate IndexingIterable and IndexingIterator and provide Iterator.withIndex() instead of the latter. 2015-12-19 09:56:52 +03:00
Ilya Gorbunov
fbfeb98ecf Deprecate some top-level constants to make 'em private later. 2015-12-19 09:56:46 +03:00
Ilya Chernikov
6ba68da811 Working around cancellation-related exception in case of different versions of daemon and client 2015-12-18 22:17:15 +01:00
Stanislav Erokhin
9e986db840 Minor. run generate tests 2015-12-18 22:54:05 +03:00
Stanislav Erokhin
bcaa755c4e Fix compilation.
- rename isFinal extension property to avoid ambiguity with synthetic property in DeserializedClassTypeConstructor
- add explicit parameter to lambda File.listFiles
- return true from lambda Query.forEach
2015-12-18 22:49:26 +03:00
Stanislav Erokhin
1574dc78df Synthetic extensions wins against top-level extension. 2015-12-18 22:49:25 +03:00
Stanislav Erokhin
e8a697cb6d Removed methods about synthetic from ImportingScope. 2015-12-18 22:49:24 +03:00
Stanislav Erokhin
fe9cbd982d Extract SyntheticScopes to injection component 2015-12-18 22:49:23 +03:00
Sergey Mashkov
3b08e5e547 kotlin-test: rename projects to eliminate possible mess 2015-12-18 22:17:48 +03:00
Sergey Mashkov
a97e623d04 kotlin-test: binary compatibility for fail function 2015-12-18 22:17:48 +03:00
Sergey Mashkov
f21b6a4777 Ant task to copy dist as a bootstrap compiler 2015-12-18 22:17:47 +03:00
Sergey Mashkov
fe4f51617c Add kotlin.test dependency to kotlin-compiler-embeddable 2015-12-18 22:17:47 +03:00
Sergey Mashkov
790524e391 Add library kotlin-test to IDEA project 2015-12-18 22:17:47 +03:00
Sergey Mashkov
f1783530ac Replace test assertions in the prod code with require 2015-12-18 22:17:47 +03:00
Sergey Mashkov
e25d31618c Fix tests 2015-12-18 22:16:04 +03:00
Sergey Mashkov
b57d2ff702 Add kotlin.test library to build distribution and provide for tests 2015-12-18 22:16:04 +03:00
Sergey Mashkov
7aae2bd452 kotlin-test: Remove javaClass as is in runtime now 2015-12-18 22:16:04 +03:00
Sergey Mashkov
a5b098c4a7 kotlin.test: Rename jvm module to junit 2015-12-18 22:16:04 +03:00
Sergey Mashkov
149ce70ce2 Move testing from stdlib to js.stdlib 2015-12-18 22:16:04 +03:00
Sergey Mashkov
1867abbbe7 Add kotlin.test library 2015-12-18 22:16:04 +03:00
Sergey Mashkov
dd36ef5712 Remove kunit 2015-12-18 22:16:04 +03:00
Andrey Breslav
6155d836a5 'async' reserved in front of function literals 2015-12-18 21:20:54 +03:00
Andrey Breslav
75ab0dd509 'sealed' reserved in front of when 2015-12-18 21:20:54 +03:00
Andrey Breslav
c36eeadab1 Minor. Constant used instead of constructor 2015-12-18 21:20:54 +03:00
Dmitry Petrov
09f53ea0bb Select most specific overloaded function/property by explicitly used arguments only.
Major rewrite of OverloadingConflictResolver.
2015-12-18 18:30:16 +03:00
Dmitry Petrov
52f0e0bc93 J2K: OverloadingConflictResolver.kt - convert to Kotlin 2015-12-18 18:30:16 +03:00
Dmitry Petrov
ca6153e8f1 J2K: OverloadingConflictResolver.kt 2015-12-18 18:30:16 +03:00
Ilya Gorbunov
03816373b3 Primitive array constructor-like functions with init lambda.
#KT-8831

Update testData and resolve ambiguity in newArray test
2015-12-18 17:54:09 +03:00
Natalia Ukhorskaya
513c4a4562 J2K: transform loops with double, float and char range with while
#KT-899 Fixed
2015-12-18 16:14:17 +03:00
Natalia Ukhorskaya
ecdef71580 J2K: cast right operand of equals for primitive types to left operand type
#KT-9997 Fixed
2015-12-18 16:14:16 +03:00
Natalia Ukhorskaya
1d787ed222 J2K: Insert initializer type for properties with primitive type if necessary 2015-12-18 16:14:15 +03:00
Ilya Gorbunov
188119aa83 Prepare to treat keys mapped to null same way as missing keys in Map extensions: getOrElse, getOrPut, getOrImplicitDefault. 2015-12-18 15:24:03 +03:00
Stanislav Erokhin
8b5a194dd6 Do not discriminate synthesized candidates.
#KT-9965 Fixed
2015-12-18 15:08:19 +03:00
Stanislav Erokhin
1b6f96ac2b Minor. update diagnostics/ReadMe.md 2015-12-18 15:08:18 +03:00
Alexey Sedunov
2fb3c727a7 Misc: Cleanup "org.jetbrains.kotlin.idea.intentions" package 2015-12-18 15:05:48 +03:00
Alexey Sedunov
3fca8f765c Misc: Cleanup "org.jetbrains.kotlin.idea.quickfix" package 2015-12-18 15:05:46 +03:00
Alexey Sedunov
ad55c8fb96 Misc: Cleanup "org.jetbrains.kotlin.idea.refactoring" package 2015-12-18 15:05:43 +03:00
Alexey Sedunov
f745f27694 Change Signature: Check syntactic validity of types. Warn about unresolved types 2015-12-18 15:05:40 +03:00
Alexey Sedunov
784b250de8 Change Signature: Fix rendering of unresolved types in overriding members 2015-12-18 15:05:39 +03:00
Alexey Sedunov
05ec9cc424 Initialize Property in Constructor Quick-Fix: Disable clearing of ShortenReferences waiting set 2015-12-18 15:05:37 +03:00
Alexey Sedunov
fd79145b73 Change Signature: Represent parameter/receiver types using KotlinTypeInfo 2015-12-18 15:05:36 +03:00
Alexey Sedunov
e558581667 Change Signature: Represent return type using KotlinTypeInfo 2015-12-18 15:05:34 +03:00
Alexey Sedunov
24951e8a38 J2K: KtTypeCodeFragment.java 2015-12-18 15:05:33 +03:00
Alexey Sedunov
6fe48243c7 J2K: KtTypeCodeFragment.java (rename to .kt) 2015-12-18 15:05:31 +03:00
Alexey Sedunov
594ad27952 Change Signature: Implement proper resolution of type code fragments
#KT-9210 Fixed
2015-12-18 15:05:29 +03:00
Alexey Sedunov
cfe1c44260 Introduce Variable: Add type argument to initializer if they can't be inferred from the context
#KT-5466 Fixed
2015-12-18 15:05:27 +03:00
Alexey Sedunov
ea8da18338 Inline Variable: Highlight usages in current file even if the variable is used in other files 2015-12-18 15:05:24 +03:00
Alexey Sedunov
4e36edb5d6 Inline Variable: Remove invalid imports and perform reference lengthening/shortening when inlining non-local declaration
#KT-8884 Fixed
2015-12-18 15:05:23 +03:00
Michael Bogdanov
44bdac6e11 Added file name to exception on indexing file mappings 2015-12-18 14:25:46 +03:00
Ilya Gorbunov
055c71e8d0 Provide minWith and maxWith to find maximum and minimum values according to the given comparator.
#KT-9002 Fixed
2015-12-18 00:00:52 +03:00
Ilya Gorbunov
b5e637bed5 Rename toMap with selector and transform to toMapBy 2015-12-17 22:50:44 +03:00
Ilya Gorbunov
544bc9a70c Introduce toMap with key-value pair selector.
#KT-6657
2015-12-17 22:50:43 +03:00
Ilya Gorbunov
2966420d24 Harden deprecation level for synchronized helper functions.
Make migration helper classes deprecated-hidden, although it doesn't affect anything.
2015-12-17 22:48:13 +03:00
Stanislav Erokhin
7521b89b3e Resolve unaryPlus as plus with error. 2015-12-17 20:21:01 +03:00
Denis Zharkov
1a6f9b8d1c Do not build inner type for error classes
#KT-10409 Fixed
2015-12-17 19:56:38 +03:00
Denis Zharkov
0d7c8635b3 Refine INSTANCE_ACCESS_BEFORE_SUPER_CALL check
- Detect usages of unitialized `this` as extension receiver argument
- Make it work within object literal created before super call

 #KT-9120 Fixed
 #KT-8289 Fixed
2015-12-17 19:56:38 +03:00
Zalim Bashorov
ba180f915a Minor: uncomment code fragments in ic tests which already should work 2015-12-17 19:41:25 +03:00
Zalim Bashorov
d9b67ae0ef Minor: use ".touch" extension instead of ".new" in incremental compilation tests when it possible 2015-12-17 19:41:24 +03:00
Mikhail Glukhikh
fe57a9e48f Setter visibility must be worse or the same as property visibility 2015-12-17 19:03:06 +03:00
Mikhail Glukhikh
f5989aa4f2 CallableMemberDescriptor.isOverridable / ClassDescriptor.isFinal refactoring
Extra JvmField and integer constants tests
2015-12-17 18:11:41 +03:00
Mikhail Glukhikh
91621704a2 Additional information to catch EA-75872 2015-12-17 17:30:30 +03:00
Evgeny Gerashchenko
16f482f723 Merge pull request #797 from JetBrains/rr/kt8365
KT-8365 Bogus "Receiver never used" warning when receiver is used in invoke() convention call
2015-12-17 17:38:24 +04:00
Alexey Tsvetkov
7384d25cb3 Prohibit Array<Nothing> 2015-12-17 16:26:26 +03:00
Mikhail Glukhikh
35f788a89c INAPPLICABLE_FIELD_TARGET_NO_BACKING_FIELD deleted (not necessary already) 2015-12-17 15:07:07 +03:00
Mikhail Glukhikh
3fb04aceb9 Check backing field availability for AnnotationTarget.FIELD #KT-10387 Fixed
Some duplicated checks deleted (UseSiteTargetChecker / JvmFieldApplicabilityChecker)
2015-12-17 15:06:58 +03:00
Mikhail Glukhikh
f55574df36 Code fix: TestOnly on a property without backing field 2015-12-17 15:06:51 +03:00
Michael Bogdanov
ca9e8fc5a7 Fix for KT-5910: Can't call Throwable() in Kotlin
#KT-5910 Fixed
2015-12-17 14:09:15 +03:00
Natalia Ukhorskaya
d40e9ffc13 Do not convert anonymous object to lambda if its function is recursive
#KT-10348 Fixed
2015-12-17 13:39:36 +03:00
Evgeny Gerashchenko
9aa38d99fb KT-8365 Bogus "Receiver never used" warning when receiver is used in invoke() convention call
#KT-8365 fixed
2015-12-17 13:31:43 +03:00
Evgeny Gerashchenko
2e6d82a72b Minor. Green code. 2015-12-17 13:06:27 +03:00
Natalia Ukhorskaya
43476bd773 Do not drop negation if resulting type isn't boolean 2015-12-17 11:11:33 +03:00
Natalia Ukhorskaya
f84b3414c8 Remove outdated test: generic property should have a receiver 2015-12-17 11:11:32 +03:00
Natalia Ukhorskaya
4b1edf7bb0 Intention tests: add directive to skip errors before 2015-12-17 11:11:31 +03:00
Natalia Ukhorskaya
7e6495618b ChangeVariableMutability: diagnostic can be reported on constructor parameter
#KT-10416 Fixed
2015-12-17 11:11:31 +03:00
Natalia Ukhorskaya
fc7c45d4d0 NegatedExpressionWithDemorgansLaw may produce code with error 2015-12-17 11:11:30 +03:00
Natalia Ukhorskaya
7f0065c806 Fix OperatorToFunctionIntention: insert function literal expressions to arguments correctly 2015-12-17 11:11:29 +03:00
Natalia Ukhorskaya
6bfbec8c88 ConvertAssertToIf may produce code with error
// TODO: we could generate anonymous function instead of lambda expression when there is a return
2015-12-17 11:11:28 +03:00
Natalia Ukhorskaya
ce3d53d2ee Intention tests: add operator modifier in some tests 2015-12-17 11:11:27 +03:00
Natalia Ukhorskaya
2c29f6f5ab ConvertIfWithThrowToAssertIntention: generate assert with lazy argument 2015-12-17 11:11:26 +03:00
Natalia Ukhorskaya
2dc1ba1d62 Intention 'remove explicit lambda parameter' may break code, do not check error in tests for it 2015-12-17 11:11:26 +03:00
Natalia Ukhorskaya
269676ee2e Intention tests: skip errors check for tests that fix some error 2015-12-17 11:11:25 +03:00
Natalia Ukhorskaya
abd7ed5c70 Fix intention for when: insert '||' instead of ',' 2015-12-17 11:11:24 +03:00
Natalia Ukhorskaya
6a3ac66208 Intention tests: add runtime where necessary 2015-12-17 11:11:23 +03:00
Natalia Ukhorskaya
78d737f3f4 Check errors in Intentions tests by default 2015-12-17 11:11:22 +03:00
Natalia Ukhorskaya
cc259c2d15 Intention convert object literal to lambda should add parameters if there are more than one 2015-12-17 11:11:22 +03:00
Natalia Ukhorskaya
5e231db631 J2K: convert method from Map (Java8) with cast to java.util.Map
#KT-10400 Fixed
2015-12-17 11:11:21 +03:00
Natalia Ukhorskaya
3f7b8554dd J2K: parenthesize receiver if needed
#KT-10121 Fixed
2015-12-17 11:11:20 +03:00
Natalia Ukhorskaya
a520e93b5b J2K: don't automatically convert Java code when pasting to a string literal in Kotlin
#KT-7759 Fixed
2015-12-17 11:11:19 +03:00
Natalia Ukhorskaya
f3a6c541ec J2K: Convert usages of kotlin functions from library correctly
#KT-6115 Fixed
2015-12-17 11:11:18 +03:00
Natalia Ukhorskaya
693e158759 Intention to convert anonymous function to lambda 2015-12-17 11:11:18 +03:00
Natalia Ukhorskaya
c79ffbac5c Run code cleanup on j2k module 2015-12-17 11:11:16 +03:00
Natalia Ukhorskaya
a983e6cf60 J2K: Do not convert string literal with escaped symbols automaticaly during java to kotlin conversion
#KT-9942 Fixed
2015-12-17 11:11:16 +03:00
Natalia Ukhorskaya
68101eeffa J2K: do not drop formatting for expressions with operator 2015-12-17 11:11:15 +03:00
Natalia Ukhorskaya
293b8eeda8 Minor: fix IDEA(win) run configuration 2015-12-17 11:11:14 +03:00
Michael Bogdanov
7a1d789e9a Added InliningLambdaContext 2015-12-17 09:52:28 +03:00
Michael Bogdanov
ebbc68dfae isInlineFunction renamed to isInlineMethodContext 2015-12-17 09:52:27 +03:00
Michael Bogdanov
9cad1a912a Choose proper context for accessor generation: skip inline ones; Fix for KT-6102: Bypass synthetic accessor when inlining lambda which calls private member
#KT-6102 Fixed
2015-12-17 09:51:41 +03:00
Michael Bogdanov
033698c51d Added crossinline field to MethodContext 2015-12-17 09:50:54 +03:00
Michael Bogdanov
b0a7706812 Test for obsolete KT-5445: Bad access to protected data in getfield
#KT-5445 Obsolete
2015-12-17 09:50:39 +03:00
Dmitry Jemerov
179498d971 UI for enabling EAP channel for plugin updates 2015-12-16 19:59:56 +01:00
Alexey Tsvetkov
5330248f6e Add checkbox for experimental incremental compilation; Make simple incremental compilation on by default 2015-12-16 21:52:39 +03:00
Alexander Udalov
0ba0ea5e1f Report 'unsupported' on synthetic Java property references
#KT-8575 Open
2015-12-16 19:50:15 +03:00
Alexander Udalov
dc84445e2e Inherit KProperty interfaces from function types
To be able to write the following: listOfStrings.map(String::length)
2015-12-16 19:48:28 +03:00
Mikhail Glukhikh
f25f0db10e Fixed long / double / float value merge in OptimizationBasicInterpreter #KT-7401 Fixed 2015-12-16 17:45:38 +03:00
Stanislav Erokhin
75089a3af8 Revert "Project configuration: Add sources to kotlin-runtime library"
This is workaround for KT-10413.
This reverts commit 623ecd2503.
2015-12-16 12:53:56 +03:00
Stanislav Erokhin
c725ed47f5 Replaced ReceiverValue.NO_RECEIVER to null. 2015-12-15 23:09:20 +03:00
Stanislav Erokhin
3692318c38 Minor. Removed ReceiverValue.IRRELEVANT_RECEIVER. 2015-12-15 23:08:41 +03:00
Pavel V. Talanov
56cd29dff2 Increase file size limit of compiler to 20 (was 2.5) megabytes (compiler will not read files larger than that)
Current IDEA api makes it possible to increase that to a higher value only by passing system property on compiler startup
2015-12-15 20:24:11 +03:00
Pavel V. Talanov
8d5d1b7dcc LightClassUtil: files can no longer "belong to builtIns" 2015-12-15 20:22:14 +03:00
Pavel V. Talanov
bd9221beaa Minor, fix test data for KotlinGoToTest 2015-12-15 20:22:13 +03:00
Pavel V. Talanov
623ecd2503 Project configuration: Add sources to kotlin-runtime library 2015-12-15 20:22:12 +03:00
Pavel V. Talanov
ca38a50e1a Test data: fix test data for LineMarkerTest 2015-12-15 20:22:12 +03:00
Pavel V. Talanov
4fdc77f86f Minor, mark component functions as operator in test data for ReferenceResolveWithLibTest 2015-12-15 20:22:11 +03:00
Pavel V. Talanov
6a780f01bd Replace calls to QuickFixUtil.canModify by calls to canRefactor
Fix ChangeFunctionSignatureFix#isAvailable
2015-12-15 20:22:10 +03:00
Pavel V. Talanov
a667aa2f71 Tests: add runtime (and runtime sources) to some tests that rely on being able to resolve references to built ins 2015-12-15 20:22:09 +03:00
Pavel V. Talanov
539b84b561 Minor, stricter check for when deciding whether to build light class for decompiled declaration 2015-12-15 20:22:09 +03:00
Pavel V. Talanov
ddde372fad Upgrade BuiltInsReferenceResolverTest 2015-12-15 20:22:08 +03:00
Pavel V. Talanov
ef134ffb1b ProjectDescriptorWithStdlibSources includes source files for builtIns 2015-12-15 20:22:07 +03:00
Pavel V. Talanov
0099c10e4e Drop BuiltInsReferenceResolver 2015-12-15 20:22:07 +03:00
Pavel V. Talanov
3f0d71411e KtDecompiledFile: hack to be able to navigate to builtIns on jvm
Which sometimes are loaded differently than they are rendered (see BuiltInClassesAreSerializableOnJvm)
2015-12-15 20:22:06 +03:00
Pavel V. Talanov
b5568f9ace findDecompiledDeclaration: rewrite using stub indices 2015-12-15 20:22:05 +03:00
Pavel V. Talanov
7ccdbfd596 Minor, rename file 2015-12-15 20:22:04 +03:00
Pavel V. Talanov
01b79f640f DecompiledNavigationUtils -> findDecompiledDeclaration() 2015-12-15 20:22:04 +03:00
Pavel V. Talanov
d89b609960 J2K DecompiledNavigationUtils: rename file 2015-12-15 20:22:03 +03:00
Pavel V. Talanov
9ad6685310 J2K DecompiledNavigationUtils: autoconvert 2015-12-15 20:22:02 +03:00
Zalim Bashorov
976fbf32ba Minor: use List instead of Array as container in chained scopes 2015-12-15 20:07:37 +03:00
Zalim Bashorov
5008a66a5b ChainedScope -> ChainedMemberScope 2015-12-15 20:07:36 +03:00
Zalim Bashorov
674a15daa1 Disable test until KT-10405 not fixed 2015-12-15 20:07:35 +03:00
Zalim Bashorov
8fa2e28729 Add usages of inherited static members from nested object 2015-12-15 20:07:33 +03:00
Zalim Bashorov
e201268f46 Remove unnecessary scopes 2015-12-15 19:41:18 +03:00
Zalim Bashorov
8c4deb80e5 Extract to property path to js.stdlib output dir and fix statistics for generated js files 2015-12-15 19:41:17 +03:00
Zalim Bashorov
0b6e100aff Fix compilation 2015-12-15 19:41:16 +03:00
Zalim Bashorov
51a8d5b9f0 Allow to use static members from companion object's parents 2015-12-15 19:41:15 +03:00
Zalim Bashorov
69c2668530 Don't allow to use own members when resolve super constructor call in (companion) object 2015-12-15 19:41:14 +03:00
Zalim Bashorov
e9ea4cc953 Don't allow to use own nested classes when resolve header of (companion) object 2015-12-15 19:41:13 +03:00
Zalim Bashorov
38522f60ea Minor: add helper function createLazyValue with onRecursion 2015-12-15 19:41:12 +03:00
Denis Zharkov
7756644eb1 Introduce KClass<T>.javaPrimitiveType and KClass<T>.javaObjectType
#KT-6319 Fixed
2015-12-15 16:18:31 +03:00
Denis Zharkov
154657a374 Fix wildcards for invariant arguments
See test with Java, we want preserve the invariant that if return type and
value parameter types are same in Kotlin, than we can use such return-value
as argument for that parameter
2015-12-15 16:18:31 +03:00
Denis Zharkov
5df2a58003 Minor. Adjust generic parameter naming 2015-12-15 16:18:31 +03:00
Denis Zharkov
b4bb92d136 Fix overload resolution ambiguity for types intersection
There are two different forms of types intestion:
1. Type parameters with multiple bounds
2. Smart casts

The problem was that when member scope of type intersection contained
effective duplicates and that lead to overload resolution ambiguity in
strange cases like `x.hashCode()`

For first type we do effectively the same thing as when building member
scope for class extending several interfaces: group all descriptors by
both-way-overridability relation and then choose most-specific in each
group.

For smart casts we do basically the same thing but with special
treatments:
1. From all descriptors that _equal_ to most specific we choose
   the one that works without smartcast if possible (i.e. we choose first from candidates list)
2. If smart-cast value seems to be unstable we use only member scope
   of receiver type + all descriptors from smart cast possible types
   that has incompatible signature. If we'd include all of them and
   choose one as more specific, and it would lead to false
   SMART_CAST_IMPOSIBLE (see test unstableSmartCast.kt)

 #KT-3996 Fixed
 #KT-10315 Fixed
2015-12-15 16:18:31 +03:00
Denis Zharkov
8d0c3281cd Choose first non-flexible when selecting most specific 2015-12-15 16:18:31 +03:00
Dmitry Petrov
02311538d6 Refactor createAntBindFakeOverride.
Drop unneeded helper functions from overridingUtils.kt
2015-12-15 16:18:30 +03:00
Ilya Gorbunov
19a6cc74de Build Markdown from sources tagged with forKotlin tag 2015-12-15 16:08:55 +03:00
Dmitry Jemerov
c83b6ed3a5 Inspection for migrating Kotlin stdlib API usages in Java code 2015-12-15 12:45:40 +01:00
Alexey Sedunov
3dfb9d2e5e Inline Variable: Move string template processing to InlineValHandler as it violates contract of the PsiElement.replace() 2015-12-15 13:31:35 +03:00
Alexey Sedunov
b5fad71b18 Inline Variable: Warn about non-Kotlin usages
#KT-8885 Fixed
2015-12-15 13:31:34 +03:00
Alexey Sedunov
ffb382e3bc PSI: Delete succeeding semicolon along with KtElement
#KT-5487 Fixed
2015-12-15 13:31:33 +03:00
Alexey Sedunov
d0b9b6a3b4 Introduce Parameter: Support conversion of local variables
#KT-9170 Fixed
2015-12-15 13:31:32 +03:00
Alexey Sedunov
fff011f60a Unit Test Tooling: Fix order of test method generation actions
#KT-9740 Fixed
2015-12-15 13:31:31 +03:00
Alexey Sedunov
258a6328a8 Pull Up: Default to "Make abstract" when moving to interface
#KT-9832 Fixed
2015-12-15 13:31:29 +03:00
Alexey Sedunov
04c6ea78c7 Name Suggester: Allow any Kotlin identifier in suggested names
#KT-10332 Fixed
2015-12-15 13:31:28 +03:00
Alexey Sedunov
ee9eb55b59 Extract Function: Fix NPE on parameter disabling. Fix parameter swapping 2015-12-15 13:31:27 +03:00
Mikhail Glukhikh
49e7417741 "as" in binary / unary expressions now checked only for original type conversion #KT-10384 Fixed
Also #KT-10386 Fixed
2015-12-15 12:02:33 +03:00
Mikhail Glukhikh
233e8e58e8 Code cleanup: get rid of unnecessary !! / as, fake warning comments and issues 2015-12-15 12:00:58 +03:00
Ilya Gorbunov
4ffd60cf52 Correct deprecation messages. 2015-12-14 21:07:33 +03:00
Ilya Gorbunov
43ce8222fc Soften deprecation level to ease migrations. 2015-12-14 21:05:13 +03:00
Pavel V. Talanov
46798ed845 Module configuration: 'idea-completion' depends on 'idea' at runtime
So that plugin.xml is in classpath when running completion tests separately
2015-12-14 17:35:17 +03:00
Stanislav Erokhin
cd80d9408d Extension function wins against function with no receiver 2015-12-14 16:49:29 +03:00
Dmitry Jemerov
a7503303d5 diagnostics for EA-73611 2015-12-14 13:28:45 +01:00
Mikhail Glukhikh
d2fce9b16d CFA classes rename: remove 'Kotlin' prefix 2015-12-14 15:25:43 +03:00
Dmitry Jemerov
8db3fb03f9 remove support for "package.foo.bar" syntax inside files 2015-12-14 13:22:54 +01:00
Mikhail Glukhikh
19084b8182 Additional codegen test for KT-10107 2015-12-14 12:52:43 +03:00
Mikhail Glukhikh
fdc9e9d7f5 Delegated properties never require backing field #KT-10107 Fixed 2015-12-14 12:26:37 +03:00
Ilya Gorbunov
9d753f24b7 Do not create regex to split path by directory separator char. 2015-12-14 06:31:44 +03:00
Ilya Gorbunov
a4f82a2dc4 Sensible behavior for File.startsWith and File.endsWith 2015-12-14 06:10:26 +03:00
Ilya Gorbunov
d2e22dc794 Fix tests on linux.
Add tests for File.startsWith
2015-12-14 06:10:24 +03:00
Ilya Gorbunov
645c78e2f4 Do not use assert in test, use assertTrue or assertEquals 2015-12-14 06:10:22 +03:00
Ilya Gorbunov
cb71e05c51 Deprecate File.directory, root, rootName as properties with unclear behavior. 2015-12-14 06:10:21 +03:00
Ilya Gorbunov
7c9b53c75c Do not convert separatorsToSystem in file path extensions.
Do not require network host in network share root to contain dot.
File.root now is always non-null to be consistent with File.toComponents().root.
Introduce invariantSeparatorsPath property.
Deprecate relativeTo to make it return File later. Introduce toRelativeString instead.
Introduce relativeToOrNull and relativeToOrSelf extensions.
2015-12-14 06:10:18 +03:00
Ilya Gorbunov
52eb9e4276 Refactor FilePathComponents: rename properties, deprecate constructor, rename filePathComponents extension. 2015-12-14 06:09:55 +03:00
Ilya Gorbunov
8deefd56db Rename FileTreeWalk public parameters and builder methods.
Directory filtering now is performed in newly introduced onEnter predicate.
2015-12-14 05:16:06 +03:00
Ilya Gorbunov
e24dbcefb6 Move all mutable state from FileTreeWalk to its iterator implementation, allowing this sequence to be iterated several times.
Introduce SingleFileState for single file walks.
Do not check isDirectory in DirectoryState constructor unless assertions are enabled.
2015-12-14 05:16:04 +03:00
Ilya Gorbunov
061803d7b1 Compare root of FilePathComponents according to case-sensitivity rules of current file system. 2015-12-14 05:16:02 +03:00
Ilya Gorbunov
4f2887df64 FileTreeWalk tests: do not remove failed directory from stack as leave is also called on failed dirs. 2015-12-14 05:16:01 +03:00
Ilya Gorbunov
162b152133 Improve File.relativeTo handling relative paths. Paths are normalized before calculating relative path. "x".relativeTo("../y") now is considered to have incompatible roots. 2015-12-14 05:15:59 +03:00
Ilya Gorbunov
9f5a972816 Improve resolve and resolveSibling for relative paths. 2015-12-14 05:15:57 +03:00
Ilya Gorbunov
923effe11d Change FilePathComponents parsing for file with empty name to enhance finding relative path between relative paths. 2015-12-14 05:15:55 +03:00
Ilya Gorbunov
6301c707cd Ensure resolveTo fails as expected.
Change UNC paths not to be misinterpreted on *nix.
2015-12-14 05:15:53 +03:00
Ilya Gorbunov
c23c2dbe85 FileTreeWalk: correct usage not to filter out subdirectories 2015-12-14 05:15:52 +03:00
Ilya Gorbunov
515d2cd3e7 FileTreeWalk.filter was dropped, use treeFilter otherwise filtering result becomes different.
Refactor walking tests.
2015-12-14 05:15:50 +03:00
Ilya Gorbunov
27551a8399 Make some io test classes non-nested as it's not supported by runners. 2015-12-14 05:15:48 +03:00
Ilya Gorbunov
33967a09f6 Unify minBy and maxBy for Maps with other families. 2015-12-14 04:56:47 +03:00
Ilya Gorbunov
33b366b9b9 Relax upper bound of T for minBy and maxBy to be nullable.
Swap type parameters of minBy and maxBy.
#KT-10099 Fixed
2015-12-14 04:56:45 +03:00
Ilya Gorbunov
58e93d5e1b Update testData for LoadBuiltinsTest and BuiltInDecompilerTest 2015-12-14 04:29:28 +03:00
Ilya Gorbunov
bf9d50ccc4 Fix testData for LookupTracker 2015-12-14 04:29:27 +03:00
Ilya Gorbunov
59a9e2549c Fix tests: codegen, completion, decompiler consistency, quickdoc, intentions, navigation, reference resolver, quick fixes 2015-12-14 04:29:25 +03:00
Ilya Gorbunov
f55b421853 Partially support default imports when analyzing ReplaceWith annotation pattern. 2015-12-14 04:29:23 +03:00
Ilya Gorbunov
d296d91272 Fix fq-names of top-level extensions in intentions. 2015-12-14 04:29:21 +03:00
Ilya Gorbunov
5df94da216 Fix fq-name of listOf in extract function. 2015-12-14 04:29:20 +03:00
Ilya Gorbunov
4dde59368c Fix tests not to duplicate array constructor definitions as they are available now in builtins. 2015-12-14 04:29:18 +03:00
Ilya Gorbunov
f509937037 Move array constructors to builtins module back to kotlin package. 2015-12-14 04:29:11 +03:00
Ilya Gorbunov
5aff07561d Move jvm annotations and class mapping intrinsics to runtime.jvm module to kotlin.jvm package.
Make annotationClass to be a property.
Deprecate with error javaClass property on KClass<T>
2015-12-14 03:51:07 +03:00
Ilya Gorbunov
feff5b2327 Stdlib generators: change values back to function. 2015-12-14 03:49:59 +03:00
Ilya Gorbunov
2d85c437cd Final moves: BigInteger and BigDecimal operations 2015-12-14 03:49:58 +03:00
Ilya Gorbunov
0ab33ab075 Final moves: map delegating accessors and timing utils, provide deprecated methods in the old place 2015-12-14 03:49:56 +03:00
Ilya Gorbunov
597f2c0a8c Final moves: map delegating accessors and timing utils 2015-12-14 03:49:55 +03:00
Ilya Gorbunov
16fbdcf107 For migration: provide deprecated classes inheriting multifile facade classes moved out of kotlin package. 2015-12-14 03:49:53 +03:00
Ilya Gorbunov
ae3135c770 For migration: Make an option "Xmultifile-facades-open" for compiler to generate open multifile facade classes. 2015-12-14 03:49:51 +03:00
Ilya Gorbunov
594d981094 Provide deprecated AbstractIterator in the old package kotlin.support. 2015-12-14 03:49:49 +03:00
Ilya Gorbunov
91b920f18e Move IndexedValue, IndexingIterable and IndexingIterator back to kotlin package 2015-12-14 03:49:48 +03:00
Ilya Gorbunov
871c5c66b4 Move code between packages (JS) 2015-12-14 03:49:46 +03:00
Ilya Gorbunov
dd2ae15531 Move code between packages. 2015-12-14 03:49:45 +03:00
Ilya Gorbunov
81e7826568 Move generated code between packages. 2015-12-14 03:49:43 +03:00
Alexander Udalov
477e25ae2f Remove Intrinsic annotation from *arrayOf functions 2015-12-14 03:49:41 +03:00
Ilya Gorbunov
09191622e5 Fix testData: import became not required. 2015-12-14 01:07:51 +03:00
Ilya Gorbunov
42565129ee Add packages kotlin.collections, kotlin.ranges, kotlin.sequences, and kotlin.text to default imports. 2015-12-14 01:07:49 +03:00
Alexander Udalov
65c5c99c68 Render decompiled annotations on enum entries 2015-12-13 17:49:44 +03:00
Alexander Udalov
6f347f351a Load annotations on compiled Kotlin enum entries
#KT-10339 Fixed
2015-12-13 03:52:42 +03:00
Alexander Udalov
3e2eb8c1a0 Serialize/deserialize annotations on enum entries
#KT-10338 Fixed
2015-12-13 03:52:41 +03:00
Alexander Udalov
5e421b4024 Improve type parameter bound diagnostic location
If there's only one erroneous bound (vast majority of cases), report it on the
bound; otherwise (to avoid reporting it several times) report on the type
parameter declaration
2015-12-13 02:06:07 +03:00
Michael Bogdanov
39d9b35e27 Force resolve companion in light class generation 2015-12-12 11:41:37 +03:00
Michael Bogdanov
a849f3f5d4 Fixed filtering error 2015-12-12 11:41:37 +03:00
Michael Bogdanov
4ad113d836 Removed redundant check 2015-12-12 11:41:36 +03:00
Michael Bogdanov
7c7786f7d0 Generate private methods in TraitImpl as private, don't generate delegation to private trait methods 2015-12-12 11:41:36 +03:00
Michael Bogdanov
a2d644f708 Fix for KT-9958: NoSuchMethodError when we call protected method from companion object
#KT-9958 Fixed
2015-12-12 11:41:35 +03:00
Michael Bogdanov
a7eea6e4dd Get rid of NeedSyntheticChecker 2015-12-12 11:41:35 +03:00
Denis Zharkov
b443f605ed Minor. Add load-java test checking that SamAdapterOverridabilityCondition is on 2015-12-11 22:41:03 +03:00
Denis Zharkov
871fe7680b Load special override as HIDDEN in case of signature clash
#KT-10151 Fixed
2015-12-11 22:41:03 +03:00
Denis Zharkov
45c0bc3610 Add 'subClassDescriptor' parameter to ExternalOverridabilityCondition 2015-12-11 22:41:03 +03:00
Denis Zharkov
417ff281ee Split getOverriddenBuiltinWithJvmDescriptor into two extensions 2015-12-11 22:41:02 +03:00
Mikhail Glukhikh
fe78f944a6 Private setter for open property: is now an error, not a warning 2015-12-11 18:54:40 +03:00
Mikhail Glukhikh
00504a3f6d Private setter for open property: take containing class modality into account #KT-10325 Fixed 2015-12-11 18:54:28 +03:00
Dmitry Jemerov
470dfc9bec remove "Jet" from names of classes related to resolve/scopes 2015-12-11 16:07:13 +01:00
Stanislav Erokhin
39b6637c7c Fix exception from InvokeProcessor when we get invoke from extension function type. 2015-12-11 17:01:04 +03:00
Stanislav Erokhin
616bb444ec Minor. strip explicit receiver for variable call if needed. 2015-12-11 17:01:03 +03:00
Stanislav Erokhin
1890b8cbd3 Removed InvokeOnExtensionFunctionWithExplicitReceiverFix 2015-12-11 17:01:03 +03:00
Stanislav Erokhin
dd24fd47f7 Update control flow test data for tower resolution algorithm
- locals win
- drop old invokeExtension convention
2015-12-11 17:01:02 +03:00
Stanislav Erokhin
79b30dddf9 Update lookupTracker test data for tower resolution algorithm 2015-12-11 17:01:02 +03:00
Alexander Udalov
239502368a Update test data for tower resolution algorithm
- locals win
- unary calls to plus/minus are not supported in favor of unaryPlus/unaryMinus
- unqualified nested classes are temporarily reported as unresolved
- function without receiver win against extension function
- explicit import win against star import
2015-12-11 17:01:02 +03:00
Stanislav Erokhin
66a031f7a0 Do not enter in recursion for implicit invoke on variable with un inferred type 2015-12-11 17:01:01 +03:00
Stanislav Erokhin
1dca49cecc Workaround for tower resolution algorithm in kotlin code. Will be investigated. 2015-12-11 17:01:01 +03:00
Stanislav Erokhin
cbe1ffed55 Use new tower resolution algorithm by default 2015-12-11 17:01:00 +03:00
Natalia Ukhorskaya
f699adda33 Stepping: skip methods deleting to static method call of DefaultImpl.
Support smart step into interface methods with implementation
 #KT-4803 Fixed
2015-12-11 16:21:05 +03:00
Natalia Ukhorskaya
ea8de883ac Implement 'Skip simple getters' for debugger 2015-12-11 16:21:04 +03:00
Michael Bogdanov
b950bf0e6e Fix for KT-10259: Proguard can't find generated lambda class of lambda nested inside object?.let lambda
#Fixed KT-10259
2015-12-11 16:14:59 +03:00
Michael Bogdanov
9452c200a0 Keep typeRemapper in inlining context instead of hashMap for transformed types 2015-12-11 16:14:58 +03:00
Mikhail Glukhikh
6fb871a088 A set of additional tests for complex expressions DFA 2015-12-11 15:17:37 +03:00
Mikhail Glukhikh
d024045638 Data flow values for Elvis / parenthesized expressions, smart casts on them 2015-12-11 15:17:29 +03:00
Mikhail Glukhikh
745a3aeeac Accurate representation of smart casts on complex expressions 2015-12-11 15:17:25 +03:00
Mikhail Glukhikh
7cd867b936 DFA: take into account if / else and when expression assignments #KT-10002 Fixed
Also #KT-7479 Fixed
2015-12-11 15:17:22 +03:00
Mikhail Glukhikh
e7fc6bcc6e BuiltIns refactoring: getEnumEntry 2015-12-11 11:11:46 +03:00
Mikhail Glukhikh
c8b50eec1e Enum.values: deprecation (warning) --> deprecation (error) 2015-12-11 11:11:42 +03:00
Mikhail Glukhikh
521b216602 Migration: Enum.values to Enum.values() 2015-12-11 11:11:38 +03:00
Mikhail Glukhikh
3254641c5a Local sealed classes: warning --> error 2015-12-11 11:11:34 +03:00
Dmitry Petrov
0fe74a8b43 COMMA_IN_WHEN_CONDITION_WITHOUT_ARGUMENT is an ERROR now.
Migrated code.
Updated test data in IDE tests.
Dropped whenWithRangeTestsAndMultiConditions.kt:
"Introduce subject" is not applicable to 'when' with ||-ed conditions.
2015-12-11 10:43:16 +03:00
Alexey Tsvetkov
199827635f Reserve 'typeof' as a keyword 2015-12-10 21:26:41 +03:00
Alexey Sedunov
4c3f620255 Minor: Fix compilation 2015-12-10 21:03:44 +03:00
Alexey Sedunov
f87d2d1fcc Introduce Refactorings: Implement trimming renderer for expression
chooser. Do not suggest parenthesized expressions
 #KT-9028 Fixed
2015-12-10 20:07:26 +03:00
Alexey Sedunov
ae2fc19fe5 Introduce Parameter/Lambda Parameter: Parenthesize binary expressions if operation reference starts with a new line 2015-12-10 20:07:24 +03:00
Alexey Sedunov
354e1dc337 Extract Function: Parenthesize binary expressions if operation reference starts with a new line 2015-12-10 20:07:23 +03:00
Alexey Sedunov
1824f10f07 Introduce Variable: Parenthesize binary expressions if operation references starts with a new line
#KT-3933 Fixed
2015-12-10 20:07:22 +03:00
Alexey Sedunov
ffc8b6fd89 Safe Delete: Move test classes and test data to refactoring directory 2015-12-10 20:06:34 +03:00
Alexey Sedunov
a76f43b66c Safe Delete: Skip internal usages of class constructors when deleting class itself
#KT-8857 Fixed
2015-12-10 20:06:31 +03:00
Alexey Sedunov
f50059a11a Create from Usage: Implement "Create function" on callable references
#KT-10283 Fixed
2015-12-10 20:06:30 +03:00
Alexey Sedunov
87aebd2cdf Create from Usage: Forbid "Create local variable/parameter/property" on callable references
#KT-10283 In Progress
2015-12-10 20:06:27 +03:00
Alexey Sedunov
44743aade5 Create from Usage: Allow type parameters in the receiver position
#KT-7497 Fixed
2015-12-10 20:06:26 +03:00
Alexey Sedunov
76cf284b77 Introduce Variable: Do not suggest type-based names for multi-declaration entries if component function corresponds to value parameter
#KT-10287 Fixed
2015-12-10 20:06:24 +03:00
Yan Zhulanow
15faa6610c Android Extensions: do not cache package fragment provider with synthetic properties (KT-10318) 2015-12-10 19:38:38 +03:00
Yan Zhulanow
ac9a1350c2 Application package from manifest file has a higher priority than the applicationId value in build.gradle (KT-10320) 2015-12-10 19:38:38 +03:00
Dmitry Jemerov
009e3f9cd7 rename PSI classes according to current terminology:
KtMultiDeclaration(Entry) -> KtDestructuringDeclaration(Entry)
KtFunctionLiteralExpression -> KtLambdaExpression
KtFunctionLiteralArgument -> KtLambdaArgument
KtDelegationSpecifierList -> KtSuperTypeList
KtDelegationSpecifier -> KtSuperTypeListEntry
KtDelegatorToSuperClass -> KtSuperTypeEntry
KtDelegatorToSuperCall -> KtSuperTypeCallEntry
KtDelegationByExpressionSpecifier ->KtDelegatedSuperTypeEntry
2015-12-10 16:15:13 +01:00
Alexey Tsvetkov
ef4b3c99f4 Minor: remove default values for markChunk parameters 2015-12-10 18:03:20 +03:00
Alexey Tsvetkov
6a74b1c8bf Rebuild only kotlin when cache version is changed 2015-12-10 18:03:17 +03:00
Alexey Tsvetkov
49778d2fb6 Minor: move buildFinished closer to buildStarted 2015-12-10 18:03:13 +03:00
Natalia Ukhorskaya
d10c3ffbe4 Fix exception in EE for inline function invocation
#KT-10217 Fixed
2015-12-10 14:42:00 +03:00
Natalia Ukhorskaya
58d62fde4d Add test for smart step into in method with default args
#KT-4803 In Progress
2015-12-10 14:41:58 +03:00
Natalia Ukhorskaya
1dbe560734 Run Code Clean up for org.jetbrains.kotlin.idea.debugger 2015-12-10 14:41:56 +03:00
Natalia Ukhorskaya
1ca6c695e6 Remove println() from debugger testData 2015-12-10 14:41:53 +03:00
Natalia Ukhorskaya
9b8e5c5684 Refactor KotlinDebuggerTestCase to avoid StubIndexReindex between test invocation 2015-12-10 14:41:51 +03:00
Natalia Ukhorskaya
42119b311d Skip whitespaces as context elements of codeFragmnets
#KT-10171 Fixed
2015-12-10 14:41:49 +03:00
Natalia Ukhorskaya
49e484d796 Do not throw exception analyzing imports in KtCodeFragments 2015-12-10 14:41:47 +03:00
Natalia Ukhorskaya
08c29b7325 Fix step out from inline function literal placed at one line
#KT-10187 Fixed
2015-12-10 13:11:40 +03:00
Natalia Ukhorskaya
3b3dbbab04 Evaluate expression for variable of function type
#KT-10199 Fixed
2015-12-10 13:11:39 +03:00
Natalia Ukhorskaya
2bc2d81486 Debugger: correctly box parameter types in case of generics
#KT-10180 Fixed
2015-12-10 13:11:39 +03:00
Pavel V. Talanov
280e00981f Load java: load annotations on enum entries 2015-12-10 11:12:23 +03:00
Pavel V. Talanov
fb19552920 Mark enum entries that are deprecated in Kotlin as deprecated in bytecode 2015-12-10 11:12:22 +03:00
Zalim Bashorov
5bf8b4d946 Allow to use "static" part of class in own constructors by short name, including in primary constructor 2015-12-09 21:42:32 +03:00
Mikhail Glukhikh
f319b1b93a Sealed classes are not taken into account in live templates 2015-12-09 19:27:50 +03:00
Mikhail Glukhikh
9a4eb2a368 Refactoring: ClassDescriptor.isFinal, no more Modality.isOverridable 2015-12-09 19:27:47 +03:00
Mikhail Glukhikh
fb406bfc24 Refactoring: CallableMemberDescriptor.isOverridable 2015-12-09 19:27:04 +03:00
Mikhail Glukhikh
c73f01927a 'sealed' is now not 'final' by default + related code changes #KT-10266 Fixed 2015-12-09 19:19:04 +03:00
Mikhail Glukhikh
5b72afe8a0 J2K: Modality.kt 2015-12-09 19:19:00 +03:00
Mikhail Glukhikh
d80206376a Modality.java --> Modality.kt 2015-12-09 19:18:56 +03:00
Nikolay Krasko
8e71006e86 Add test JDK 8 module to be able reparse IDEA step 2015-12-09 19:16:37 +03:00
Pavel V. Talanov
da02ed9057 GroupingMessageCollector: ensure that messages without location are reported first
Should fix CompileKotlinAgainstCustomBinariesTest.testIncompleteHierarchyInJava(Kotlin) tests
2015-12-09 18:54:15 +03:00
Pavel V. Talanov
2e971b13aa KotlinGoToTest: test go to for builtIn classes and functions 2015-12-09 18:51:32 +03:00
Pavel V. Talanov
7e6bed7ad8 Decompiled text: should always render all modifiers even if we don't feel like it 2015-12-09 18:51:31 +03:00
Pavel V. Talanov
fee19ad9de CallableClsStubBuilder: correctly decide whether callable is extension 2015-12-09 18:51:30 +03:00
Pavel V. Talanov
deb6410a5c Add test for builtIn stub builder and decompiler
These test are by no means exhaustive, the correctness of the subsystem relies on it sharing code with well-tested js-decompilation
2015-12-09 18:51:30 +03:00
Pavel V. Talanov
5cc04e41fe Enable keyword highlighting in .kotlin_class, .kotlin_package files 2015-12-09 18:51:29 +03:00
Pavel V. Talanov
c40d6af1e5 Decompile builtins (kotlin_class and kotlin_package files)
The main purpose of this is to be able to index builtin declarations and enable go to symbol/class functionality in ide
Also it makes sense to show builtin classes (Any, Int ...) as classes when browsing kotlin-runtime.jar

Refactor decompiler code to eliminate existing and potential duplication
Share the code between js (kjsm) decompilation and builtin decompilation heavily
2015-12-09 18:51:28 +03:00
Pavel V. Talanov
6164566cad Extract duplicate logic between javascript and builtins serialization/deserialization 2015-12-09 18:51:27 +03:00
Pavel V. Talanov
34c3c04ead Implement NameResolverImpl#getPackageFqName(index) 2015-12-09 18:51:26 +03:00
Pavel V. Talanov
5846769b43 J2K NameResolverImpl: convert 2015-12-09 18:51:26 +03:00
Pavel V. Talanov
9ff6be6f0f J2K NameResolverImpl: rename file 2015-12-09 18:51:25 +03:00
Pavel V. Talanov
e458534c93 Write package_fq_name to for Package message when serializing builtins 2015-12-09 18:51:24 +03:00
Pavel V. Talanov
f05de6d6eb Add package_fq_name field extension to builtins.proto 2015-12-09 18:51:24 +03:00
Pavel V. Talanov
9a2442bba6 Decompiler, refactor: reduce the number of classes needed to define a decompiler 2015-12-09 18:51:23 +03:00
Pavel V. Talanov
dc34d4fc31 Decompiler, minor: fix some strange code 2015-12-09 18:51:22 +03:00
Pavel V. Talanov
136e8d9d02 Refactor: repackage decompiler code and explicitly extract class file and js metafile parts 2015-12-09 18:51:21 +03:00
Dmitry Petrov
70c200d265 Fix diagnostic messages for properties.
Fix IDE tests.
Update quick fixes in IDE
(TODO: review new inheritance-related diagnostics with regards to quick fixes)
2015-12-09 17:43:48 +03:00
Dmitry Petrov
94bea54db3 Change "most specific return type" definition for fake overrides.
Given overridden descriptors D = d[i].
1. Find D*, subset of D:
  returnType(d* from D*) <: returnType(d) for each d from D.
  Always prefer var to val.
2. Prefer non-flexible return type to flexible.

Check for var/val overrides properly
(NB: this will report PROPERTY_TYPE_MISMATCH_ON_OVERRIDE
for all properties, not just overrides involving vars as it was before).
2015-12-09 17:43:48 +03:00
Dmitry Petrov
594039ac42 Delegation and overrides:
- Tests.
- No need for a separate diagnostic message regarding
return/property type conflict on override by delegation:
it is always a conflict of inherited signatures.
2015-12-09 17:43:48 +03:00
Dmitry Petrov
84824b1024 Fix KT-10194: skip incorrect delegates. 2015-12-09 17:43:48 +03:00
Dmitry Petrov
ef72c594c4 KT-1934 & KT-10197:
Naive approximation for fake overriding signature:
use upper bound for flexible types.
Check delegation errors.
2015-12-09 17:43:47 +03:00
Dmitry Petrov
6e2d42daf9 J2K: DelegationResolver.kt: convert to Kotlin 2015-12-09 17:43:47 +03:00
Dmitry Petrov
8f5df45edc J2K: DelegationResolver.kt 2015-12-09 17:43:47 +03:00
Dmitry Petrov
2fcb7e532b KT-1934: Fixing synthetic accessors hierarchy 2015-12-09 17:43:47 +03:00
Dmitry Petrov
135c30323b KT-1934 Check inherited signatures for compatibility
Overridden signatures should have compatible return types
(equal types for 'var').
Only relevant overrides should be taken into account.
Refactor inherited signatures check,
introduce a strategy interface for problem reporting.
2015-12-09 17:43:47 +03:00
Dmitry Jemerov
18e343d405 Merge pull request #795 from mcgee/KT-10124
#KT-10124 Fixed
2015-12-09 15:28:31 +01:00
Dmitry Jemerov
863e32c5cd Merge pull request #791 from mcgee/KT-9938
#KT-9938 Fixed
2015-12-09 15:17:31 +01:00
Andrey Breslav
83189013c6 Minor. Drop deprecated unary operator names from JS back-end 2015-12-09 17:10:30 +03:00
Andrey Breslav
0a0e4f1ba2 Minor. Clean up the code in OperatorChecker.kt 2015-12-09 17:10:30 +03:00
Andrey Breslav
3eeab68261 Signature checks fixed for plus() and minus() 2015-12-09 17:10:30 +03:00
Andrey Breslav
421f84e05a Error messages fixed for deprecations that have been made errors 2015-12-09 17:10:30 +03:00
Andrey Breslav
434082cadb 'yield' reserved as a keyword 2015-12-09 17:10:30 +03:00
Alexey Tsvetkov
e6bba01798 Increment cache version
Wildcard generation could cause source level incompatibility, so we should rebuild
2015-12-09 16:23:35 +03:00
Alexey Tsvetkov
c567376e35 Save class hierarchy to incremental caches
Author:    Alexey Tsvetkov <Alexey.Tsvetkov@jetbrains.com>
2015-12-09 16:23:35 +03:00
Alexey Tsvetkov
6ba5dcaa06 Simplify collection externalizers 2015-12-09 16:23:35 +03:00
Nikolay Krasko
8a95f23a23 Adjust formatting for FILE_ANNOTATION_LIST 2015-12-09 16:01:56 +03:00
Nikolay Krasko
966ad9d3b6 Move idea-repl module to ide group 2015-12-09 16:01:55 +03:00
Nikolay Krasko
a2d6bd09f3 Minor: allow to use ${file} directive in action text to reference file name 2015-12-09 16:01:53 +03:00
Nikolay Krasko
3374ac7606 Minor: More tests for warnings suppression 2015-12-09 16:01:52 +03:00
Nikolay Krasko
3c5b02e54a Minor: better diagnostic message in tests 2015-12-09 16:01:50 +03:00
Nikolay Krasko
789738c45f Minor: add fqname to dictionary 2015-12-09 16:01:49 +03:00
Dmitry Jemerov
e97e82d119 use terms "lambda expression" and "anonymous function" instead of "function literal" and "function expression" 2015-12-09 13:55:40 +01:00
mcgee
4a0e33003b #KT-9938 Fixed
Top level test case is added
2015-12-09 07:32:41 +03:00
Alexander Udalov
9a01c0d9cb Test that no delegated properties are used in critical classes in reflection 2015-12-08 22:59:00 +03:00
Stanislav Erokhin
cfed28c2ff Use CastImplicitClassReceiver for implicit this with smart cast 2015-12-08 20:42:55 +03:00
Stanislav Erokhin
b7e4fdf4d5 Add extensionReceiver to ScopeTowerLevel & use it in ImportingScopeBasedTowerLevel 2015-12-08 20:42:55 +03:00
Dmitry Jemerov
57b5588498 rename "Jet" to "Kotlin" in CFG classes 2015-12-08 16:54:09 +01:00
Dmitry Jemerov
3275542426 one more missing invokeLater() for plugin update checks (EA-76738 - Throwable: DebugUtil.currentStackTrace) 2015-12-08 16:45:40 +01:00
Dmitry Jemerov
d65c8fb06c double-check action parameters (EA-76026 - KNPE: ShowExpressionTypeAction.actionPerformed) 2015-12-08 16:45:39 +01:00
Dmitry Jemerov
0ec57e7fee add missing scope checks for highlight usages (EA-75896)
#KT-10038 Fixed
2015-12-08 16:45:19 +01:00
Stanislav Erokhin
10a13e737e Minor. Add isComputing to DeferredType 2015-12-08 17:29:55 +03:00
Stanislav Erokhin
11410000b4 Minor. Do not resolve implicit invoke for callable reference 2015-12-08 17:29:55 +03:00
Stanislav Erokhin
859a8adc31 Fix priority for functions without infix or operator modifier 2015-12-08 17:29:54 +03:00
Stanislav Erokhin
64b101785f Minor. Introduce util function 2015-12-08 17:29:54 +03:00
Alexey Sedunov
e82e4bcfc8 Inline Variable: Show error message on attempt to inline unused declaration 2015-12-08 16:21:08 +03:00
Alexey Sedunov
5c88a1c63e Inline Variable: Parenthesize arguments of the form "e1 < e2" if the next argument has the form "e1 > e2"
#KT-8261 Fixed
2015-12-08 16:21:07 +03:00
Alexey Sedunov
b2bdb8ed02 Inline Variable: Inline string template entries
#KT-7654 Fixed
2015-12-08 16:21:05 +03:00
Alexey Sedunov
0af2243245 J2K: KotlinInlineValHandler (conversion and refactoring) 2015-12-08 16:21:03 +03:00
Alexey Sedunov
2fef2763ab J2K: KotlinInlineValHandler (rename to .kt) 2015-12-08 16:21:02 +03:00
Alexey Sedunov
f4135a0a9f J2K: AbstractInlineTest 2015-12-08 16:21:00 +03:00
Alexey Sedunov
9df3ce018b J2K: AbstractInlineTest (rename to .kt) 2015-12-08 16:20:58 +03:00
Alexey Sedunov
f6b374f829 Inline Variable: Fix dialog text for non-local variables
#KT-6365 Fixed
2015-12-08 16:20:57 +03:00
Alexey Sedunov
e517cbcf78 Quick Fixes: Implement "Rename unresolved reference" fix
#KT-8795 Fixed
2015-12-08 16:20:56 +03:00
Alexey Sedunov
d850d7bbad Change Signature: Parenthesize functional type of receiver in the signature preview
#KT-8737 Fixed
2015-12-08 16:20:53 +03:00
Alexey Sedunov
8f8acf7a83 Pull Up: Drop default parameter values in function which becomes overriding. Disable function with default values if target class is the Java one
#KT-9833 Fixed
2015-12-08 16:20:52 +03:00
Alexey Sedunov
80051b8303 Create from Usage: Locate new declaration using RangeMarker
#KT-9197 Fixed
2015-12-08 16:20:50 +03:00
Alexey Sedunov
99c88cb0c5 Line Marking: Use new-style icons for Kotlin test classes/functions
#KT-10235 Fixed
2015-12-08 16:20:48 +03:00
Alexey Sedunov
8fcda32287 Unit Test Tooling: Support Go to Test/Create Test actions for top-level declarations
#KT-10133 Fixed
2015-12-08 16:20:47 +03:00
Denis Zharkov
ecac0f177b Fix order of type parameters loaded from PSI
#KT-10285 Fixed
2015-12-08 15:46:34 +03:00
Mikhail Glukhikh
d08f6f8238 DataFlowInfo Refactoring: getNullability() --> getCollectedNullability(); getPossibleTypes() --> getCollectedTypes() 2015-12-08 11:23:44 +03:00
Mikhail Glukhikh
57b3bc0496 Regression: getPredictableNullability for unnecessary safe call check #KT-10276 Fixed 2015-12-08 11:23:35 +03:00
Mikhail Glukhikh
2330ce2c28 Optimization: do not collect not-null types in DataFlowInfo.equate 2015-12-08 11:22:33 +03:00
Mikhail Glukhikh
5c9e55f3fb DFA bug fix: assignment of unstable to stable uses predictable type set (see test) 2015-12-08 10:13:38 +03:00
Mikhail Glukhikh
2e73bcb3a6 DFA bug fix: assignment of unstable to stable uses predictable nullability (see test) 2015-12-08 10:13:34 +03:00
Mikhail Glukhikh
96d0c4a1db Nullability bug fix in the source code 2015-12-08 10:13:22 +03:00
Mikhail Glukhikh
bfad9bd87f More exact unnecessary not-null assertion message #KT-3688 Fixed 2015-12-08 10:13:14 +03:00
Stanislav Erokhin
75245b3046 Rewrite TowerLevels. 2015-12-08 00:16:17 +03:00
Stanislav Erokhin
11c86405bf Fix ClassKind for Serializable and change ClassKind to INTERFACE for error classes. 2015-12-08 00:16:16 +03:00
Stanislav Erokhin
f2e60a0e11 Minor. Have to deal with error descriptors like previous resolution does. 2015-12-08 00:16:16 +03:00
Anton Sukhonosenko
da5f71773a #KT-9938 Fixed
Code review fixes
2015-12-07 22:48:47 +03:00
Zalim Bashorov
1e0b133e19 Find Nothing only in own arguments of generic type to make type raw and generate ''?" for contravariant position instead of use raw type 2015-12-07 19:25:59 +03:00
Alexander Udalov
fa77808319 Rename UpperBoundCheckerTask -> UpperBoundCheckRequest 2015-12-07 15:47:47 +03:00
Alexander Udalov
2dce7ad1e2 Add test on "inconsistent type parameter bounds"
It seems that all tests on that diagnostic were replaced in previous commits by
"repeated bound" and "no other bounds except a type parameter bound"
diagnostics
2015-12-07 15:47:47 +03:00
Alexander Udalov
d3c17ec337 Report error when type parameter has a type parameter bound and any other bound
To prevent issues with erasure on JVM: it's unclear what such type parameter
should be erased to
2015-12-07 15:47:47 +03:00
Alexander Udalov
b1fa740341 Do not report "inconsistent bounds" when there are repeated bounds
Also slightly refactor DeclarationsChecker#checkSupertypesForConsistency
2015-12-07 15:47:47 +03:00
Alexander Udalov
5fbb9bfe3b Report error on repeated upper bounds for type parameters 2015-12-07 15:47:47 +03:00
Alexander Udalov
21e64e02bd Report error on more than one class bound for type parameters
Such code may behave unexpectedly when compiled to JVM
2015-12-07 15:47:47 +03:00
Alexander Udalov
5541224288 Minor, add test on annotation on type argument 2015-12-07 15:47:47 +03:00
Anton Sukhonosenko
6b49ac6b46 #KT-9938 Fixed 2015-12-06 01:44:57 +03:00
Ilya Gorbunov
dc70c0d31e Move sequence interface definition to a separate file.
Merge SequnceJVM content into Sequences.
2015-12-05 02:40:27 +03:00
Ilya Gorbunov
a15ca7c374 Minor: rename file with sequences 2015-12-05 02:40:25 +03:00
Mikhail Glukhikh
5729855e4f Type parameter as result type: more precise expected type definition #KT-5385 Fixed
Tests for KT-5385 KT-10223 KT-7800 KT-7817 + something related
2015-12-04 19:00:24 +03:00
Natalia Ukhorskaya
51abb021bc Correct resource path for flavors in android-extensions-plugin 2015-12-04 17:21:37 +03:00
Natalia Ukhorskaya
c523817213 Do not cache AndroidModule in IDEAndroidLayoutXmlManager 2015-12-04 17:21:36 +03:00
Mikhail Glukhikh
408dd9bc9d Optimization: data flow info no more stores supertypes of the variable original type as possible types (dynamic is an exception) 2015-12-04 11:40:16 +03:00
Denis Zharkov
9c73502bdc Partially revert "Fix project source to overcome bootstrap problem"
Adjust code to new generic signatures generated by Kotlin compiler
This reverts commit 0fd2484bc9.
2015-12-04 10:19:48 +03:00
Nikolay Krasko
a19708693b Update kotlin run configuration editor
- Remove deprecated component for selecting JRE
- Update module selector
2015-12-04 01:03:26 +03:00
Nikolay Krasko
8683582c40 Fix red code in AbstractEditorForEvaluateExpressionTest.kt 2015-12-03 18:59:55 +03:00
Nikolay Krasko
703f39f492 Add icon for the project 2015-12-03 18:59:55 +03:00
Denis Zharkov
95cecdbc42 Support overrides of generic methods with erased version in Java 2015-12-03 18:19:36 +03:00
Denis Zharkov
4f06cece37 Refactor external overidability conditions
Before this change they could only negatively affect on result
Now they may force success result

Also refine overridavility condition for java fields:
two java fields having the same name are seen as overrides even
if they have different type
2015-12-03 18:19:36 +03:00
Denis Zharkov
8838e46578 Do not create KotlinTypeImpl with error scope while erasing
See assertion in KotlinTypeImpl init block
2015-12-03 18:19:36 +03:00
Denis Zharkov
e2b51f30ed Extract 'doSubstitute' parameters into SubstitutionConfiguration 2015-12-03 18:19:36 +03:00
Natalia Ukhorskaya
a197fc8cb8 Fix NoSuchMethod in android-extensions-plugin
#KT-10263 Fixed
2015-12-03 16:17:24 +03:00
Michael Bogdanov
4b8017e34b Fix for KT-7999: Wrong result when use nullable types as reified parameter, KT-8043: Unsafe cast to reified parameter throws NPE instead of TypeCastException
#KT-7999 Fixed
  #KT-8043 Fixed

~
2015-12-03 15:09:54 +03:00
Dmitry Jemerov
3478a6fb6c download markdown tagged with forKotlin, not latest build from master 2015-12-03 11:57:55 +01:00
Dmitry Jemerov
ce9012c352 fix compilation after changes in markdown library 2015-12-02 19:44:46 +01:00
Alexey Tsvetkov
d53cd3c70b Save system properties in incremental jps tests 2015-12-02 20:56:38 +03:00
Alexey Tsvetkov
73444ce59b Minor: refactor shouldRebuildBecauseVersionChanged 2015-12-02 20:56:37 +03:00
Alexey Tsvetkov
7fff17ba7c Minor: rename CACHE_DIRECTORY_NAME->KOTLIN_CACHE_DIRECTORY_NAME 2015-12-02 20:56:37 +03:00
Alexey Tsvetkov
7063e1f56a Do not mark dirty same files 2015-12-02 20:56:37 +03:00
Alexey Tsvetkov
4800cff87f Do not recompile files compiled in current round 2015-12-02 20:56:37 +03:00
Alexey Tsvetkov
19089f8b17 Prevent processing changes if all kotlin in chunk was rebuilt 2015-12-02 20:56:37 +03:00
Alexey Tsvetkov
87f09ab5b0 Introduce FSOperationsHelper to mark files dirty 2015-12-02 20:56:37 +03:00
Alexey Tsvetkov
98e0905eb3 Minor: add java to test case 2015-12-02 20:56:37 +03:00
Alexey Tsvetkov
3d3d670cd7 Minor: move check inside hasDirtyOrRemovedKotlin 2015-12-02 20:56:37 +03:00
Alexey Tsvetkov
60a8db1c6c Do not use USER_DATA to preserve data between compilation rounds 2015-12-02 20:56:36 +03:00
Alexey Tsvetkov
a447c39f69 Kotlin incremental cache version change should not affect java only modules 2015-12-02 20:56:36 +03:00
Alexey Tsvetkov
b1b0da5228 Minor: add description to key 2015-12-02 20:56:36 +03:00
Alexey Tsvetkov
c9012b10c5 Simplify lazy caches tests 2015-12-02 20:56:36 +03:00
Alexey Tsvetkov
aea6ad0f0c Move CacheVersion properties to constructor 2015-12-02 20:56:36 +03:00
Alexey Tsvetkov
e90dc047bd Test turning incremental compilation on/off 2015-12-02 20:56:36 +03:00
Alexey Tsvetkov
a8b551e518 Test versioning of experimental incremental compilation 2015-12-02 20:56:36 +03:00
Alexey Tsvetkov
69c906014f Enable separate versioning for experimental incremental compilation 2015-12-02 20:56:35 +03:00
Pavel V. Talanov
d20fb5ddd7 BuilderFactoryForDuplicateSignatureDiagnostics: report diagnostics lazily 2015-12-02 20:44:53 +03:00
Dmitry Jemerov
05a62c5892 avoid unnecessary reads of file content during indexing 2015-12-02 18:09:19 +01:00
Dmitry Jemerov
f9306d9c3c KotlinBinaryClassCache: J2K 2015-12-02 18:09:18 +01:00
Dmitry Jemerov
3abbdb4d15 KotlinBinaryClassCache: rename to .kt 2015-12-02 18:09:17 +01:00
Anton Sukhonosenko
5bc70b3150 #KT-10124 Fixed 2015-12-02 20:03:13 +03:00
Mikhail Glukhikh
dd3b85dca3 Pseudocode refactoring: repeatPart + repeatWhole 2015-12-02 18:15:03 +03:00
Mikhail Glukhikh
ea3a65d0b8 Additional tests for KT-10243 2015-12-02 18:14:59 +03:00
Pavel V. Talanov
b9ce9f8576 Script, IDE: tweak extract based refactorings to behave better in scripts
Fix not being able to invoke introduce variable for top level script expression
Prohibit introduce parameter and introduce property for scripts on top level
Basic test for introduce function (produces red code atm)
2015-12-02 15:14:25 +03:00
Alexey Sedunov
ffd8863875 Extract Function: Add support for member extension properties 2015-12-02 13:54:05 +03:00
Alexey Sedunov
39b46bb3ef Extract Function: Add support for member extension functions 2015-12-02 13:54:04 +03:00
Alexey Sedunov
6abf13be41 Extract Function: Consider member property with invoke() a receiver candidate
#KT-9774 Fixed
2015-12-02 13:54:03 +03:00
Alexey Sedunov
03e1480476 Extraction Engine: Get rid of explicit element offset manipulation and use copyable user data instead 2015-12-02 13:54:02 +03:00
Alexey Sedunov
44bc937499 Shorten References: Fix removal of explicit companion references in the position of callee expression
#KT-10102
2015-12-02 13:54:01 +03:00
Alexey Sedunov
2dcc38b92f Create from Usage: Forbid "Create parameter/local variable/property" on label references
#KT-10119 Fixed
2015-12-02 13:54:00 +03:00
Alexey Sedunov
3c87ccc5ff Move File: Reimplement Move dialog for Kotlin files. Do not show "Search for references" option (consider it true in all cases)
#KT-10118 Fixed
2015-12-02 13:53:59 +03:00
Alexey Sedunov
bcadfd4661 Introduce Variable: Suggest choosing between single variable and
multi-declaration. Forbid multi-declaration for collections and arrays
 #KT-10242 Fixed
2015-12-02 13:46:47 +03:00
Ilya Chernikov
c1c6d0ee3a fixes after review 2015-12-02 10:30:56 +01:00
Ilya Chernikov
6313ecac1c another attempt to fix parallel compilation - enabling keepalive in compiler use sites, but in jps taking parallel compilation option into account, so it should be now not set in tests 2015-12-02 10:30:56 +01:00
Mikhail Glukhikh
60e457167d Creating deep copy of local function declaration instructions in CFA, regression test #KT-10243 Fixed 2015-12-01 23:40:50 +03:00
Stanislav Erokhin
36206ddf6d Minor. Enable assertion for dist. 2015-12-01 20:44:27 +03:00
Ilya Gorbunov
b7a50b333e Better replacement for containsAll, removeAll, retainAll with incompatible types. 2015-12-01 20:35:46 +03:00
Alexander Udalov
2821448dd8 Minor, simplify kdoc for KClass#qualifiedName 2015-12-01 20:20:48 +03:00
Stanislav Erokhin
8807cd828f Removed MemberScope.getPackage 2015-12-01 15:38:04 +03:00
Stanislav Erokhin
846fb397c4 Collect all candidates for completion 2015-12-01 15:38:04 +03:00
Stanislav Erokhin
2b66af29aa Added debug info 2015-12-01 15:38:03 +03:00
Stanislav Erokhin
22b14cfc5c Fix missing smart casts 2015-12-01 15:38:03 +03:00
Stanislav Erokhin
3776e5698f Removed hidden descriptors from new resolve 2015-12-01 15:38:03 +03:00
Stanislav Erokhin
e92c314b46 Base dynamic support in new resolve 2015-12-01 15:38:02 +03:00
Stanislav Erokhin
2987576a0a Minor. fix applicability level for UsedSmartCastForDispatchReceiver 2015-12-01 15:38:02 +03:00
Stanislav Erokhin
5edadfe8ea Refactor ScopeTowerProcessor 2015-12-01 15:38:01 +03:00
Stanislav Erokhin
bc49825f55 Fix testLib test 2015-12-01 15:38:01 +03:00
Pavel V. Talanov
aa1a08fe7a Minor, getModuleInfo: improve on failure messages 2015-12-01 14:53:16 +03:00
Pavel V. Talanov
bc816851f1 getModuleInfo: Provide utility to default to null instead of logging an error
Use it to workaround cases when java resolve references some unexpected classes/files, referencing non-physical Dummy.java in particular
2015-12-01 14:53:15 +03:00
Pavel V. Talanov
5e35be347c getModuleInfo: Correct module info for members of light classes for decompiled Kotlin classes 2015-12-01 14:53:12 +03:00
Natalia Ukhorskaya
dc60c025c3 Support Evaluate Expression for renamed local variables in inline function
#KT-10179 Fixed
2015-12-01 11:48:43 +03:00
Natalia Ukhorskaya
cd5e406876 Minor: fix warnings 2015-12-01 11:48:41 +03:00
Natalia Ukhorskaya
a1f3c5381e Rename local variable for this in inline function 2015-12-01 11:48:41 +03:00
Michael Bogdanov
a932315bf9 Rename local vars from inlined function
#KT-9798 Fixed
2015-12-01 11:48:40 +03:00
Natalia Ukhorskaya
5073b1d372 Don't skip inlined this 2015-12-01 11:48:39 +03:00
Natalia Ukhorskaya
29778311e8 Drop unnecesary logic about additional context for lambda in debugger 2015-12-01 11:48:38 +03:00
Dmitry Petrov
f34f7556bc KT-10192 got fixed due to new if/when check
(which doesn't depend on the expected type for expression)
 #KT-10192 Fixed
2015-12-01 10:36:40 +03:00
Dmitry Petrov
76931affc6 KT-10139:
Non-exhaustive 'when' without 'else' used in expression is an error
regardless of expected type: it can't be an expression, even of type Unit.
2015-12-01 10:36:40 +03:00
Dmitry Petrov
1a3a296827 KT-10139: any if without else used in expression is an error
regardless of expected type: it can't be an expression, even of type Unit.

 #KT-10139 Fixed
2015-12-01 10:36:40 +03:00
Denis Zharkov
b0dab4c67a Add minor changes after review
- Rename GENERIC_TYPE -> GENERIC_ARGUMENT
- Make 'callableDescriptor' nullable
2015-12-01 08:21:03 +03:00
Denis Zharkov
0fd2484bc9 Fix project source to overcome bootstrap problem 2015-12-01 08:21:02 +03:00
Denis Zharkov
c4bc2c9ba6 J2K Renderer: convert and make contravariant 2015-12-01 08:21:02 +03:00
Denis Zharkov
5a5889e3f3 J2K Renderer: .java -> .kt 2015-12-01 08:21:01 +03:00
Denis Zharkov
303c756302 Refine generic signature for fields
- For vals use the same semantics as for return types
- For vars use the same semantics as for value parameters
2015-12-01 08:21:01 +03:00
Denis Zharkov
64e0af48ed Minor. Change default for needPrimitiveBoxing 2015-12-01 08:21:01 +03:00
Denis Zharkov
ddb67d6c9c Support JvmSuppressWildcards and JvmWildcard annotations
#KT-9898 Fixed
2015-12-01 08:21:00 +03:00
Denis Zharkov
6292833a69 Refine generic signature for Map.get/remove
Before this change generic signature wasn't written because of wrong
assumption about it absence in all cases where we replace generic parameter
with Object
2015-12-01 08:21:00 +03:00
Denis Zharkov
20cbceb56d Add temporary hack for wildcards in Collections
By default we would render 'MutableCollection<String>.addAll(Collection<String>)' as
'(LCollection<String>;)' (without wildcard) because String is final and
effectively it's the same as '(LCollection<? extends String>;)'.

But that's wrong signature in a sense that java.util.Collection has different
signature: '(LCollection<? extends E>)'.

Actually the problem is much wider than collections,
it concerns any Java code that uses Kotlin classes with covariant
parameters without '? extends E' wildcards.

Temporary solution is just to hardcode/enumerate builtin methods
with special signature.
2015-12-01 08:20:59 +03:00
Denis Zharkov
0255be7deb Minor. Pass callableDescriptor into writeParameter 2015-12-01 08:20:59 +03:00
Denis Zharkov
406e31f54a Change default rules for declaration-site wildcards
Mostly this commit is about skipping wildcards that are redundant in some sense.
The motivation is that they looks `long` in Java code.

There are basically two important parts: return types and value parameters.

1. For return types default behaviour is skipping all declaration-site wildcards.
The intuition behind this rule is simple: return types are basically used in subtype position
(as an argument for another call), and here everything works well in case of 'out'-variance.
For example we have 'Out<Out<T>>>' as subtype both for 'Out<Out<T>>>' and 'Out<? extends Out<? extends T>>>',
so values of such type is more flexible in contrast to `Out<? extends Out<? extends T>>>` that could be used only
for the second case.

But we have choosen to treat `in`-variance in a different way: argument itself
should be rendered without wildcard while nested arguments are rendered by the rules
described further (see second part).

For example: 'In<Out<OpenClass>>' will have generic signature 'In<Out<? extends OpenClass>>'.
If we omit all wildcards here, then value of type 'In<Out<OpenClass>>'
will be impossible to use as argument for function expecting 'In<? super Out<? extends Derived>>'
where Derived <: OpenClass (you can check it manually :]).

And this exception should not be very inconvinient because in-variance is rather rare.

2. For value parameters we decided to skip wildcards if it doesn't make obtained signature weaker
in a sense of set of acceptable arguments.

More precisely:
    a. We write wildcard for 'Out<T>' iff T ``can have subtypes ignoring nullability''
    b. We write wildcard for 'In<T>' iff T is not equal to it's class upper bound (ignoring nullability again)

Definition of ``can have subtypes ignoring nullability'' is straightforward and you can see it in commit.

 #KT-9801 Fixed
 #KT-9890 Fixed
2015-12-01 08:20:59 +03:00
Denis Zharkov
1731cb8b40 Make jvmSignature optional in WriteSignatureTest 2015-12-01 08:20:58 +03:00
Denis Zharkov
917420f332 Convert TypeMappingMode from enum to plain class with constant instances 2015-12-01 08:20:58 +03:00
Denis Zharkov
faf1e17888 Introduce TypeMappingMode.toGenericArgumentMode 2015-12-01 08:20:57 +03:00
Denis Zharkov
ef2bc28463 Minor. Rename TypeMappingMode entries 2015-12-01 08:20:57 +03:00
Denis Zharkov
d22aaf9d52 Introduce writeDeclarationSiteProjections option into TypeMappingMode 2015-12-01 08:20:57 +03:00
Denis Zharkov
d8297cd6f1 Extract, rename and konvert TypeMappingMode 2015-12-01 08:20:56 +03:00
Denis Zharkov
6cf7cd5c07 Minor. Rename VALUE -> DEFAULT 2015-12-01 08:20:56 +03:00
Denis Zharkov
8a748703c8 Simplify type mapping for builtin types 2015-12-01 08:20:55 +03:00
Ilya Gorbunov
e5dd719eec Fix warning about incompatible types. 2015-12-01 01:35:19 +03:00
Ilya Gorbunov
0ffce06356 Hide toMap with keySelector
#KT-6657
2015-12-01 01:18:46 +03:00
Ilya Gorbunov
ea60ab74a7 Replace deprecated toMap usages with toMapBy 2015-12-01 01:18:44 +03:00
Ilya Gorbunov
f107559a3c Docs: proper pluralization of 'entry' 2015-12-01 01:18:21 +03:00
Ilya Gorbunov
6ca647aecd Minor: cleanup asSequence() documentation. 2015-12-01 01:18:19 +03:00
Ilya Gorbunov
f596d9ac23 Provide asIterable also for CharSequences, Maps and Iterables.
KT-10152 Fixed
2015-12-01 01:18:18 +03:00
Andrey Breslav
45db5db7e8 Forbid prefixes and suffixes for numeric literals 2015-11-30 19:36:33 +03:00
Andrey Breslav
8544a5ab5f Remove "This" keyword 2015-11-30 19:36:33 +03:00
Andrey Breslav
aca355acdc '...' reserved as a token
KT-9708 Ambiguous syntax for Double ranges: `.1...2` (triple dot)

 #KT-9708 Fixed
2015-11-30 19:36:33 +03:00
Alexander Udalov
877129340f Revert "Rename Extension annotation to ExtensionFunctionType"
This reverts commit 460dad135c.

The old compiler will not see the new runtime correctly. Postponing this until
1.0
2015-11-30 19:24:58 +03:00
Alexander Udalov
745809c666 Rename TestlibTest -> StdlibTest 2015-11-30 19:19:20 +03:00
Mikhail Glukhikh
fe04cc513b Original type is taken into account when intersecting possible types in resolve #KT-10232 Fixed 2015-11-30 19:09:44 +03:00
Alexander Udalov
db2521ee67 Rework TestlibTest, use JUnit console runner instead of manual suite
The problem with the manually created suite was that it was created in setUp()
and so a lot of the hard work (compilation, test case lookup) was happening in
setUp(). If any exception is thrown in setUp(), tearDown() is not called,
leaving the application (~9000+ subsequent tests) in the inconsistent state.

Support JUnit 4 tests via JUnit4TestAdapter. Previously only a small number of
test classes were actually run because this test was looking only for JUnit 3
testcases.

Delete FilesTest#relativePath because it was testing a deprecated function
and was failing if run from the project root
2015-11-30 18:58:00 +03:00
Natalia Ukhorskaya
74b6f70c80 JDIEval: do not disable collection when invoke method using reflection 2015-11-30 18:46:40 +03:00
Michael Bogdanov
df1641ff9b Fix for KT-10047: java.lang.VerifyError: Bad return type
#KT-10047 Fixed
2015-11-30 18:44:13 +03:00
Pavel V. Talanov
54addb4b1e Script run configuration: Set working directory to a directory containing script file by default 2015-11-30 18:21:06 +03:00
Pavel V. Talanov
5a55ee332e FileBasedDeclarationProviderFactory: stable order of files
Fixes DiagnosticsTestGenerated#testScriptAndClassConflict
2015-11-30 18:21:06 +03:00
Pavel V. Talanov
4a1c3f02fd Add basic tests for KotlinStandaloneScriptRunConfiguration 2015-11-30 18:21:05 +03:00
Pavel V. Talanov
7577a375ae Minor: use script name generating code to generate names for script run configurations 2015-11-30 18:21:04 +03:00
Pavel V. Talanov
d6c7029c77 Compiler, Scripts: strip stacktrace when reporting exception on script execution 2015-11-30 18:21:04 +03:00
Pavel V. Talanov
567f946cb0 K2JVMCompiler: Do not report perf in script mode 2015-11-30 18:21:03 +03:00
Pavel V. Talanov
34793e63c7 Allow to run kts files as scripts from ide
Introduce KotlinStandaloneScriptRunConfiguration: configuration, type, producer, settings editor
2015-11-30 18:21:03 +03:00
Pavel V. Talanov
337701670c Refactor script registering in frontend and jvm backend 2015-11-30 18:21:02 +03:00
Pavel V. Talanov
6520e9aed6 Refactor: AnalyzerScriptParameter -> ScriptParameter 2015-11-30 18:21:02 +03:00
Pavel V. Talanov
0d10f0fcf9 Minor: Remove direct usages of ScriptNameUtil 2015-11-30 18:21:01 +03:00
Pavel V. Talanov
7956ebe46c Move script related stuff into a separate package 2015-11-30 18:21:00 +03:00
Pavel V. Talanov
89081d487f J2K KotlinScriptDefinition and simplify 2015-11-30 18:21:00 +03:00
Alexey Sedunov
15b7eca665 Move: Detect extension declaration by PSI instead of descriptor as extension descriptor maybe wrapper for Java method
#KT-10203 Fixed
2015-11-30 16:27:23 +03:00
Michael Bogdanov
1bf521c645 Don't generate accessors for @JvmField properties in primary constructor 2015-11-30 16:24:05 +03:00
Mikhail Glukhikh
de37cb8f40 Generic types may not extend kotlin.Throwable #KT-9816 Fixed 2015-11-30 15:24:32 +03:00
Mikhail Glukhikh
c6be69a483 No more reified types for catch parameter #KT-9742 Fixed 2015-11-30 15:24:24 +03:00
Dmitry Petrov
f0e467e474 Rewrite mixed multiple- and single-condition 'when' properly.
#KT-10229 Fixed
2015-11-30 14:43:03 +03:00
Ilya Gorbunov
f7a780f32c Extension contains for ranges: rename parameter item to value. 2015-11-30 14:12:11 +03:00
Ilya Gorbunov
b4256f0c89 Replace increment with step in For Loop codegen for progressions 2015-11-30 14:12:10 +03:00
Ilya Gorbunov
661e288362 Introduce 'step' property in progressions instead of 'increment' 2015-11-30 14:12:05 +03:00
Natalia Ukhorskaya
b8d0685b71 Do not analyze imports in codeFragments
EA-76222 - assert: GetModuleInfoKt$getModuleInfo$.invoke Fixed
2015-11-30 12:38:15 +03:00
Natalia Ukhorskaya
d0355a793b Write lineNumbers for constructors 2015-11-30 12:25:51 +03:00
Natalia Ukhorskaya
3ec383dfca Debugger: find context element in file copy using UserData 2015-11-30 12:25:50 +03:00
Natalia Ukhorskaya
0d984ce8e2 Refactor AbstractLineNumberTest using assertEqualsToFile 2015-11-30 12:25:50 +03:00
Natalia Ukhorskaya
076e9c8dd1 Use debugProcess scope in KotlinPositionManager 2015-11-30 12:25:49 +03:00
Natalia Ukhorskaya
028016412e Convert DebuggerUtils to kotlin 2015-11-30 12:25:48 +03:00
Natalia Ukhorskaya
1136c5f54b Rename DebuggerUtils.kt 2015-11-30 12:25:48 +03:00
Natalia Ukhorskaya
e3e5fce3eb Minor: fix warnings in SmartStepIntoHandler 2015-11-30 12:25:47 +03:00
Natalia Ukhorskaya
9bcc9e4b1d Smart step into for constructors 2015-11-30 12:25:46 +03:00
Natalia Ukhorskaya
062b27995c Debugger: do not change package name for debug function 2015-11-30 12:25:45 +03:00
Natalia Ukhorskaya
002aaaa908 Debugger: fix imports if context element is inside inline lambda 2015-11-30 12:25:45 +03:00
Natalia Ukhorskaya
d2ef7b0ae0 Minor: get line start without whitespaces in KotlinExtraVariablesProvider
#KT-10183 Fxied
2015-11-30 12:25:44 +03:00
Natalia Ukhorskaya
0d486e1cfc Minor: fix warnings 2015-11-30 12:25:43 +03:00
Michael Nedzelsky
9a0520b30e fix EA-76198 (assert: KtElementImplStub.getContainingKtFile) 2015-11-30 10:49:03 +03:00
Alexander Udalov
460dad135c Rename Extension annotation to ExtensionFunctionType 2015-11-30 02:51:04 +03:00
Ilya Gorbunov
0a47d1cac2 Restore deprecated InputStream.iterator() with a replacement. 2015-11-29 04:38:28 +03:00
Ilya Gorbunov
941167e241 Revert "Drop deprecated toGenerator and toLinkedList." until RC 2015-11-29 04:37:45 +03:00
Ilya Gorbunov
f8fe3e6c1d Restore dropped hidden declarations for binary compatibility until RC. 2015-11-29 04:37:35 +03:00
Nikolay Krasko
9e0e3aaebb Don't insert {} after 'else' and 'try' in infinished statements 2015-11-28 20:22:28 +03:00
Ilya Gorbunov
5301f3eb46 Fix contains usages in compiler. 2015-11-28 07:21:39 +03:00
Ilya Gorbunov
54b415593a Replacement upcasts parameter to the most specific supertype in case of contains, indexOf, lastIndexOf, remove, get, containsKey, containsValue. 2015-11-28 07:21:38 +03:00
Ilya Gorbunov
de86e90103 Generate indexOf and lastIndexOf extensions for List. 2015-11-28 07:20:27 +03:00
Ilya Gorbunov
c7d08ea599 Remove *Raw method usages from tests 2015-11-28 07:20:25 +03:00
Ilya Gorbunov
a25f23a286 Apply @OnlyInputTypes on type parameter for contains, indexOf, lastIndexOf extensions for Iterables, Sequences and Arrays instead of @NoInfer on element parameter.
Provide covariant extensions annotated with @OnlyInputTypes:
 - Collection<T>: containsAll(Collection<T>),
 - MutableCollection<out T>: remove(T), removeAll, retainAll (Collection<T>),
 - List<T>: indexOf(T), lastIndexOf(T)
 - Map<out K, V>: get(K), containsKey(K), contains(K)
 - Map<K, V>: containsValue(V)
 - MutableMap<out K, V>: remove(K)
All *Raw extensions are deprecated.
2015-11-28 07:20:24 +03:00
Alexander Udalov
f6616e6e42 Minor, improve assertion message 2015-11-27 23:35:20 +03:00
Alexander Udalov
9e7e75de12 Rename ExternalSignatureResolver -> SignaturePropagator 2015-11-27 23:34:47 +03:00
Alexander Udalov
57e75a1b28 Drop deprecated code in ModuleMapping, add TODO 2015-11-27 23:34:46 +03:00
Alexander Udalov
6345d0e6d3 Remove obsolete FallbackPaths 2015-11-27 23:34:46 +03:00
Alexander Udalov
bcdea8ef10 Minor, rename dangerous getInternalName(), remove unused
FQ name can only be converted to an internal name correctly if it represents a
top-level class
2015-11-27 23:34:45 +03:00
Alexander Udalov
7b3b157707 Remove PropertyMetadata from project and bytecode, migrate code to KProperty 2015-11-27 23:34:34 +03:00
Alexander Udalov
fb61dc7e81 Fix potential deadlock on lazy vs storage manager 2015-11-27 21:41:26 +03:00
Alexander Udalov
caa6cdb3f7 Remove obsolete code in KotlinBuilder, rename PackageClassUtils 2015-11-27 21:41:26 +03:00
Alexander Udalov
8594cfca46 Remove kotlin.jvm.internal.KotlinPackage and corresponding code 2015-11-27 21:22:04 +03:00
Alexander Udalov
ad6888dac6 Drop KPackage and deprecated stuff from Reflection/ReflectionFactory 2015-11-27 21:22:04 +03:00
Alexander Udalov
8a5b63a669 Inline PLATFORM_TYPES = true, simplify signature propagation 2015-11-27 21:22:04 +03:00
Alexander Udalov
417a27f3b1 Minor, get rid of AlternativeMethodSignature in irrelevant place 2015-11-27 21:22:04 +03:00
Alexander Udalov
fa34ebac4a Delete KotlinSignature and corresponding code 2015-11-27 21:22:04 +03:00
Alexander Udalov
d472154ea7 Remove KotlinSignature from tests, spec, delete tests with errors 2015-11-27 21:22:04 +03:00
Alexander Udalov
9cdeac7839 Fix exception in tower resolution on inner class constructors 2015-11-27 21:20:53 +03:00
Ilya Chernikov
96a9634ace using mapNotNull insteand of map + filterNotNull 2015-11-27 19:04:05 +01:00
Ilya Chernikov
fd81063134 Renaming daemon main object, so it is better recognizable in jps/ps output 2015-11-27 19:04:05 +01:00
Ilya Chernikov
c76bec51a0 Moving daemon files, renaming namespaces, modules and jar 2015-11-27 19:04:04 +01:00
Ilya Chernikov
312e931582 Code cleanup - removing public modifier, obsolete constants, fixing typos, etc. 2015-11-27 19:04:03 +01:00
Ilya Chernikov
9869fc4305 fixes after review 2015-11-27 19:04:03 +01:00
Ilya Chernikov
231949803a fixing tests 2015-11-27 19:04:02 +01:00
Ilya Chernikov
336f6de2ee Passing a log file name in logger-compatible format on Windows in tests, fixes problems with daemon tests on Windows 2015-11-27 19:04:01 +01:00
Ilya Chernikov
d3797619af Some basic daemon lifetime tests 2015-11-27 19:04:01 +01:00
Ilya Chernikov
0c27bb7170 implementing equals and hashCode for CallResult classes, making get polymorphic via virtual method 2015-11-27 19:04:00 +01:00
Ilya Chernikov
6867023274 Cleanup after compilation in daemon 2015-11-27 19:04:00 +01:00
Ilya Chernikov
85b487cd84 Implementing graceful shutdown, fattest daemon elections and some minor refactorings in daemon and client behavior 2015-11-27 19:03:59 +01:00
Ilya Chernikov
2612ce56b4 Implementing new logic of choosing the daemon, startup and shutdown, some related refactorings and fixes 2015-11-27 19:03:58 +01:00
Ilya Chernikov
375679677c Implementation of the new daemon management without inter-daemon elections and with few other simplifications 2015-11-27 19:03:58 +01:00
Yan Zhulanow
1643441fdb Minor: fix quickfix tests (get/set functions are now created correctly, merge issue) 2015-11-27 20:30:19 +03:00
Mikhail Glukhikh
8788d8e2d5 Call chains: receiver data flow info is dropped for extensions with nullable receiver #KT-10056 Fixed 2015-11-27 20:23:25 +03:00
Mikhail Glukhikh
97cdaba8b0 Refactoring of getQualifiedExpressionTypeInfo 2015-11-27 17:39:56 +03:00
Mikhail Glukhikh
ea4f167091 Calls to non-@JvmStatic protected members of companion objects from subclasses are now errors (unsupported yet) 2015-11-27 15:58:38 +03:00
Yan Zhulanow
e39ca63bcc Android Extensions: Fix Android JPS plugin 2015-11-27 15:51:11 +03:00
Yan Zhulanow
2cbf9d7e9b Add empty Android Extensions plugin 2015-11-27 15:51:11 +03:00
Yan Zhulanow
3d6bdd14b2 Minor: fix AbstractAndroidSyntheticPropertyDescriptorTest test, sort descriptors 2015-11-27 15:51:11 +03:00
Yan Zhulanow
d21985493e Mark functions with 'operator' in JS stdlib 2015-11-27 15:51:11 +03:00
Yan Zhulanow
9d1af5a17e Fix tests: "infix modifier required" and "operator modifier required" errors 2015-11-27 15:51:11 +03:00
Yan Zhulanow
a3ff3ffc45 Fix tests: "Placing function type parameters after the function name" error 2015-11-27 15:51:11 +03:00
Yan Zhulanow
3001af56c9 Mark SAM adapter functions as infix or operator if the original function is marked as such 2015-11-27 15:51:11 +03:00
Yan Zhulanow
b7fcbff75c Some deprecation warnings are now errors 2015-11-27 15:51:11 +03:00
Yan Zhulanow
278f1cd6ef Fix "Placing function type parameters after the function name" errors in project 2015-11-27 15:51:11 +03:00
Yan Zhulanow
87799e9b6b Fix "operator modifier required" errors in project 2015-11-27 15:51:11 +03:00
Yan Zhulanow
46ac3571d5 Fix "infix modifier required" errors in project 2015-11-27 15:51:11 +03:00
Zalim Bashorov
d1c5bd4526 Minor: remove unused parameter from LookupTracker.record 2015-11-27 15:08:06 +03:00
Zalim Bashorov
7faa886d26 Minor: add more logging in KotlinBuilder 2015-11-27 15:07:57 +03:00
Michael Nedzelsky
5f13dc31f1 ConstantExpressionEvaluator: code cleanup, get rid of weak warnings 2015-11-27 14:29:47 +03:00
Michael Nedzelsky
9aae5e6457 fix KT-9553 Invalid const initializers must be compile-time errors
#KT-9553 Fixed
2015-11-27 14:29:44 +03:00
Nikolay Krasko
18f892892c Update to idea 143.1015.7 2015-11-26 22:16:43 +03:00
Alexey Sedunov
e37eea2b2d Create from Usage: Add infix modifier to functions generated from binary expressions
#KT-10184 Fixed
2015-11-26 21:22:20 +03:00
Alexey Sedunov
5b90c09ab1 Create from Usage: Add operator modifier to indexing get/set functions
#KT-10185 Fixed
2015-11-26 21:22:18 +03:00
Alexey Sedunov
7a40239e64 Introduce Variable: Support destructuring declarations
#KT-6262
2015-11-26 21:22:16 +03:00
Alexey Sedunov
09f8aafb77 Change Signature: Drop 'override' keyword when changing function/property, but not its overriden declarations
#KT-9470 Fixed
2015-11-26 21:22:15 +03:00
Michael Nedzelsky
2fa34ae170 KT-9883 prohibit using spread operator for nullable value
#KT-9883 Fixed
2015-11-26 19:42:34 +03:00
Stanislav Erokhin
63fa71606f Create new Tower Resolve 2015-11-26 16:21:49 +03:00
Stanislav Erokhin
c08545359e Minor. Changes after review 2015-11-26 16:21:47 +03:00
Stanislav Erokhin
ebc3ccbb2a Fixed scope kind for default values 2015-11-26 16:21:47 +03:00
Stanislav Erokhin
a502405779 Fixed scope creations for properties scopes. 2015-11-26 16:21:46 +03:00
Stanislav Erokhin
67abdd755f Created kind in LexicalScope 2015-11-26 15:40:00 +03:00
Stanislav Erokhin
f06f557dae Minor. introduce CallResolver.TaskContextForMigration 2015-11-26 15:38:17 +03:00
Michael Bogdanov
2d3d526ccd Fix for KT-10110: ClassReader$BadClassFile undeclared type variable: E
#KT-10110 Fixed
2015-11-26 13:29:30 +03:00
Dmitry Petrov
9ccb1fd506 KT-9601, KT-10103:
Chose maximally specific function in callable reference
 #KT-9601 Fixed
 #KT-10103 Fixed
2015-11-26 12:52:12 +03:00
Natalia Ukhorskaya
67dd97b918 Mark bridge methods in lambdas classes as synthetic
#KT-10101 Fixed
2015-11-26 11:39:19 +03:00
Natalia Ukhorskaya
cb80a3e83a Write lineNumber for function literal with void return value
#KT-9865 Fixed
2015-11-26 11:39:18 +03:00
Natalia Ukhorskaya
4a2e4312ea Write lineNumber when inline function result is written to property 2015-11-26 11:39:17 +03:00
Natalia Ukhorskaya
f40e3857fa KotlinOutputParser: do not amend next line to warnings
#KT-9678 Fixed #KT-10129 Fixed
2015-11-26 11:39:16 +03:00
Natalia Ukhorskaya
0d80b4f8b0 Fix compatibility with AS 2.0 (for master branch) 2015-11-26 11:39:16 +03:00
Natalia Ukhorskaya
48027f5fb5 Fix compatibility with AS 2.0
#KT-10153 Fixed
2015-11-26 11:39:15 +03:00
Ilya Gorbunov
ca4bdd23e0 Provide flatten for sequence of iterables.
#KT-9977
2015-11-26 00:45:15 +03:00
Ilya Gorbunov
4181142400 Deprecate sequenceOf(Progression). 2015-11-26 00:45:15 +03:00
Ilya Gorbunov
8440c196d1 GeneratorSequence: do not get first value, until it's requested by iterator, allow initialValue to be null and return EmptySequence in this case.
#KT-9153 Fixed
2015-11-26 00:45:15 +03:00
Nikolay Krasko
29a9ba64ca Move creating sink for extra diagnostics into generation state to take responsibility for correct diagnostics suppression 2015-11-26 00:24:38 +03:00
Nikolay Krasko
652eeca872 Allow suppress additional diagnostics for JVM target
Suppression doesn't work without resolved annotation in binding context.
2015-11-26 00:24:38 +03:00
Nikolay Krasko
5bb141381b Refactoring: replace condition with function 2015-11-26 00:24:38 +03:00
Nikolay Krasko
7622e90438 Filter diagnostics during creating cache 2015-11-26 00:24:38 +03:00
Nikolay Krasko
7baf58b5de Refactoring: mark all fields in PositionStrategies with @JvmFileld and fix warnings 2015-11-26 00:24:38 +03:00
Nikolay Krasko
d80c5ec7f7 Minor: clean warnings in ErrorsJvm 2015-11-26 00:24:38 +03:00
Nikolay Krasko
03fe5125cb Minor: remove warnings 2015-11-26 00:24:38 +03:00
Stanislav Erokhin
28226906da Minor. removed usages ExpressionReceiverImp 2015-11-25 20:53:40 +03:00
Stanislav Erokhin
f0cefd5583 Create hacks for magic annotations NoInfer, OnlyInputTypes and LowPriorityInOverloadResolution. 2015-11-25 20:53:39 +03:00
Ilya Gorbunov
1be4f795ed Fix testData after deprecated toLinkedList and joinToString were dropped. 2015-11-25 18:35:04 +03:00
Ilya Gorbunov
229504f42d Byte iterator only available for buffered input streams,
InputStream.buffered() returns BufferedInputStream.
2015-11-25 18:35:03 +03:00
Ilya Gorbunov
c848ebdc52 Deprecate complex delegation to map. 2015-11-25 18:35:03 +03:00
Ilya Gorbunov
77f69abca4 Drop deprecated toGenerator and toLinkedList. 2015-11-25 18:35:02 +03:00
Ilya Gorbunov
c485eda1c2 Make zip operation symmetrical for CharSequences (missed to generalize parameter before). 2015-11-25 18:35:01 +03:00
Ilya Gorbunov
a05d0a3c49 Drop hidden declarations provided for binary compatibility in beta2 2015-11-25 18:35:00 +03:00
Ilya Gorbunov
542ab6ae34 Deprecate String.toCharList to use toList instead. 2015-11-25 18:34:58 +03:00
Mikhail Glukhikh
a53ad098d6 Codegen test for smart cast to Nothing? 2015-11-25 18:26:25 +03:00
Mikhail Glukhikh
9a6d4c32c5 More accurate handling of "always null" for receivers 2015-11-25 18:26:15 +03:00
Mikhail Glukhikh
89e56093a2 Limit "always null" scope: only for !!, is and dot; senseless comparison rolled back; "smart constant" information for nulls #KT-10029 Fixed 2015-11-25 18:26:08 +03:00
Dmitry Petrov
db42941586 Allow annotation constructor calls
in default parameter value expressions of anonymous classes
(if it is not a compile-time constant, it will be reported separately).

 #KT-10136 Fixed
2015-11-25 18:06:08 +03:00
Ilya Gorbunov
73e3a252d3 JS: ArrayList.addAll must return Boolean
#KT-7809
2015-11-25 17:19:00 +03:00
Ilya Gorbunov
b253ace198 Test different return results of collection mutation operations. 2015-11-25 17:18:59 +03:00
Ilya Gorbunov
f17316f4b4 Provide removeAll and retainAll with predicate for MutableIterables and MutableList.
#KT-8760 Fixed
2015-11-25 17:18:58 +03:00
Ilya Gorbunov
5ab2f47101 Make MutableCollection extensions return Boolean indicating whether the operation resulted collection to be changed. 2015-11-25 17:18:58 +03:00
Sergey Mashkov
2f04f30063 KT-10114 Maven: plugin doesn't recognize sourceDirs configured in the goal configuration 2015-11-25 16:45:48 +03:00
Mikhail Glukhikh
46f4191185 Unnecessary safe call is now reported in CallExpressionResolver, removed code duplication for safe call receivers
See also KT-10175
2015-11-25 16:19:48 +03:00
Dmitry Petrov
da90c21284 Warn about comma-separated conditions in when without argument.
See KT-5143.
2015-11-25 15:39:23 +03:00
Mikhail Glukhikh
b9e9c47b28 Using of enum entries as types is now forbidden #KT-5401 Fixed 2015-11-25 13:33:16 +03:00
Alexey Sedunov
736813c76a Introduce Lambda Parameter: Support extraction of string template fragments 2015-11-24 20:40:26 +03:00
Alexey Sedunov
c82d431cff Psi Unifier: Match unifier parameters by declaration instead of descriptor (since descriptor identity may change in the new context) 2015-11-24 20:40:22 +03:00
Alexey Sedunov
1b162e0294 Introduce Parameter: Support extraction of string template fragments 2015-11-24 20:40:21 +03:00
Alexey Sedunov
6e8acc6453 Psi Unifier: Do not unify parameters with block expressions 2015-11-24 20:40:20 +03:00
Alexey Sedunov
741489f4a5 Extract Function/Introduce Property: Support extraction of string template fragments 2015-11-24 20:40:18 +03:00
Alexey Sedunov
f4b4b023a3 Introduce Variable: Support extraction of string template fragments
#KT-2089 Fixed
2015-11-24 20:40:15 +03:00
Alexey Sedunov
7dbcceee79 Minor: Replace PsiFile with KtFile in utility functions 2015-11-24 20:40:14 +03:00
Alexey Sedunov
c80826aab4 Minor: Allow passing explicit type to KotlinNameSuggester.suggestByExpressionAndType 2015-11-24 20:40:12 +03:00
Alexey Sedunov
94f58c4b3d Minor: Drop Match class. Move range to UnificationResult.Matched 2015-11-24 20:40:10 +03:00
Alexey Sedunov
2d57aafef3 Misc: Render text of lambdas and functional expressions in "Extract..." popups 2015-11-24 20:40:08 +03:00
Alexey Sedunov
5889971d62 Introduce Variable: Allow choosing extraction scope for expressions in the lambda body
#KT-7720 Fixed
2015-11-24 20:40:07 +03:00
Dmitry Jemerov
70049171cd use Kotlin call hierarchy provider only for Kotlin elements, to ensure that it does not interfere with standard Java features of IntelliJ IDEA 2015-11-24 16:53:42 +01:00
Michael Bogdanov
3da463be27 Fix for KT-10137: Internal error: couldn't inline method call on lambda taking extension function parameter
#KT-10137 Fixed
2015-11-24 16:32:06 +03:00
Michael Bogdanov
a19bdaeb23 Fix duplicate field error on inlining several lambdas 2015-11-24 16:32:06 +03:00
Michael Bogdanov
d3f7e9f74b Rename this$0 on decl site 2015-11-24 16:32:06 +03:00
Michael Bogdanov
d4369c1df9 Keep inline transformation invariant: all captured parameters stored in topmost lambda/object
Fix for KT-8668: java.lang.ClassFormatError: Duplicate field name&signature (based on property access)

  #KT-8668 Fixed
2015-11-24 16:32:05 +03:00
Zalim Bashorov
93eb09a654 Return platform independent path in IncrementalCacheImpl::getClassFilePath
Fix ExperimentalIncrementalJpsTestGenerated.PureKotlin.testFunctionBecameInline on Windows.
2015-11-24 16:05:46 +03:00
Alexey Sedunov
b6a5d30469 Inspections: Forbid equals/hashCode inspection on object with explicit supertypes
#KT-9778 Fixed
2015-11-24 14:03:48 +03:00
Alexey Sedunov
d652623f90 J2K: KotlinIntroduceVariableHandler 2015-11-24 14:03:46 +03:00
Alexey Sedunov
a591c27dbf J2K: KotlinIntroduceVariableHandler (rename .java -> .kt) 2015-11-24 14:03:43 +03:00
Alexey Sedunov
b75665a96a Misc: Do not use resolved call of outer expression if current call expression has no callee
#KT-10105 Fixed
2015-11-24 14:03:42 +03:00
Michael Nedzelsky
a01a18cb1a fix test data for K2JsCliTest 2015-11-24 13:30:16 +03:00
Valentin Kipyatkov
f98b354bc1 KT-10005 Java to Kotlin: do not convert type cast to cast to nullable if it should not be null
#KT-10005 Fixed
2015-11-24 12:17:51 +03:00
Valentin Kipyatkov
d78390e489 KT-10004 Java to Kotlin: array.length is converted to array.size() instead of array.size
#KT-10004 Fixed
2015-11-24 12:17:51 +03:00
Valentin Kipyatkov
4905275a30 Renames 2015-11-24 12:16:58 +03:00
Valentin Kipyatkov
fc34557a7a Refactored to be more type safe 2015-11-24 12:16:57 +03:00
Dmitry Petrov
931463af0d - Fix code generation for inlined String::plus
#KT-10131 Fixed.
- Make extra factory methods in IntrinsicMethod protected.
This ensures that any of them can be properly overridden.
2015-11-24 12:09:34 +03:00
Michael Nedzelsky
2b4868c3ce js: do not generate files for empty string tables 2015-11-23 22:32:47 +03:00
Michael Nedzelsky
8ac3b1441a remove idea-js module 2015-11-23 22:32:44 +03:00
Michael Nedzelsky
a7636126a1 fix tests for js 2015-11-23 22:32:40 +03:00
Michael Nedzelsky
ac8dd1262c generate kjsm-files for js-stdlib and during compilation via maven or gradle 2015-11-23 22:32:37 +03:00
Michael Nedzelsky
c80c33efb6 add kjsm option for kotlin js command line compiler 2015-11-23 22:32:32 +03:00
Nikolay Krasko
24e473f47b Minor: put type parameters before function name 2015-11-23 22:03:32 +03:00
Nikolay Krasko
d635f6f399 Run builtins resolve under non-cancelable progress indicator 2015-11-23 22:03:32 +03:00
Nikolay Krasko
a62e6f7737 Refactoring: extract ObservableStorageManager from LoggingStorageManager 2015-11-23 22:03:32 +03:00
Nikolay Krasko
58dbb1ad53 Rethrow stored process canceled exception as a new one with both stacks 2015-11-23 22:03:32 +03:00
Nikolay Krasko
4aa7314600 Update to Idea 143.869.1 2015-11-23 22:03:32 +03:00
Nikolay Krasko
c9e1671572 LazyThreadSafetyMode.NONE is not safe to use in multithreading environment (EA-76205) 2015-11-23 22:03:32 +03:00
Valentin Kipyatkov
606a34283d Use lookup elements from completion for variables in live templates 2015-11-23 20:31:34 +03:00
Valentin Kipyatkov
f44bbfe4cd Moved test data to idea-live-templates too 2015-11-23 20:31:33 +03:00
Valentin Kipyatkov
b8dadeb4cc Moved live templates support into separate module 2015-11-23 20:31:33 +03:00
Valentin Kipyatkov
c6df1b6dce KT-9747 Live template macro "kotlinSuggestVariableName()" is wrong
#KT-9747 Fixed
2015-11-23 20:31:33 +03:00
Valentin Kipyatkov
6bd723da11 Templates "ifn" and "inn" to use kotlinVariable() instead of suggestVariableName() 2015-11-23 20:31:33 +03:00
Valentin Kipyatkov
d4ba15fd90 "kotlinVariable()" macro to filter by expected type, dropped IterableVariableMacro 2015-11-23 20:31:33 +03:00
Valentin Kipyatkov
7dc6aff2e6 Moved ExpectedInfos and related classes into idea.core 2015-11-23 20:31:32 +03:00
Valentin Kipyatkov
0e740dc0a6 IterableVariableMacro to honor smart casts 2015-11-23 20:31:32 +03:00
Valentin Kipyatkov
51647853f3 Refactored BaseKotlinVariableMacro to not create IterableTypesDetector in all cases 2015-11-23 20:31:32 +03:00
Valentin Kipyatkov
566805fe93 Rewritten BaseKotlinVariableMacro 2015-11-23 20:31:32 +03:00
Valentin Kipyatkov
2fdd1ade26 Refactored utlity for checking isVisible 2015-11-23 20:31:31 +03:00
Valentin Kipyatkov
3d2f878885 Minor code simplifications + no i18n 2015-11-23 20:31:31 +03:00
Valentin Kipyatkov
bfddba7789 Converted to Kotlin 2015-11-23 20:31:31 +03:00
Mikhail Glukhikh
dc60c62781 Enum.values is now deprecated but Enum.values() is no more deprecated 2015-11-23 17:29:36 +03:00
Mikhail Glukhikh
6e733f708e DeclarationsChecker: converted to Kt + EffectiveVisibility related refactoring 2015-11-23 17:29:29 +03:00
Mikhail Glukhikh
fe2fb7e5a5 DeclarationsChecker: rename to Kt 2015-11-23 17:29:26 +03:00
Mikhail Glukhikh
1c609663a4 Private setters are now deprecated for open properties 2015-11-23 17:29:23 +03:00
Mikhail Glukhikh
74976911a2 Diagnostic for "private setter in abstract property" renamed 2015-11-23 17:29:20 +03:00
Mikhail Glukhikh
284c1b2ec5 Local sealed classes are deprecated 2015-11-23 17:29:16 +03:00
Alexander Udalov
f98703dcdb Minor, fix URL in JvmName kdoc 2015-11-23 14:56:50 +03:00
Dmitry Petrov
048e96ef6a Fix safe call code generation for ranges. 2015-11-23 10:34:08 +03:00
Ilya Gorbunov
5aa415c609 MutableMap.iterator() returns MutableIterator. 2015-11-21 07:09:07 +03:00
Ilya Gorbunov
21f509511c Fix CharSequence parameter names in testData 2015-11-21 07:09:05 +03:00
Ilya Gorbunov
f2ce849f18 Fix parameter names in testData 2015-11-21 07:09:03 +03:00
Ilya Gorbunov
ab3e6258ac Update testdata for LoadBuiltinsTest 2015-11-21 07:09:02 +03:00
Ilya Gorbunov
0dbbb6c19c Rename operand parameter of plus and minus for collections 2015-11-21 00:54:37 +03:00
Ilya Gorbunov
7c726bcaf9 Rename parameters: ClosedRange.contains 2015-11-21 00:54:36 +03:00
Ilya Gorbunov
9c59045f48 Rename parameters: CharSequence 2015-11-21 00:54:35 +03:00
Ilya Gorbunov
2ed277a863 Add upperbound constraint Comparable<T> to toSortedSet() and sortedMapOf()
Provide an overload of toSortedSet() with Comparator<in T> parameter
#KT-10115 Fixed
2015-11-21 00:54:33 +03:00
Ilya Gorbunov
f8f257fa44 Minor: fix infix extension after parameter renamed 2015-11-21 00:54:32 +03:00
Ilya Gorbunov
b61bef324d Make Char.category and directionality properties instead of functions.
Provide contains(Char) operator for CharCategory.
2015-11-21 00:54:30 +03:00
Ilya Gorbunov
775755dfac Introduce String.toCharArray() instead of String.getChars()
Make special method conversion for java.lang.String.getChars() in J2K
2015-11-21 00:54:29 +03:00
Ilya Gorbunov
bf3a77b736 Deprecate Regex.matcher() with ERROR and provide the replacement. 2015-11-21 00:54:28 +03:00
Ilya Gorbunov
eb2a976f32 Minor: use EnumSet to hold options of regex. 2015-11-21 00:54:26 +03:00
Ilya Gorbunov
7035c300d0 Rename parameters of a thread function. 2015-11-21 00:54:25 +03:00
Ilya Gorbunov
47b3859641 Deprecate monitorEnter and monitorExit not to be used from user code. 2015-11-21 00:54:23 +03:00
Ilya Gorbunov
9d24f1d1cf Delegates.mapVal and mapVar preserve type of the receiver to when calling default value lambda. 2015-11-21 00:54:22 +03:00
Ilya Gorbunov
0f70def3db StdLib: Rename method parameters (generated code) 2015-11-21 00:54:20 +03:00
Ilya Gorbunov
7e7a55bbe4 StdLib: Rename method parameters (Strings) 2015-11-21 00:54:19 +03:00
Ilya Gorbunov
bbe6a3c7ca StdLib: Rename method parameters (Maps) 2015-11-21 00:54:18 +03:00
Ilya Gorbunov
a3cd86d2cd StdLib: Rename method parameters (Collections) 2015-11-21 00:54:16 +03:00
Ilya Gorbunov
c3190bbae3 Migrate type parameter list syntax. 2015-11-21 00:54:15 +03:00
Ilya Gorbunov
16c5289e6c Stdlib generators DSL: allow to use documentation family extensions inside doc { } without importing them first. 2015-11-21 00:54:13 +03:00
Ilya Gorbunov
a426c7879f Apply infix modifier on functions from stdlib where appropriate. 2015-11-21 00:54:12 +03:00
Ilya Gorbunov
794819cea2 StdLib cleanup: make calls non-infix 2015-11-21 00:54:10 +03:00
Ilya Gorbunov
88e48380af StdLib cleanup, deprecated symbol usage: Throwable.getMessage 2015-11-21 00:54:09 +03:00
Ilya Gorbunov
dadcdb5771 StdLib cleanup, deprecated symbol usage: List and Map members 2015-11-21 00:54:08 +03:00
Ilya Gorbunov
838109c302 StdLib cleanup, deprecated symbol usage: replace end with endInclusive 2015-11-21 00:54:06 +03:00
Ilya Gorbunov
07654eb82b StdLib cleanup, deprecated symbol usage: size() and length() 2015-11-21 00:54:05 +03:00
Ilya Gorbunov
21e2e68ed4 Replace reversed() with apply { reverse() } or asReversed() 2015-11-21 00:54:03 +03:00
Ilya Gorbunov
32151c077e Replace map { ... }.filterNotNull() with mapNotNull { ... } 2015-11-21 00:54:01 +03:00
Ilya Gorbunov
5b02a59cb7 Fix JvmStatic applicability diagnostics test after COMPANION_OBJECT became distinct KotlinTarget 2015-11-21 00:43:35 +03:00
Dmitry Jemerov
f20f15ec46 resolve KDoc references to members of companion object 2015-11-20 18:22:08 +01:00
Dmitry Jemerov
6adfb96154 AbstractJetReference -> AbstractKtReference 2015-11-20 18:22:07 +01:00
Dmitry Jemerov
bfca85db52 don't highlight multi-resolved references in KDoc as unresolved
#KT-9413 Fixed
2015-11-20 18:22:07 +01:00
Dmitry Jemerov
742830f815 resolve KDoc references in static scope of classes as well
#KT-9946 Fixed
2015-11-20 18:22:06 +01:00
Dmitry Jemerov
d709aa7db7 don't check for Kotlin plugin updates if IDEA update checks are turned off in the settings 2015-11-20 18:22:06 +01:00
Dmitry Jemerov
a80930bf15 code cleanup can replace infix calls to library functions with ordinary calls
#KT-9976 Fixed
2015-11-20 18:22:05 +01:00
Yan Zhulanow
efa2e98541 Do not launch Android Extensions JPS plugin if the Android IDEA plugin is disabled, or the module is not an Android JPS module 2015-11-20 18:33:18 +03:00
Mikhail Glukhikh
f81a5c06ea Protected in allowed in companion objects but forbidden in other objects, relevant test fixes 2015-11-20 16:32:59 +03:00
Valentin Kipyatkov
fdc7c75f5b Fixed "Import member" intention shown in the wrong place 2015-11-20 16:06:34 +03:00
Valentin Kipyatkov
bf99f91d83 Fixed EA-75877 2015-11-20 16:06:34 +03:00
Dmitry Jemerov
30084dff9d ensure that the short name of the Kotlin unused import inspection does not clash with Java (KT-10046) 2015-11-20 13:54:40 +01:00
Mikhail Glukhikh
c84b22396b Diagnostic 'final function with no body' deleted because it's redundant 2015-11-20 15:43:25 +03:00
Mikhail Glukhikh
b5610eebae Diagnostic 'final property in interface' deleted because it's redundant 2015-11-20 15:43:22 +03:00
Mikhail Glukhikh
cd1b58f2eb Final in interfaces: deprecation ---> error + relevant test fixes 2015-11-20 15:43:19 +03:00
Pavel V. Talanov
56af3a0af4 Increase stub version after changes to parser (script refactoring)
better late than never :(
2015-11-20 15:38:40 +03:00
Valentin Kipyatkov
603bcaa039 KT-10006 Parameter Info does not work for smart cast receiver
#KT-10006 Fixed
2015-11-20 15:36:31 +03:00
Mikhail Glukhikh
4e44466cf9 Exposed visibility deprecation warnings made errors + relevant test fixes 2015-11-20 15:21:01 +03:00
Mikhail Glukhikh
e8e5d700d2 Effective visibility source code fix: frond-end 2015-11-20 15:20:38 +03:00
Mikhail Glukhikh
e43a45755e Source code fix: no protected in object 2015-11-20 09:56:23 +03:00
Mikhail Glukhikh
3d75ebb859 Effective visibility source code fix: jps plugin 2015-11-20 09:56:19 +03:00
Pavel V. Talanov
dbd49c37c1 Psi: Introduce KtScriptInitializer, a separate entity for script initializers which are quite a bit different from class initializers 2015-11-19 22:57:07 +03:00
Pavel V. Talanov
321364102a KtAnonymousInitializer: make it an interface with KtClassInitializer inheritor 2015-11-19 22:57:06 +03:00
Pavel V. Talanov
bc2a65b2ea J2K KtAnonymousInitializer in one go
Rip history
2015-11-19 22:57:05 +03:00
Pavel V. Talanov
6bb89021dd Rename: KtClassInitializer -> KtAnonymousInitializer 2015-11-19 22:57:05 +03:00
Pavel V. Talanov
917b8bfe66 Minor, repl: clean up code 2015-11-19 22:57:04 +03:00
Pavel V. Talanov
bdc64f322c Add script codegen tests with package statements
Tests codegen annotating visitor
2015-11-19 22:57:03 +03:00
Pavel V. Talanov
ae5c95038b Place repl specific stuff of GenerationState into a separate entity
Add even more hacks to tell if the line has useful result to display
2015-11-19 22:57:03 +03:00
Pavel V. Talanov
405cfa439d Repl test: behave closer to real repl 2015-11-19 22:57:02 +03:00
Pavel V. Talanov
ad58617753 Script refactoring, codegen tests: change test data according to semantics change
Add some new tests for uncovered cases
2015-11-19 22:57:01 +03:00
Pavel V. Talanov
6563830584 Script refactoring, backend: scripts are classes now, remove/refactor 'special code' dealing with scripts 2015-11-19 22:57:01 +03:00
Pavel V. Talanov
d037068bba Turn off duplicateJvmSignature reporting for scripts until light classes are implemented 2015-11-19 22:56:58 +03:00
Pavel V. Talanov
2b955bc6ec Script refactoring, frontend tests: changes according to semantic changes in scripts
Add checker tests for scripts
2015-11-19 22:56:57 +03:00
Pavel V. Talanov
efa4bf1d74 Script refactoring, frontend: Treat scripts as classes (as opposed to function bodies)
ScriptDescriptor implements ClassDescriptor
Scripts are accessible in IDE via stub index
Replace special treatment of scripts with generic mechanism in several cases
Scripts to longer generate 'rv' property for storing result value (changes in repl required)
2015-11-19 22:56:57 +03:00
Pavel V. Talanov
aebcebe8ca Add simple checker tests for scripts 2015-11-19 22:56:55 +03:00
Pavel V. Talanov
daa1a08213 Script refactoring, parser: wrap statements in script as if they are init blocks of a class 2015-11-19 22:56:54 +03:00
Pavel V. Talanov
e45585be21 Make KtScript stubbed and add KotlinScriptFqnIndex 2015-11-19 22:56:53 +03:00
Michael Nedzelsky
aa8f3df9a8 fix KT-10064 Regression: Error with multiple main functions within a single package
#KT-10064 Fixed
2015-11-19 19:59:27 +03:00
Yan Zhulanow
49f0953898 Remove obsolete JPS extension declaration in Android plugin (KT-10096) 2015-11-19 19:55:28 +03:00
Dmitry Petrov
42b587b0d5 Prohibit callable references to annotation class constructors.
See KT-4391.
2015-11-19 18:31:20 +03:00
Nikolay Krasko
0261a3fbbd Substitute version in bare plugin on buildserver 2015-11-19 16:08:04 +03:00
Nikolay Krasko
ee3100dc79 Relay plugins with version replacing 2015-11-19 16:08:04 +03:00
Nikolay Krasko
642ac2ec5e Minor: rename JetParserDefinition to KotlinParserDefinition in comments 2015-11-19 16:08:03 +03:00
Michael Nedzelsky
ea4470a16a fix KT-10068 JsLibraryStdDetectionUtil does not use caching through JarUserDataManager
#KT-10068 Fixed
2015-11-19 15:34:31 +03:00
Alexander Udalov
8fd7190992 Support ConstraintSystem.Builder.add, untested and unused at the moment 2015-11-19 14:40:01 +03:00
Natalia Ukhorskaya
6149f9f2bb Minor: extract method 2015-11-19 14:01:25 +03:00
Natalia Ukhorskaya
f872b378d0 Create KotlinStackFrame only for kotlin classes with inline functions
#KT-10092 Fixed
2015-11-19 14:01:23 +03:00
Natalia Ukhorskaya
35ccfef040 Add test for navigation from stacktrace at inline function with object 2015-11-19 12:07:03 +03:00
Natalia Ukhorskaya
6867165aba Fix navigation from stack trace to inline function calls in inner classes 2015-11-19 12:07:02 +03:00
Natalia Ukhorskaya
3498038db1 Support navigation to library inline functions from stack trace 2015-11-19 12:07:01 +03:00
Natalia Ukhorskaya
214ae54c69 Rewrite old exception filter test with library sources 2015-11-19 12:07:00 +03:00
Natalia Ukhorskaya
6c0a68cf66 Rewrite some old exception filter tests 2015-11-19 12:06:59 +03:00
Natalia Ukhorskaya
9f0b52f030 Navigate to inline function from stackTrace
#KT-8066 Fixed
2015-11-19 12:06:58 +03:00
Natalia Ukhorskaya
93ccc08e3d Convert KotlinExceptionFilter to kotlin 2015-11-19 12:06:58 +03:00
Natalia Ukhorskaya
4506a73112 Rename .java to .kt 2015-11-19 12:06:57 +03:00
Natalia Ukhorskaya
c0f67e497b Run Clean up on eval4j module 2015-11-19 12:06:56 +03:00
Natalia Ukhorskaya
fddcd9b50f Workaround for bug in jdi: ClassCastException in invoke method with Object[] param using Interface[] argument 2015-11-19 12:06:55 +03:00
Natalia Ukhorskaya
2b646369f3 Minor: fix warning 2015-11-19 12:06:54 +03:00
Natalia Ukhorskaya
6e638bd30a Debugger: show line content instead of method content for breakpoint at line in drop-donw list 2015-11-19 12:06:54 +03:00
Natalia Ukhorskaya
35d7d7b789 Minor: rename class 2015-11-19 12:06:53 +03:00
Natalia Ukhorskaya
7e5e749735 Debugger: remove while loop
#KT-10043 Fixed
2015-11-19 12:06:52 +03:00
Dmitry Petrov
9a736bf874 Use platform-dependent filter for callable package members
before checking for overloads:
filter deserialized callable package members by implementation class files
for callable package members from source.

 #KT-10051 Fixed
2015-11-19 09:51:21 +03:00
Alexander Udalov
6367e5e133 Fix deadlock on static initializers of KProperty implementations
#KT-10041 Fixed
2015-11-19 02:57:27 +03:00
Yan Zhulanow
39e6c6e500 Android Extensions: fix cli tests 2015-11-19 01:35:58 +03:00
Yan Zhulanow
148ec829a3 Minor: simplify SimpleNameReferenceExtension a bit 2015-11-19 01:35:58 +03:00
Yan Zhulanow
c9c740c66b Android Extensions: IDEA versions replication is not needed anymore 2015-11-19 01:35:58 +03:00
Yan Zhulanow
ba8e3785cf Android Extensions: Update Android JPS plugin 2015-11-19 01:35:58 +03:00
Yan Zhulanow
6caaa305bc Android extensions: Do not cache ViewStub widgets, do not cast it automatically 2015-11-19 01:35:58 +03:00
Yan Zhulanow
3f97b384ef Autoimport items from kotlinx.android.synthetic on completion 2015-11-19 01:35:58 +03:00
Yan Zhulanow
0dada9d13a Android extensions: Fix onDestroy in Fragments 2015-11-19 01:35:58 +03:00
Yan Zhulanow
10b7b069b4 Pack Android extensions inside the Kotlin IDEA plugin 2015-11-19 01:35:58 +03:00
Yan Zhulanow
422e11ea9a Fix Android Extensions tests (descriptors) 2015-11-19 01:35:58 +03:00
Yan Zhulanow
c7f1fd74a1 Create descriptors directly in Android Extensions (IDEA plugin) 2015-11-19 01:35:58 +03:00
Yan Zhulanow
d88c2249b8 Create descriptors directly in Android Extensions (compiler plugin) 2015-11-19 01:35:58 +03:00
Yan Zhulanow
3d8df88ab2 Fix some misc tests (Android variants) 2015-11-19 01:35:58 +03:00
Yan Zhulanow
9112dd632a Support Android variants in IDE 2015-11-19 01:35:58 +03:00
Yan Zhulanow
161d8b105f Support variants in Android Extensions (compiler plugin) 2015-11-19 01:35:58 +03:00
Yan Zhulanow
a6e9ee9323 Cleanup Android Extensions code 2015-11-19 01:35:58 +03:00
Michael Nedzelsky
dc7171e953 improve check for access to internal from tests for projects compiled via gradle 2015-11-18 22:57:59 +03:00
Dmitry Jemerov
5d92d3128d support for configuring Kotlin when creating new Gradle project
#KT-7978 Fixed
2015-11-18 20:19:43 +01:00
Michael Nedzelsky
e92ac6cba3 fix access to internal from tests for android projects which compiled via gradle 2015-11-18 20:19:31 +03:00
Dmitry Jemerov
084727c991 action to invoke a manual update check for the Kotlin plugin 2015-11-18 16:44:14 +01:00
Mikhail Glukhikh
7decca9df4 Get rid of unnecessary insideSafeCallChain in various contexts 2015-11-18 18:04:30 +03:00
Mikhail Glukhikh
3a4f6d8226 Smart cast impossible on when subject is no more recorded #KT-10061 Fixed 2015-11-18 18:02:59 +03:00
Alexander Udalov
58dc88dd2c Remove ConstraintSystem.Builder.addSupertypeConstraint
Use addSubtypeConstraint everywhere to reduce confusion
2015-11-18 16:40:51 +03:00
Alexander Udalov
3337b5298b Minor refactoring in ConstraintSystemImpl
Inline getUsedInBounds, get rid of another usage of freshTypeParameter
2015-11-18 16:40:49 +03:00
Alexander Udalov
3e27fdb964 Inline and move out utilities from ConstraintSystem 2015-11-18 16:40:49 +03:00
Alexander Udalov
d4664af4e5 Get rid of originalToVariableSubstitutor and descriptorToVariable
Move the composite substitutor to GenericCandidateResolver where it was used,
other places don't need it since they know the exact call (or NO_CALL), the
substitutor for which should be used
2015-11-18 16:40:48 +03:00
Alexander Udalov
cb05a8d58d Don't use originalToVariableSubstitutor in supertype constraints 2015-11-18 16:40:48 +03:00
Alexander Udalov
178ca3daae Add call to type variable and mapping descriptor -> variable
Since type parameter descriptor represents a single declaration of a type
parameter, multiple variables in one system may correspond to one type
parameter (e.g. in case of nested calls). Hence it's not possible to map type
parameters uniquely onto type variables and additional information is required
2015-11-18 16:40:47 +03:00
Alexander Udalov
fc73e8c620 Move original descriptor to TypeVariable, minimize usages of freshTypeParameter 2015-11-18 16:40:46 +03:00
Alexander Udalov
c1bd430b27 Introduce TypeVariable to abstract the system from descriptors
Store cached type and isExternal in type variable instead of sets in the
constraint system
2015-11-18 16:40:46 +03:00
Alexander Udalov
27ce61a3be Always alpha-convert non-external type parameters before registering in system 2015-11-18 16:40:45 +03:00
Alexander Udalov
4d5d24a503 Minor, move out check against no expected type 2015-11-18 16:40:45 +03:00
Alexander Udalov
e50eb50299 Make getNestedTypeVariables() an utility 2015-11-18 16:40:44 +03:00
Alexander Udalov
dd4a7ac6a9 Make ConstraintSystem work with variables, provide API to map to descriptors 2015-11-18 16:40:43 +03:00
Alexander Udalov
13abc265ad First steps to make distinction between variables and descriptors in ConstraintSystem
A type variable is an entity, the value of which should be solved by the
system; a descriptor is an actual TypeParameterDescriptor declaration
2015-11-18 16:40:43 +03:00
Alexander Udalov
eeb925f127 Minor, sort out visibilities & move utilities in constraint system 2015-11-18 16:40:42 +03:00
Alexander Udalov
89dfd52363 Remove ConstraintSystem.partialSubstitutor, move logic to FuzzyType 2015-11-18 16:40:42 +03:00
Alexander Udalov
d72a4c8037 Cleanup constraint system, convert functions to properties, delete unused 2015-11-18 16:40:41 +03:00
Alexander Udalov
3484c049d1 Rename ConstraintSystemSnapshot -> ConstraintSystemImpl 2015-11-18 16:40:40 +03:00
Alexander Udalov
265c135e89 Rename ConstraintSystemImpl -> ConstraintSystemBuilderImpl 2015-11-18 16:40:40 +03:00
Alexander Udalov
bb918a2742 Move mutating methods of ConstraintSystem to Builder
Extract immutable ConstraintSystemSnapshot from ConstraintSystemImpl
2015-11-18 16:40:39 +03:00
Alexander Udalov
d320922e08 Add more methods to interface ConstraintSystem
To minimize usages of ConstraintSystemImpl
2015-11-18 16:40:38 +03:00
Alexander Udalov
9149668286 Add ConstraintSystem#copy to minimize usages of ConstraintSystemImpl 2015-11-18 16:40:38 +03:00
Alexander Udalov
393852bf70 Simplify signature of ConstraintSystem#registerTypeVariables
Drop unused variance from TypeBounds and ConstraintSystem, provide default
values, inline methods used only once
2015-11-18 16:40:37 +03:00
Alexander Udalov
8cc484bc25 Cleanup GenericCandidateResolver 2015-11-18 16:40:37 +03:00
Dmitry Petrov
99b411c8ca companionObjectType --> classValueType
(NB: it IS NOT a companion object in case of OBJECT or ENUM_ENTRY)
Unify related names.
2015-11-18 16:27:26 +03:00
Dmitry Petrov
7b432c878a Diagnostics improvements for corner cases
(class/package qualifier in non-qualifier position).
2015-11-18 16:27:21 +03:00
Dmitry Petrov
ba8372cc11 Fixes for IDE tests after qualifier modifications:
- CallType should look into QUALIFIER,
 so that completion works for (companion) object qualifiers.
- Record type and reference target for object qualifiers (not only for companions).
- "Create (function/...)" should understand ClassQualifier as possible receiver.
- Cleanup after rebase on master.
2015-11-18 14:35:54 +03:00
Dmitry Petrov
9856af48ca Drop createQualifier: testData update 2015-11-18 14:35:53 +03:00
Dmitry Petrov
28d15e776a Drop createQualifier.
NB: some regression in diagnostics for special cases,
such as class or package used in expression position or in safe access;
see next commit.
2015-11-18 14:35:53 +03:00
Dmitry Petrov
b532fa2bbf Properly resolve values in 1st qualifier part (see implicitReceiverProperty test).
Look into QUALIFIER for left-most "unrolled" qualified expression
    in CallExpressionResolver#getQualifiedExpressionTypeInfo.
Drop some unused functions.
2015-11-18 14:35:53 +03:00
Dmitry Petrov
49570ba1ea Drop QualifierReceiver::resultingDescriptor. Use REFERENCE_TARGET. 2015-11-18 14:35:53 +03:00
Dmitry Petrov
eef8c7ae09 Move auxiliary methods for QualifierReceiver resolution to a separate file
(to be refactored later).
Get rid of duplicate type usage validation.
2015-11-18 14:35:53 +03:00
Dmitry Petrov
3556f9751e Reuse package/class qualifier prefix resolution for qualified expression resolution. 2015-11-18 14:35:52 +03:00
Dmitry Petrov
5ff2ffbccc Move resolve* methods from Qualifier.kt to QualifiedExpressionResolver.
Further differentiate various qualifiers.
2015-11-18 14:35:52 +03:00
Dmitry Petrov
16dcc0b288 Introduce Receiver as a common superclass of QualifierReceiver and ReceiverValue.
QualifierRecevier is no longer a subclass of ReceiverValue.
2015-11-18 14:35:52 +03:00
Nikolay Krasko
2ff0b13808 Run psi check on light classes from compiled Kotlin 2015-11-18 13:34:25 +03:00
Dmitry Jemerov
9e0ec80c6a Merge branch 'KT-1396' of https://github.com/mcgee/kotlin into mcgee-KT-1396 2015-11-17 18:49:44 +01:00
Dmitry Jemerov
0e1dff1c29 optimize PackageIndexUtil.packageExists() by using in-memory hash table instead of stub index lookup 2015-11-17 18:47:01 +01:00
Dmitry Jemerov
bf35099e0c use "destructuring declarations" term instead of "multi-declarations" 2015-11-17 18:43:26 +01:00
Anton Sukhonosenko
bec6621654 #KT-1396 Fixed 2015-11-17 19:33:18 +03:00
Michael Nedzelsky
ba47bfa752 Fix some weird cases when 'from' descriptor sourceElement is not a KotlinSourceElement 2015-11-17 18:23:12 +03:00
Mikhail Glukhikh
fe13f39de9 Use of uninitialized variables in lambdas / object literals / local functions is forbidden now #KT-4475 Fixed
Local declarations CFA: variable initialization information before them is now taken into account
2015-11-17 18:21:09 +03:00
Zalim Bashorov
89791dc85c Batch recording lookups in daemon 2015-11-17 17:25:38 +03:00
Zalim Bashorov
6305bbda5d Fix tracking lookups when compile using daemon 2015-11-17 17:25:37 +03:00
Dmitry Jemerov
49db4e93c0 Merge branch 'KT-5115' of https://github.com/mcgee/kotlin into mcgee-KT-5115 2015-11-17 15:14:00 +01:00
Denis Zharkov
a2627431f8 Minor. Cleanup and refine naming 2015-11-17 16:27:02 +03:00
Denis Zharkov
fa99ea1e98 Generate type-safe barrier in method body
In cases when signature of special bridge is the same as current method,
but type is not 'Any?'.

Also there is tiny optimization:
only null check needed if value parameter type is mapped to Object,
but it's not nullable.

 #KT-9973 Fixed
2015-11-17 16:27:02 +03:00
Denis Zharkov
1f704e0c4d Minor. Split BytecodeText tests about special builtin bridges 2015-11-17 16:27:02 +03:00
Denis Zharkov
3b2719735e Setup default values for type-safe bridges
#KT-9973 In Progress
2015-11-17 16:27:01 +03:00
Denis Zharkov
34518c0ecc Extract common logic into generateIsCheck 2015-11-17 16:26:29 +03:00
Denis Zharkov
f5a086140e Refine special bridge generating rule
Generate special bridge even in case current class has Kotlin superclass implementing
this builtin method, but that super class was generated without special bridge
(e.g. because it would have the same signature)

 #KT-9901 Fixed
2015-11-17 15:41:49 +03:00
Denis Zharkov
abf7ae547e Minor. Move tests 2015-11-17 15:41:48 +03:00
Dmitry Jemerov
83bf5daf7f do not package kotlin-runtime and kotlin-reflect into Kotlin Android extensions zip 2015-11-17 12:24:15 +01:00
Mikhail Glukhikh
7e5558c8a2 More receiver refactoring 2015-11-17 13:02:25 +03:00
Mikhail Glukhikh
657052e1d2 Rename: ClassReceiver ---> ImplicitClassReceiver, CastClassReceiver ---> CastImplicitClassReceiver 2015-11-17 13:02:22 +03:00
Mikhail Glukhikh
04569dd4af Rename: ExpressionOrImplicitClassReceiver ---> ThisClassReceiver 2015-11-17 13:02:19 +03:00
Mikhail Glukhikh
59e54d1db1 Rename: ThisReceiver ---> ImplicitReceiver 2015-11-17 13:02:16 +03:00
Mikhail Glukhikh
7ba297db81 ThisReceiver converted to Kotlin 2015-11-17 13:02:12 +03:00
Mikhail Glukhikh
ffb67eb79e Code cleanup 2015-11-17 13:02:09 +03:00
Mikhail Glukhikh
f1034dbf19 Receiver refactoring in DataFlowValueFactory 2015-11-17 13:02:06 +03:00
Dmitry Jemerov
e56b898a53 Merge pull request #785 from belovrv/patch-1
Add Slack badge
2015-11-17 10:50:54 +01:00
belovrv
3c138aa01c Add Slack badge 2015-11-17 12:49:22 +03:00
Mikhail Glukhikh
96c303be60 Smart cast of value / implicit receiver: two different colors 2015-11-17 10:26:46 +03:00
Mikhail Glukhikh
811ba8110f Implicit receiver smart casts implementation and highlighting 2015-11-17 10:26:42 +03:00
Mikhail Glukhikh
03287d5d66 Diagnostics corrected for smart cast impossible 2015-11-17 10:26:26 +03:00
Stanislav Erokhin
b4fe62e53e Minor. rename getObjectType to getCompanionObjectType 2015-11-17 01:25:18 +03:00
Stanislav Erokhin
c7f7ba72b8 Moved logic for PRIVATE_TO_THIS visibility from ExpressionTypingUtils.normalizeReceiverValueForVisibility to ExpressionReceiver.create 2015-11-17 01:25:18 +03:00
Stanislav Erokhin
6b7bf63814 Minor. Split ExpressionReceiver to interface & implementation 2015-11-17 01:25:17 +03:00
Stanislav Erokhin
5a7e879c0c Convert ExpressionReceiver to kotlin. 2015-11-17 01:25:17 +03:00
Stanislav Erokhin
512bcbe7b9 Minor. Removed usage of ExpressionReceiver constructor from Qualifier.kt 2015-11-17 01:25:16 +03:00
Stanislav Erokhin
1c9136a8cd Minor. introduce method ExpressionReceiver.create and replace almost all usages of constructor ExpressionReceiver. 2015-11-17 01:25:15 +03:00
Stanislav Erokhin
e606c0cdf5 Minor. Introduce ExpressionOrImplicitThisClassReceiver. 2015-11-17 01:25:14 +03:00
Michael Nedzelsky
e5e4f9e775 Hack for checking access to internal declarations during incremental compilation 2015-11-17 00:26:43 +03:00
Valentin Kipyatkov
40bc30aee2 Fixed compilation after rebase 2015-11-16 18:29:55 +03:00
Valentin Kipyatkov
927df1c4cd KT-5072 Values of extension function type are not seen in completion
#KT-5072 Fixed
2015-11-16 18:24:37 +03:00
Valentin Kipyatkov
2e2dfcb4a0 "invoke" from function types do not have any meaningful parameter names 2015-11-16 18:24:37 +03:00
Valentin Kipyatkov
5b668cb6a6 KT-9970 Regression: completion doesn't see private extension functions with parametrized receiver
#KT-9970 Fixed
2015-11-16 18:24:37 +03:00
Valentin Kipyatkov
6a26e2fd82 Sorting overloads in completion 2015-11-16 18:24:37 +03:00
Alexey Sedunov
ac8532ffce Quick Fixes: Implement 'Initialize with constructor parameter' quick-fix
#KT-6604 Fixed
2015-11-16 11:30:03 +03:00
Alexey Sedunov
138370ce5b Quick Fixes: Implement 'Move to constructor parameters' quick-fix
#KT-6604 In Progress
2015-11-16 11:30:02 +03:00
Alexey Sedunov
f66af7bdd4 Quick Fixes: Implement 'Initialize property' quick-fix 2015-11-16 11:30:00 +03:00
Alexey Sedunov
aeee8bafe6 Name Suggester: Suggest parameter name for the corresponding argument expression
#KT-8111 Fixed
2015-11-16 11:29:59 +03:00
Mikhail Glukhikh
f21603daf2 Source code fix according to KT-4475 2015-11-16 10:55:15 +03:00
Mikhail Glukhikh
fdd9eee849 DataClassAnnotationChecker --> DataClassDeclarationChecker 2015-11-16 10:45:58 +03:00
Mikhail Glukhikh
dd43674426 Data class must have at least one argument is reported on constructor parameter list now, if any #KT-9999 Fixed 2015-11-16 10:45:54 +03:00
Mikhail Glukhikh
86c37deaee Overriden setter now cannot weaken visibility #KT-3369 Fixed 2015-11-16 10:45:21 +03:00
Mikhail Glukhikh
02fb19c3ea Inner classes are no more allowed inside enum entries #KT-9750 Fixed
Forbidden use-case deleted from codegen tests
2015-11-16 10:44:20 +03:00
Ilya Gorbunov
3f4430087e Do not call deprecated public getProgressionFinalElement, call internal getProgressionLastElement instead.
ProgressionIterators do not compute final element by themselves, but use one computed by Progression.
Update testdata for LoadBuiltinsTest
2015-11-13 21:38:22 +03:00
Ilya Gorbunov
96f301fdec Support only integer primitive ranges and progressions in optimized for loop codegen.
Do not call getProgressionFinalElement, use new progression properties 'first' and 'last' instead.
2015-11-13 20:58:18 +03:00
Ilya Gorbunov
5d4e72ed7f Correct deprecation replacement for Progression constructors.
Update testdata for LoadBuiltinsTest
2015-11-13 18:59:38 +03:00
Denis Zharkov
e920ce709b Render captured type parameters in verbose mode 2015-11-13 14:59:04 +03:00
Denis Zharkov
6ae653e5a1 Implement stub building for inner types 2015-11-13 14:59:04 +03:00
Denis Zharkov
7500447e72 Implement serialization of inner types 2015-11-13 14:59:03 +03:00
Denis Zharkov
8cb85759c7 Fix written generic signature in case of inner types 2015-11-13 14:59:03 +03:00
Denis Zharkov
eea898abb5 Introduce PossiblyInnerType class
Use it when rendering inner types, similar logic will be used in different subsystems
2015-11-13 14:58:58 +03:00
Denis Zharkov
9c8ad9e442 Fix AbstractWriteSignatureTest
It didn't check anything in tests with class signatures
2015-11-13 14:47:29 +03:00
Denis Zharkov
7ee50e043c Use type constructor when finding findStaticallyKnownSubtype
See InnerClasses.testBareTypes
2015-11-13 14:47:29 +03:00
Denis Zharkov
daed74f9b2 Fix supertypes consistency check
See testKt5508:
`inner class B<S> : A<B<S>>()` is effectively the same as
`A<T>.B<S> : A<A<T>.B<S>>` or `B<S, T> : A<B<S, T>>`.
The latter is because we add outer class parameters to inner type constructor.

The problem is that we treat type constructors of first TP of 'A'
and of second type parameter (copy) of 'B' just the same and report INCONSISTENT_TYPE_PARAMETER_VALUES.

So we supposse it's more correct to compare type parameter descriptors instead
2015-11-13 14:47:29 +03:00
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
c57dbcc602 Fix substition of inner classes constructors
It should have substituted class as containing declaration
2015-11-13 14:47:28 +03:00
Denis Zharkov
c5103f9ac4 Fix JavaClassifierType.getTypeArguments impls
Make them return arguments both for current classifier and for the outer one
2015-11-13 14:47:28 +03:00
Denis Zharkov
910718ff45 Weaken JvmRuntimeDescriptorLoaderTest assumptions
Sometimes descriptors in reflection may differ from compiled ones.
There is already SKIP_IN_RUNTIME_TEST but sometimes
it would be nice to record specific behaviour.

Solution is to add '.runtime.txt' near '.txt' files for tests containing
expected rendered descriptors in reflection.
2015-11-13 14:47:28 +03:00
Denis Zharkov
deea0643ad Refine type arguments resolution and rendering
In case of type constructors captured parameters from outer classes

 #KT-5510 Fixed
 #KT-3112 Fixed
 #KT-6325 Fixed
 #KT-408  Fixed
 #KT-6337 Fixed
2015-11-13 14:47:28 +03:00
Denis Zharkov
990bd7e71d Correct parameters of inner's class type constructor
Now it contains copies of outer's class constructor parameters
They are appended just after real type parameters
2015-11-13 14:47:28 +03:00
Denis Zharkov
7b4c0fb83a Use original type parameters for SAM adapter to constructor
It makes SAM descriptors more consistent with real ones
2015-11-13 14:47:28 +03:00
Denis Zharkov
d614adcd2a Obtain type parameters of constructor from containing class
Effectively this commit is just inlining of 'typeParameters' parameter
2015-11-13 14:47:28 +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
Denis Zharkov
57094954a3 Minor. Simplify control-flow blocks 2015-11-13 14:47:28 +03:00
Denis Zharkov
b4b1d16134 Extract and cleanup 'resolveTypeForClass' and 'resolveTypeForTypeParameter' 2015-11-13 14:47:27 +03:00
Valentin Kipyatkov
e66f1c2d70 KT-9981 Code cleanup replace usages of !in incorrectly
#KT-9981 Fixed
2015-11-13 14:32:33 +03:00
Mikhail Glukhikh
2f4dbd2084 Code cleanup: get rid of unnecessary !! / ?. / as 2015-11-13 13:13:55 +03:00
Michael Bogdanov
7e8e4e9e1b Fix for KT-2789: NoSuchMethodError when calling trait function with default arguments that returns generic type, KT-9428 Abstract method with one parameter and one default parameter produces NoSuchMethodError, KT-9924 NoSuchMethod when replacing generic with specific type
#KT-2789 Fixed
 #KT-9428 Fixed
 #KT-9924 Fixed
2015-11-13 10:14:01 +03:00
Michael Bogdanov
3f995935d3 Fix for KT-9022: Wrong result when use break in if condition
#KT-9022 Fixed
2015-11-13 10:14:00 +03:00
Ilya Chernikov
20ca8cd435 Additional fix to the previous one: Disabling parallel builds without daemon again and undoing apprpriate fix to broken tests problem, since it effectively cancelled fix for parallel building itself and was causing exceptions on heavy builds
(cherry picked from commit bb66776)
2015-11-12 19:15:14 +01:00
Nikolay Krasko
0b01c8a4cf Minor: remove warnings in KotlinCliJavaFileManagerImpl 2015-11-12 19:19:44 +03:00
Nikolay Krasko
bd4ffb9ced Announce we are going to invalidate file to collect invalidatation trace
See DebugUtil.currentInvalidationTrace()
2015-11-12 19:19:43 +03:00
Nikolay Krasko
33fd247bde Test that fails with package prefixes but works good without them 2015-11-12 19:19:42 +03:00
Nikolay Krasko
03310491d0 Update to idea 143.747.5 2015-11-12 19:19:41 +03:00
Ilya Chernikov
4643d7fc4d Disabling parallel builds without daemon again and undoing apprpriate fix to broken tests problem, since it effectively cancelled fix for parallel building itself and was causing exceptions on heavy builds
(cherry picked from commit 0610452)
2015-11-12 17:15:14 +01:00
Zalim Bashorov
b7772f32ce Minor: add more logging to KotlinBuilder 2015-11-12 18:39:43 +03:00
Dmitry Jemerov
c734cad429 fix typo: 'a' before uuid 2015-11-12 14:22:58 +01:00
Michael Bogdanov
de6731cb4b Additional diagnostic for KT-9980: KotlinFrontEndException: Exception while analyzing expression 2015-11-12 14:38:09 +03:00
Zalim Bashorov
ca71f929f9 Add new tests for incremental compilation and disable the one for current IC 2015-11-12 13:43:25 +03:00
Zalim Bashorov
e1ad942804 Add separate build logs for tests which result is different in the new incremental compilation 2015-11-12 13:43:24 +03:00
Zalim Bashorov
5a6c04357b Add the ability to have separate log file for experimental incremental compilation tests 2015-11-12 13:43:23 +03:00
Zalim Bashorov
5ca7ce2b50 Make accessingFunctionsViaRenamedFileClass test more sensible 2015-11-12 13:43:22 +03:00
Zalim Bashorov
f144bb38da ChangesInfo -> CompilationResult 2015-11-12 13:43:21 +03:00
Zalim Bashorov
d4a18a3ef2 Integrate components of the new incremental compilation 2015-11-12 13:43:20 +03:00
Zalim Bashorov
4caf1b54f7 Minor: re-sort statements in KotlinBuilder::doBuild 2015-11-12 13:43:19 +03:00
Zalim Bashorov
3ce84d04e6 Minor: get rid of KotlinBuilder.ChangesProcessor 2015-11-12 13:43:19 +03:00
Zalim Bashorov
2944e998f7 Minor: don't trim file content in KotlinTestUtils#doLoadFile 2015-11-12 13:43:18 +03:00
Zalim Bashorov
28366a0bf4 Fix refer to classes from default package in SMAP 2015-11-11 22:59:05 +03:00
Dmitry Jemerov
45ef9b02c4 remove some leftovers of old package facades in IDE code 2015-11-11 19:25:11 +01:00
Michael Nedzelsky
5b59fc74bc fix access from tests to internal elements in production code in case of circular dependency 2015-11-11 19:16:21 +03:00
Ilya Gorbunov
a8b11ff07b Make MutableMap.set return Unit
#KT-7853 Fixed
2015-11-11 19:00:10 +03:00
Ilya Gorbunov
7844030ba4 Restore correct sorting order (after cleanup in 17fc1d95) 2015-11-11 19:00:09 +03:00
Ilya Gorbunov
a793a63b73 Simplify message expression from lambda argument when converting assert to if. 2015-11-11 19:00:08 +03:00
Ilya Gorbunov
3639afafce Deprecated with ERROR preconditions with eager message. 2015-11-11 19:00:03 +03:00
Ilya Gorbunov
07c570f35d Replace getStackTrace usages in j2k and testData. 2015-11-11 18:59:56 +03:00
Ilya Gorbunov
0579f6c8bf Replace Regex.match and matchAll usages 2015-11-11 18:59:55 +03:00
Ilya Gorbunov
f06d521bfe Refactor intention test files enumerating, do not use deprecated filter method, which would get another behavior after dropping deprecated one. 2015-11-11 18:59:54 +03:00
Ilya Gorbunov
be9b14545f Drop deprecations and tighten up left ones. 2015-11-11 18:59:53 +03:00
Ilya Gorbunov
5b484f1e05 Make emptyMap upperbound to be Any? rather than Any.
#KT-9963
2015-11-11 17:14:41 +03:00
Dmitry Jemerov
6f2fb3f9aa don't analyze class repeatedly if we already found an annotated member there
#KT-8557 Fixed
2015-11-11 15:09:18 +01:00
Valentin Kipyatkov
de11d571ef KT-9928 Replacement not offered for a usage of symbol deprecated with DeprecationLevel.ERROR
#KT-9928 Fixed
2015-11-11 16:49:52 +03:00
Ilya Gorbunov
75f5cec190 Minor: remove inapplicable operator modifiers. 2015-11-11 16:41:40 +03:00
Ilya Gorbunov
f7135dfe50 Do not override default AbstractList iterator() implementation for primitiveArray.asList wrappers.
#KT-9927 Fixed
2015-11-11 16:41:39 +03:00
Michael Bogdanov
3651ec9294 Support access to protected members within inline functions 2015-11-11 14:34:48 +03:00
Michael Bogdanov
5a8ead0092 Fix for KT-8204: java.lang.VerifyError for super method invocation in inline function
#KT-8204 Fixed
2015-11-11 14:34:47 +03:00
Mikhail Glukhikh
04f7805d52 Minor comment to CastClassReceiver 2015-11-11 13:30:19 +03:00
Ilya Gorbunov
f105329fb4 Fix test dependent on exact documentation wording in stdlib. 2015-11-11 04:05:07 +03:00
Ilya Gorbunov
0fb8419bd1 Update testdata for LoadBuiltinsTest 2015-11-11 03:53:54 +03:00
Ilya Gorbunov
0786027271 Deprecate Range<T> in generated code.
Provide hidden overloads of downTo and until with byte and short parameters for binary compatibility.
2015-11-11 03:53:52 +03:00
Ilya Gorbunov
af9020a010 Update Range and Progression built-in implementations in js library.
No need to define special method mapping for js ranges/progressions.
Support progression companion objects' function fromClosedRange as intrinsic
2015-11-11 03:53:51 +03:00
Ilya Gorbunov
55d4d17dc3 Fix dropped DoubleRange and FloatRange usages in tests 2015-11-11 03:53:49 +03:00
Ilya Gorbunov
6bac3e1986 Drop Ranges, Progressions, ProgressionIterators for Double and Float.
Undeprecate generic Comparable.rangeTo, but return private implementation instead.
Undeprecate contains and coerceIn for generic ranges.
2015-11-11 03:53:47 +03:00
Ilya Gorbunov
4d2f9b82da reversed() behavior changed for progressions. Stepped progression behavior changes: 'end' property is now deprecated, use 'last' instead. 2015-11-11 03:53:45 +03:00
Ilya Gorbunov
ead333531c Update resolve test, since IntRange inherits iterator() from IntProgression and doesn't reimplement it itself. 2015-11-11 03:53:43 +03:00
Ilya Gorbunov
5f675c55ed Fix deprecated ranges and range member usages in tests. 2015-11-11 03:53:42 +03:00
Ilya Gorbunov
5ebb3d20e8 Change internal implementation of progression: use first, last instead of start, end
Keep the end value as it was passed to progression constructor.
Deprecate primary progression constructor and introduce factory method in companion object.
2015-11-11 03:53:40 +03:00
Ilya Gorbunov
2887338f01 Rename InclusiveRange to ClosedRange 2015-11-11 03:53:38 +03:00
Ilya Gorbunov
25da037868 Update range iteration tests and regenerate test data. 2015-11-11 03:53:37 +03:00
Ilya Gorbunov
8a6821d53a Throw correct exception for zero increment.
Deprecate public functions in progression utils.
2015-11-11 03:53:35 +03:00
Ilya Gorbunov
ffa8faab80 Make progression iterators internal. 2015-11-11 03:53:32 +03:00
Ilya Gorbunov
5e6d16103e Remove deprecated ranges from tests and take into account that Byte and Short rangeTo now returns IntRange. 2015-11-11 03:53:31 +03:00
Ilya Gorbunov
854d376988 Eliminate byte and short ranges and progressions from range construction functions' return type. 2015-11-11 03:53:29 +03:00
Ilya Gorbunov
9eb5ba910c Do not reimplement Iterable until Progression is dropped. 2015-11-11 03:53:28 +03:00
Ilya Gorbunov
6ac0ac01b3 Deprecate Byte and Short ranges and progressions.
Inherit TRange from TProgression.
Remove InclusiveRangeProgression and leave generic Progression deprecated.
2015-11-11 03:53:26 +03:00
Ilya Gorbunov
e699ce9e95 Introduce InclusiveRange and InclusiveRangeProgression and deprecate Range and Progression interfaces. 2015-11-11 03:53:25 +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
Ilya Gorbunov
16d56355c3 Special crafting of ClassId when implClassName is nested DefaultImpls 2015-11-11 03:53:20 +03:00
Ilya Gorbunov
2a7a6688d0 Remove obsolete condition from isKotlinJvmCompiledFile() 2015-11-11 03:53:18 +03:00
Ilya Gorbunov
8bdd1e3246 Sorting optimizations: do not make excessive copies, introduce methods to sort the whole array.
#KT-9904 Fixed
2015-11-11 03:29:40 +03:00
Ilya Gorbunov
3e81cdfc5d Deprecate mapIndexedTo for Maps. 2015-11-11 03:12:19 +03:00
Ilya Gorbunov
9323f61eaf Introduce T.addTo(MutableCollection<T>), mapNotNull and mapIndexedNotNull extensions.
#KT-4410 Fixed
2015-11-11 03:12:17 +03:00
Ilya Gorbunov
008a8059cf Introduce filterIndexed
#KT-9502 Fixed
2015-11-11 02:42:52 +03:00
Ilya Gorbunov
ee759c10c8 Minor: regenerate docs. 2015-11-11 02:42:50 +03:00
Valentin Kipyatkov
d829f585f7 Changes on code review 2015-11-11 01:26:20 +03:00
Valentin Kipyatkov
4f9866f62f Created quickfix for KT-9805 2015-11-11 01:26:20 +03:00
Valentin Kipyatkov
80a788cf53 Code transformation 2015-11-11 01:26:20 +03:00
Stanislav Erokhin
a3b11f4214 Created warning for KT-9805
#KT-9805 In Progress
2015-11-11 01:26:20 +03:00
Valentin Kipyatkov
8664d778ad Merged 2 files 2015-11-10 22:24:46 +03:00
Valentin Kipyatkov
f391d194de Presentation for extension property to include receiver type 2015-11-10 22:24:46 +03:00
Valentin Kipyatkov
6a52cc76d0 Code simplifications 2015-11-10 22:24:46 +03:00
Valentin Kipyatkov
6006969ab9 Converted to Kotlin 2015-11-10 22:24:46 +03:00
Nikolay Krasko
774b3269d6 Remove paragraph char - it ruins builds sometimes 2015-11-10 20:46:17 +03:00
Nikolay Krasko
2dd2a8dd65 Forgotten rename for in *.flex files after jet->kt rename 2015-11-10 20:46:17 +03:00
Mikhail Glukhikh
0d35033106 Introduction of CastedClassReceiver and its handling in codegen #KT-6744 Fixed
ClassReceiver converted to Kotlin
Also #KT-7617 Fixed
2015-11-10 20:20:51 +03:00
Natalia Ukhorskaya
e1134b278c Minor: minimize number of parameters 2015-11-10 18:38:21 +03:00
Natalia Ukhorskaya
ea50d8af02 Debugger: initial support for member extension functions in evaluate expression 2015-11-10 18:38:19 +03:00
Natalia Ukhorskaya
ba9e06d25b Make parameter MultiMap 2015-11-10 18:38:15 +03:00
Natalia Ukhorskaya
12c05fc602 Minor: extract functions to separate file 2015-11-10 18:38:13 +03:00
Natalia Ukhorskaya
5fcd5396b6 Add option to extract function for wrapping member extension function with with { } 2015-11-10 18:38:11 +03:00
Natalia Ukhorskaya
1e0b70247b Add debug log for evaluate expression 2015-11-10 18:38:08 +03:00
Natalia Ukhorskaya
6c61d437f1 Insert imports in codeFragment correctly. Add test 2015-11-10 18:37:56 +03:00
Valentin Kipyatkov
fd1ff51233 Minor changes on code review 2015-11-10 17:26:20 +03:00
Valentin Kipyatkov
8942780640 KtCodeFragement to implement getImportDirectives() correctly 2015-11-10 17:26:19 +03:00
Valentin Kipyatkov
afc968fe83 Minor 2015-11-10 17:23:11 +03:00
Valentin Kipyatkov
bba960f1a5 Moved enum to top level 2015-11-10 17:23:11 +03:00
Valentin Kipyatkov
fe7f79428d Intention to import members with '*' 2015-11-10 17:23:11 +03:00
Valentin Kipyatkov
d3f04c6310 Fixed for companion object members 2015-11-10 17:23:11 +03:00
Valentin Kipyatkov
d599b77ece Works also for top level fun - why not? 2015-11-10 17:23:11 +03:00
Valentin Kipyatkov
870fc9284b KT-4945 Intention "Introduce static import" (for single symbol)
#KT-4945 Fixed
2015-11-10 17:23:10 +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
Alexey Sedunov
8389b8e8da Introduce Property: Fix rename of primary occurrence
#KT-9404 Fixed
2015-11-10 16:47:52 +03:00
Alexey Sedunov
29b1c169d5 Refactoring: Get rid of "Jet" in the names of refactoring/quick fixes-related classes 2015-11-10 16:47:50 +03:00
Alexey Sedunov
6ff955b66c Change Signature: Implement improved call processing algorithm
#KT-8953 Fixed
 #KT-9525 Fixed
2015-11-10 16:47:48 +03:00
Alexey Sedunov
b334f92748 J2K: JetFunctionCallUsage 2015-11-10 16:47:46 +03:00
Alexey Sedunov
ff86042f58 J2K: Rename JetFunctionCallUsage (.java to .kt) 2015-11-10 16:47:45 +03:00
Alexey Sedunov
a7e4f73c82 J2K: JetCallableDefinitionUsage 2015-11-10 16:47:44 +03:00
Alexey Sedunov
b1ec5c0672 J2K: Rename JetCallableDefinitionUsage (.java to .kt) 2015-11-10 16:47:43 +03:00
Alexey Sedunov
2476393754 Change Signature: Do not move lambda out of parentheses if it neither wasn't out
before nor corresponds to the last parameter after the refactoring
 #KT-9763 Fixed
2015-11-10 16:47:42 +03:00
Alexey Sedunov
f5e9d3e58f Refactoring: Simplify JetChangeSignature test 2015-11-10 16:47:41 +03:00
Alexey Sedunov
e28a70235a Refactoring: Simplify JetChangeSignature test 2015-11-10 16:47:39 +03:00
Alexey Sedunov
f8b8f9e9f9 J2K: JetChangeSignatureTest 2015-11-10 16:47:38 +03:00
Alexey Sedunov
26f81002d0 J2K: Rename JetChangeSignatureTest (.kt to .java) 2015-11-10 16:47:37 +03:00
Alexey Sedunov
cae7fc7cf4 Change Signature: Fix file comparison in tests 2015-11-10 16:47:35 +03:00
Dmitry Jemerov
de24e70389 update KotlinCoverageExtension according to removal of package facades 2015-11-10 14:45:30 +01:00
Dmitry Jemerov
bb5f47fe95 fixed coverage: correctly apply extensions to run command line
#KT-9464 Fixed
2015-11-10 14:45:30 +01:00
Dmitry Jemerov
ffccef753d one more place where we missed the search scope when highlighting usages
#KT-8904 Fixed
2015-11-10 14:45:29 +01:00
Dmitry Jemerov
1c05750a48 rename JetBundle references in UI Designer forms to KotlinBundle 2015-11-10 14:45:28 +01:00
Dmitry Jemerov
6ced597a73 scope all notifications to a specific project
#KT-9680 Fixed
2015-11-10 14:45:28 +01:00
Dmitry Jemerov
e3f5045343 AddModifierFix is not available when the element is in library code
#KT-9647 Fixed
2015-11-10 14:45:27 +01:00
Dmitry Jemerov
3e3c457326 remove checking for class that no longer exists 2015-11-10 14:45:27 +01:00
Dmitry Jemerov
1d01565262 fix duplicate plugin update notifications: don't queue the next plugin update while the network request from the previous update is still running 2015-11-10 14:45:26 +01:00
Michael Bogdanov
a5771c6c1c Fix for KT-9939: java.lang.VerifyError: Bad type on operand stack for Boolean convenience accessor
#KT-9939 Fixed
2015-11-10 16:17:52 +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
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
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
73cb94a3b2 FakeFileForLightClass: implement API correctly 2015-11-10 14:30:59 +03:00
Pavel V. Talanov
39dacbf3c8 Minor: better toString() 2015-11-10 14:30:58 +03:00
Pavel V. Talanov
1dd7e0edba Minor: do not pass psiManager redundantly 2015-11-10 14:30:57 +03:00
Pavel V. Talanov
6dbe8e8a1b Minor: KtLightClassForFacade remove old todos and fix toString 2015-11-10 14:30:55 +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
Pavel V. Talanov
ec48b54032 Rename KotlinJavaFileStubProvider and remove StubGenerationStrategy class 2015-11-10 14:30:51 +03:00
Pavel V. Talanov
f5c4f82971 Fix exception from backend in light classes mode for null passed as annotation argument 2015-11-10 14:30:50 +03:00
Pavel V. Talanov
7e091d0df4 J2K KotlinJavaFileStubProvider: refactor code 2015-11-10 14:30:48 +03:00
Pavel V. Talanov
75b8985468 J2K KotlinJavaFileStubProvider: autoconvert and minor changes 2015-11-10 14:26:29 +03:00
Pavel V. Talanov
6f02c0593b J2K KotlinJavaFileStubProvider: rename file 2015-11-10 14:25:19 +03:00
Nikolay Krasko
23e35ab112 Teach index working with source roots with package prefix
#KT-9167 Fixed
2015-11-10 01:50:09 +03:00
Nikolay Krasko
c0739ef53c Add prefix information for Java source root (KT-9167 in progress)
#KT-9167 In Progress
2015-11-10 01:50:08 +03:00
Anton Sukhonosenko
c442eb89e3 #KT-5115 Fixed 2015-11-09 22:25:14 +03:00
Alexander Udalov
77138ecdb7 Add intrinsic functions to check availability of classes at runtime
Will be used whenever we add a new class to the runtime and use it in the
generated code: we'll now generate a call to one of these functions in <clinit>
of each class file which references the newly added class
2015-11-09 22:24:42 +03:00
Alexander Udalov
596a74d288 Code cleanup in reflection.jvm, generator scripts 2015-11-09 22:24:41 +03:00
Alexander Udalov
75bb15a9fc Do not wrap callable references when a special option is enabled 2015-11-09 22:24:41 +03:00
Alexander Udalov
1576160390 Improve implementation of callable reference superclasses
Previously to use reflection on them, you had to wrap an already created object
with a "Reflection.function" or "Reflection.propertyN" call, which the JVM
back-end was doing. This was not optimal in several senses and current solution
fixes that
2015-11-09 22:24:40 +03:00
Alexander Udalov
7d32524754 Do not fail with type cast when not needed in reflection.jvm 2015-11-09 22:24:40 +03:00
Alexander Udalov
1c889c4e67 Support equals, hashCode, toString for ::-references without reflection 2015-11-09 22:24:39 +03:00
Alexander Udalov
baa28de865 Add factory methods to create class references with internal names
Will be used in future versions to support references to mapped mutable
collections
2015-11-09 22:24:39 +03:00
Dmitry Jemerov
e64a270d1a more renames to get rid of "Jet" in class and method names 2015-11-09 19:07:11 +01:00
Michael Nedzelsky
a3241637ce #fix KT-9881 Incorrect error re: internal visibility
#KT-9881 Fixed
2015-11-09 17:41:00 +03:00
Mikhail Glukhikh
b468d5b0c6 No smart casts to Nothing? 2015-11-09 16:36:37 +03:00
Mikhail Glukhikh
2d9fbf5696 Always null detection 2015-11-09 16:36:34 +03:00
Dmitry Jemerov
ed1c94d0f9 remove incorrect and unnecessary TextConsoleBuilder initialization 2015-11-09 14:16:31 +01:00
Michael Bogdanov
7147c84396 Fix for KT-9897: Cannot pop operand off an empty stack" with -= on ArrayList element
#KT-9897 Fixed
2015-11-09 16:17:24 +03:00
Valentin Kipyatkov
4943a9fb35 Minor changes on code review 2015-11-09 15:45:38 +03:00
Valentin Kipyatkov
9968345845 Renames 2015-11-09 15:37:48 +03:00
Valentin Kipyatkov
d44b1eeb7e KT-9884 Completion in Evaluate Expression crashes
#KT-9884 Fixed
2015-11-09 15:37:48 +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
0ac60701fc Reused code 2015-11-09 15:37:46 +03:00
Valentin Kipyatkov
0c93ff5f1d Moved method 2015-11-09 15:37:46 +03:00
Valentin Kipyatkov
55612757cf More correct API 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
ea804ed76e Makes no sense to return method names from PsiShortNamesCache if methods by name are not returned 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
Nikolay Krasko
7be9699263 Make it possible to generate getTestsRoot() method with the test directory
Method can be used in setUp()
2015-11-07 01:27:35 +03:00
Nikolay Krasko
178aba54dd Test it's safe to call PsiElement methods on Kotlin light elements 2015-11-07 01:27:34 +03:00
Alexey Tsvetkov
7c752c1463 Minor: generate tests 2015-11-06 20:29:31 +03:00
Alexey Tsvetkov
8f43714c49 Fix minor issues after review 2015-11-06 16:46:40 +03:00
Alexey Tsvetkov
7d104d02dd Generate tests 2015-11-06 16:44:52 +03:00
Alexey Tsvetkov
ce7d1eb8e2 Add incremental compilation tests with lookup cache enabled 2015-11-06 16:44:52 +03:00
Alexey Tsvetkov
a3aa91551c Extract LookupStorage from LookupTrackerImpl 2015-11-06 16:44:52 +03:00
Alexey Tsvetkov
8b4d0ea077 Minor: rename file LookupTrackerImpl.kt -> LookupStorage.kt 2015-11-06 16:44:52 +03:00
Alexey Tsvetkov
322815c7de Fix minor naming/formatting issues after review 2015-11-06 16:44:51 +03:00
Alexey Tsvetkov
67878fe13a Use new lookup tracker only when experimental incremental compilation is enabled 2015-11-06 16:44:51 +03:00
Alexey Tsvetkov
7ebc58c690 Hash files without collisions 2015-11-06 16:44:51 +03:00
Alexey Tsvetkov
7572fb47d3 Remove entries when files are removed 2015-11-06 16:44:51 +03:00
Alexey Tsvetkov
87d836cd67 Hash file names 2015-11-06 16:44:51 +03:00
Alexey Tsvetkov
2160948980 Move BasicMapsOwner 2015-11-06 16:44:51 +03:00
Alexey Tsvetkov
dae5b8e39e Move all incremental cache value/externalizing types to corresponding files 2015-11-06 16:44:51 +03:00
Alexey Tsvetkov
9564a7a828 Extract BasicMapsOwner 2015-11-06 16:44:34 +03:00
Alexey Tsvetkov
f6f300d903 Move LookupMap 2015-11-06 16:43:32 +03:00
Alexey Tsvetkov
c9663340c9 Save lookups to incremental cache 2015-11-06 16:43:32 +03:00
Mikhail Glukhikh
873550b0bb lateinit setter now must have the same visibility as its property visibility 2015-11-06 13:34:00 +03:00
Michael Bogdanov
9d3fa7da80 Test for obsolete KT-8189: java.lang.UnsupportedOperationException: Don't know how to generate
#KT-8189 Obsolete
2015-11-06 12:17:07 +03:00
Michael Bogdanov
0619ef47ac Fix for KT-9877: CompilationError: Cannot pop operand of empty stack
#KT-9877 Fixed
2015-11-06 11:46:13 +03:00
Michael Bogdanov
4d77181692 Fix for KT-9855: java.lang.IllegalAccessError when using private package level operator method
#KT-9855 Fixed
2015-11-06 11:46:12 +03:00
Michael Bogdanov
bd2b01ac1c Fix for KT-5150: Accessors for private methods are not generated for get/set conventions
#KT-5150 Fixed
2015-11-06 11:46:12 +03:00
Michael Bogdanov
0fcaaa80df Fix for KT-9140: Default parameters are passed as nulls when using indexing [ ] invocation
#KT-9140 Fixed
2015-11-06 11:46:11 +03:00
Mikhail Glukhikh
b556037915 Smart casts to nothing after comparison with null 2015-11-06 10:57:06 +03:00
Michael Nedzelsky
981d471ebe fix KT-9843 Bug in incremental compilation: module is not recompiled when optional parameter added
and KT-8434 Removing parameter with default value from function in different module breaks incremental compilation

#KT-9843 Fixed

#KT-8434 Fixed
2015-11-06 07:45:46 +03:00
Michael Nedzelsky
3dbb117598 fix KT-7042 Providing return type for property setter is not reported as error
#KT-7042 Fixed
2015-11-06 06:32:20 +03:00
Michael Nedzelsky
e6a2bd05d4 fix KT-9652 Warning to specify expected type as Any? when it is already Any?
#KT-9652 Fixed
2015-11-06 06:32:07 +03:00
Michael Nedzelsky
c318a13e6c Error on using extension function type as an upper bound 2015-11-06 06:31:52 +03:00
Ilya Gorbunov
ee46ec1126 Drop deprecated threading extensions. 2015-11-06 01:12:11 +03:00
Ilya Gorbunov
850c1518c8 Fix Delegates.lazy usages in testData 2015-11-06 01:12:09 +03:00
Ilya Gorbunov
70fdc379ef Drop deprecated Delegates.lazy and blockingLazy and ObservableProperty constructor-like function 2015-11-06 01:12:07 +03:00
Ilya Gorbunov
219e69be22 Drop deprecated join function.
#KT-6909 Fixed
2015-11-06 01:12:05 +03:00
Ilya Gorbunov
de77ee6d63 Replace deprecated join with joinToString in idl2k 2015-11-06 01:12:04 +03:00
Ilya Gorbunov
62b532ec66 Replace deprecated join with joinToString in testData 2015-11-06 01:12:02 +03:00
Ilya Gorbunov
f3ff2e2e76 Replace deprecated join with joinToString 2015-11-06 01:12:00 +03:00
Ilya Gorbunov
183523cf24 Refactoring: move engine related classes to subdirectory. 2015-11-06 00:48:13 +03:00
Ilya Gorbunov
f9bfeb0f32 Doc templating: name things properly 2015-11-06 00:46:05 +03:00
Ilya Gorbunov
cb79aadb9d Accept out-projections of arrays for unzip. 2015-11-06 00:37:01 +03:00
Stanislav Erokhin
55157df3eb Removed MemberScope.ownerDescriptor 2015-11-06 00:01:35 +03:00
Stanislav Erokhin
22f78b148c Removed usages of MemberScope.ownerDescriptor property. 2015-11-06 00:01:34 +03:00
Stanislav Erokhin
b8e828e040 Minor. Changed signature of SamConversionResolver.resolveSamConstructor 2015-11-06 00:01:33 +03:00
Stanislav Erokhin
c73d091c52 Minor. Fix compilation(KT-9898 Impossible implement kotlin interface in java) 2015-11-06 00:01:31 +03:00
Stanislav Erokhin
b3e69a5f5d Created common supertype for HierarchicalScope and MemberScope-- ResolutionScope 2015-11-06 00:01:30 +03:00
Stanislav Erokhin
c4582d0e0c Replace function MemberScope.getContainingDeclaration() to property ownerDescriptor 2015-11-06 00:01:30 +03:00
Valentin Kipyatkov
52dc23012f Changed parsing of object and enum entries to drop "KtObjectDeclarationName" 2015-11-05 23:21:22 +03:00
Natalia Ukhorskaya
03cda7f4d1 Access javaTask.classpath property only in doFirst because otherwise it doesn't contain classes added after apply of kotlin plugin
#KT-7277 Fixed
 #KT-9899 Fixed
2015-11-05 19:19:15 +03:00
Natalia Ukhorskaya
b54afdf144 Minor: rename methods 2015-11-05 19:19:15 +03:00
Natalia Ukhorskaya
05dbb875a9 Minor: fix warnings 2015-11-05 19:19:14 +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
Valentin Kipyatkov
218c0cfff7 KT-9875 False unused import in kotlinSpacingRules.kt
#KT-9875 Fixed
2015-11-05 17:47:54 +03:00
Mikhail Glukhikh
5e9aa38950 More precise type handling for equality #KT-2311 Fixed 2015-11-05 17:29:34 +03:00
Sergey Mashkov
137a20e0ed JS: better diagnostics for missing test files 2015-11-05 14:41:30 +01:00
Sergey Mashkov
703367c5c7 Update tests due to removed DOM utilities 2015-11-05 14:41:30 +01:00
Sergey Mashkov
20aff28266 JS: update webdemo canvas examples 2015-11-05 14:41:29 +01:00
Sergey Mashkov
3b68aaa84c JS: fix rhino 64k issue 2015-11-05 14:41:29 +01:00
Sergey Mashkov
29973d714e Remove DOM utilities, put temporary to JS to keep compatibility 2015-11-05 14:41:28 +01:00
Sergey Mashkov
e9fbebaea2 JS: drop deprecated declarations 2015-11-05 14:41:28 +01:00
Sergey Mashkov
77d3db635b Remove browser.document 2015-11-05 14:17:44 +01:00
Alexander Udalov
dce64c974f Don't output error for "kotlinc -version"
#KT-9676 Fixed
2015-11-05 15:13:19 +03:00
Alexander Udalov
5335a81f7d Minor, add JvmField to a constant 2015-11-05 15:11:33 +03: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
Alexander Udalov
748c0e7149 Don't assert that annotation class has constructor in AnnotationDeserializer
#KT-9758 Fixed
2015-11-05 13:42:31 +03:00
Ilya Gorbunov
1a0c2e2cf6 In-place sorting.
#KT-9034
2015-11-05 09:04:31 +03:00
Ilya Gorbunov
5e9b7b9e60 Collections.sort without comparator now uses natural order.
#KT-9771 Fixed
2015-11-05 09:03:30 +03:00
Ilya Gorbunov
d5edbfd005 Refactoring: do not use own classes for nullsFirst and nullsLast wrappers of natural order. 2015-11-05 09:03:29 +03:00
Ilya Gorbunov
fa261a7697 Add override for default method of Comparator from JDK8 2015-11-05 09:03:07 +03:00
Ilya Gorbunov
2b676e08bc Introduce naturalOrder<T> and reverseOrder<T> comparators. 2015-11-05 09:03:05 +03:00
Ilya Gorbunov
83fef68876 Add more cases to array in-place reversing test.
Add array of objects case to all reversing tests.
2015-11-05 09:03:03 +03:00
Ilya Gorbunov
4fc54a12b8 In-place reversing.
#KT-9034
2015-11-05 09:02:58 +03:00
Ilya Gorbunov
1400bdc09a Do not allow removeSurrounding remove overlapping prefix and suffix. 2015-11-04 22:19:59 +03:00
Ilya Gorbunov
05fd2b012a Provide overloads both for Strings and CharSequences of filter, filterNot, reversed and partition 2015-11-04 22:19:57 +03:00
Ilya Gorbunov
62d6bcaa6d Provide overloads both for Strings and CharSequences of removePrefix, removeSuffix, removeSurronding, trim* and pad*, replaceRange & removeRange 2015-11-04 22:19:55 +03:00
Ilya Gorbunov
2ed611e2c5 Docs corrections. 2015-11-04 22:19:52 +03:00
Ilya Gorbunov
0dd7e398c7 Use reverse indexed iteration in last and lastOrNull with predicate for CharSequences and Strings. 2015-11-04 22:19:50 +03:00
Ilya Gorbunov
8c16fad8b1 Make more string tests cross-platform. 2015-11-04 22:19:48 +03:00
Ilya Gorbunov
5373c380ac Remove obsolete extensions conflicting with stdlib 2015-11-04 22:19:46 +03:00
Ilya Gorbunov
f20bfa7fb8 Fix test expectation failures caused by changed signatures. 2015-11-04 22:19:45 +03:00
Ilya Gorbunov
d021a324aa Test CharSequence extension methods both for String and StringBuilder 2015-11-04 22:19:43 +03:00
Ilya Gorbunov
64338e896d Use CharSequence in split, splitToSequence, lines 2015-11-04 22:19:41 +03:00
Ilya Gorbunov
8c5ac26613 Use CharSequence in repeat and joinToString. 2015-11-04 22:19:39 +03:00
Ilya Gorbunov
b4b84a38d5 Use templating in the docs for generated code to name things properly. 2015-11-04 22:19:37 +03:00
Ilya Gorbunov
5b055ac663 Preserve type of subsequence in drop* and take* operations.
Validate argument of drop (required in JS, more meaningful exception in JVM)
2015-11-04 22:19:35 +03:00
Daniel Rothmaler
67229401c6 Add set operator to make the work with StringBuilder more list-like.
Make StringBuilder.set jvm-only.
Move jvm-specific test.
2015-11-04 22:19:33 +03:00
Ilya Gorbunov
e155e426c2 Implement CharSequence.regionMatches and generalize depending String extensions to take CharSequence.
Add hidden declarations for replaced overloads with String receiver in hand-written code.
2015-11-04 22:19:31 +03:00
Ilya Gorbunov
47560d3db1 Add hidden declarations for replaced overloads with String receiver in hand-written code. 2015-11-04 22:19:29 +03:00
Ilya Gorbunov
59b67b32c4 Add hidden declarations for replaced overloads with String receiver in generated code. 2015-11-04 22:19:27 +03:00
Ilya Gorbunov
935e606b64 Generalize String extensions to take CharSequence as receiver and parameters where applicable: generated code.
Exclude Strings family from default families.
2015-11-04 22:19:26 +03:00
Ilya Gorbunov
4a621cbb5f Generalize String extensions to take CharSequence as receiver and parameters where applicable. 2015-11-04 22:19:24 +03:00
Ilya Gorbunov
05615dd48b Introduce String.toByte()
#KT-8833 Fixed
2015-11-04 22:19:22 +03:00
Ilya Gorbunov
9bbe0d67ff Do not treat directory with copied test sources for js library as source root, as it confuses debugger under certain circumstances.
Remove duplicated test.
2015-11-04 22:19:20 +03:00
Zalim Bashorov
c456ab0f74 Minor: refactoring ExpressionTypingUtils#checkVariableShadowing -- inline the search older descriptor 2015-11-04 22:15:39 +03:00
Zalim Bashorov
1eb9bf2592 Minor: remove accidentally forgotten Deprecated annotation 2015-11-04 22:15:37 +03:00
Zalim Bashorov
04fed203e4 Add tests for lookups to enum static scope and to companion object scope 2015-11-04 22:15:37 +03:00
Zalim Bashorov
1e51e333ab Minor: add comments to LazyJavaStaticClassScope, LazyJavaPackageScope and StaticScopeForKotlinClass 2015-11-04 22:11:34 +03:00
Zalim Bashorov
a6855116b8 Track lookups for nested/inner Java classes 2015-11-04 22:09:55 +03:00
Stanislav Erokhin
87f32ef07b Minor. fix testdata 2015-11-04 14:28:29 +03:00
Stanislav Erokhin
a90ca14033 Removed KtScope.Empty and created util function emptyScope 2015-11-04 14:28:28 +03:00
Stanislav Erokhin
4e891a3f98 Minor. moved util method to Companion of LexicalScope 2015-11-04 14:28:27 +03:00
Stanislav Erokhin
2c7746cafd Minor. Simplified code. 2015-11-04 14:28:27 +03:00
Stanislav Erokhin
b02da0dc2f Created custom LexicalScope wrapper for resolving callable reference. 2015-11-04 14:28:26 +03:00
Stanislav Erokhin
f7629b0c84 Removed getAllDescriptors() and getOwnDeclaredDescriptors() from KtScope 2015-11-04 14:28:25 +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
Stanislav Erokhin
4c36e20242 Moved FilteringScope to frontend module 2015-11-04 12:41:32 +03:00
Stanislav Erokhin
6412df2e0b Change return type of KtScope.getProperties() 2015-11-04 12:41:32 +03:00
Stanislav Erokhin
7cd667c0e3 Removed unused methods from KtScope. 2015-11-04 12:41:31 +03:00
Stanislav Erokhin
cc56cf6292 Removed several hacks from ScopeUtils.kt 2015-11-04 12:41:30 +03:00
Stanislav Erokhin
711daa459a Minor. Removed util method LexicalScope.asKtScope() 2015-11-04 12:41:30 +03:00
Stanislav Erokhin
40146a0df8 Minor. Make WritableScopeStorage abstract class 2015-11-04 12:41:29 +03:00
Stanislav Erokhin
5c6134af81 Minor. Removed WritableScopeImpl. 2015-11-04 12:41:28 +03:00
Stanislav Erokhin
a5c9f4d353 Minor. removed usage WritableScopeImpl from tests 2015-11-04 12:41:27 +03:00
Stanislav Erokhin
c8d9cfcd7b Minor. removed usage WritableScopeImpl from JetTypeCheckerTest 2015-11-04 12:41:27 +03:00
Stanislav Erokhin
6ad23f23c5 Minor. removed useless call 2015-11-04 12:41:26 +03:00
Stanislav Erokhin
e0bacb2680 Minor. remove usage of WritableScopeImpl 2015-11-04 12:41:25 +03:00
Stanislav Erokhin
c1fa973324 Minor. remove usage of WritableScope 2015-11-04 12:41:25 +03:00
Stanislav Erokhin
71620d2ed1 Minor. Move LockLevel to LexicalWritableScope 2015-11-04 12:41:24 +03:00
Stanislav Erokhin
fe61f41a94 Minor. remove unused import 2015-11-04 12:41:23 +03:00
Nikolay Krasko
a614dfd90c Fix build 2015-11-04 11:50:25 +03:00
Nikolay Krasko
e10f7fb464 Don't report missing getValue/setValue method error when it's was impossible to finish resolve
#KT-9803 Fixed
2015-11-04 02:31:15 +03:00
Nikolay Krasko
f518f5fb9f Extension operator function should be automatically imported for java function with the same name (KT-9406)
There's no need to import extension for Java operators anymore. Import for Kotlin functions.

 #KT-9406 Fixed
2015-11-04 02:31:12 +03:00
Nikolay Krasko
4ce87665c3 Don't store diagnostics in actions as they might contain descriptors and this will prevent them from GC 2015-11-04 02:31:10 +03:00
Ilya Gorbunov
05c2edf60c Drop deprecated merge functions. 2015-11-04 00:05:47 +03:00
Ilya Gorbunov
65a98d6968 Temporary drop mapNotNull and mapNotNullTo.
Disable mapNotNull tests

#KT-4410
2015-11-04 00:05:45 +03:00
Ilya Chernikov
b71fec985f Adding possibility to skip params inheritance on daemon jvm options creation, refactoring appropriate api, using it to fix tests 2015-11-03 21:56:31 +01:00
Ilya Gorbunov
3a82225201 Deprecate toGenerator and toLinkedList extensions. 2015-11-03 22:41:06 +03:00
Dmitry Jemerov
0997f78764 fix CodeConformanceTest redux 2015-11-03 18:32:06 +01:00
Dmitry Jemerov
fd2c75f03b fix CodeConformanceTest 2015-11-03 17:34:56 +01:00
Ilya Chernikov
10036d7ef3 Enabling parallel builds in JPS without daemon, enabling application environment disposing in tests, introducing keepalive property constant 2015-11-03 14:18:22 +01:00
Ilya Chernikov
63e1fa4cc0 Simplifying cleanup in gradle plugin after introducing ZipHandle.clearFileAccessorCache method in the platform, minor refactoring 2015-11-03 14:18:21 +01:00
Ilya Chernikov
90bb8b2be9 Generalizing daemon process shutdown mechanism 2015-11-03 14:18:21 +01:00
Ilya Chernikov
6a1c82d101 hiding compiler digest management inside the compiler service, implement simple lazy checking mechanism, using it from clients 2015-11-03 14:18:20 +01:00
Ilya Chernikov
2fa7b53d2c Implementing utilities to detect OS type and apprpriate location of runtime data files, using it to determine daemon run dir. Fixes KT-9696 2015-11-03 14:18:19 +01:00
Ilya Chernikov
bf16efb8cc Adding test for parallel compilation with daemon 2015-11-03 14:18:18 +01:00
Ilya Chernikov
2dfca72f38 Passing port through daemon client API to allow port reusing for client-side components, introducing operations tracer interface for testing purposes 2015-11-03 14:18:17 +01:00
Dmitry Jemerov
3f46a13a56 regenerate tests 2015-11-03 14:08:59 +01: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
Michael Bogdanov
86f8845c00 Fix for KT-8928: NoSuchMethodError on private property setter in companion object
#KT-8928 Fixed
2015-11-03 15:41:22 +03:00
Michael Bogdanov
559b85caa8 Test for obsolete KT-6382: Incorrect bridge method calls are generated for member extension functions with default parameters
#KT-6382 Obsolete
2015-11-03 15:40:16 +03:00
Michael Bogdanov
9daa44566b Fix for KT-5589: VerifyError when default value for parameter of local function is obtained from closure
#KT-5589 Fixed
2015-11-03 15:40:16 +03:00
Anton Sukhonosenko
141ffa27dc val / var are now forbidden on a loop multi declaration parameter #KT-6274 Fixed
VAL_OR_VAR_ON_LOOP_MULTI_PARAMETER error added
KtValVarKeywordOwner interface added for PSIs that have getValOrVarKeyword method
2015-11-03 15:30:50 +03:00
Zalim Bashorov
54cb575819 Minor: fix generating LookupTracker tests 2015-11-03 14:01:47 +03:00
Valentin Kipyatkov
7a47e53398 Added a test 2015-11-03 13:43:28 +03:00
Mikhail Glukhikh
41ebfd025e More precise diagnostics of smart cast impossible #KT-7240 Fixed 2015-11-03 13:38:51 +03:00
Dmitry Jemerov
16a8e8f6f0 test fixed 2015-11-03 11:18:14 +01:00
Mikhail Glukhikh
03aaddd379 More correct handling of possible type set during assignment #KT-8229 Fixed 2015-11-03 12:49:21 +03:00
Valentin Kipyatkov
bbea70a005 Minor changes on code review 2015-11-03 11:46:19 +03:00
Valentin Kipyatkov
c11bf32594 More correct shadowed declarations filtering in completion 2015-11-03 11:46:19 +03:00
Valentin Kipyatkov
67cf9f9510 More correct & quick check of descriptor being from library 2015-11-03 11:46:19 +03:00
Valentin Kipyatkov
b05d490eeb Performance optimization in completion: search context variables of functional types later 2015-11-03 11:46:18 +03:00
Mikhail Glukhikh
0a5a5a2e36 More precise diagnostics is added for smart cast impossible #KT-8810 Fixed 2015-11-03 11:15:58 +03:00
Michael Bogdanov
15eaa15b65 Fix for KT-7421: Unable to inherit from inner class
Fix for KT-6708: Compiler Error when extending open inner class: "java.lang.RuntimeException: Error generating primary constructor of class InnerB with kind IMPLEMENTATION"

  #KT-7421 Fixed
  #KT-6708 Fixed
2015-11-03 10:14:57 +03:00
Michael Bogdanov
65b85711e3 Fix for KT-3335: Creating imported super class' inner class fails in codegen
#KT-3335 Fixed
2015-11-03 10:14:56 +03:00
Dmitry Jemerov
3bd7f87d2b rename "Jet" from names of IDE classes; consistently use Kt prefix for PSI elements and classes directly related to specific PSI elements 2015-11-02 18:49:35 +01:00
Pavel V. Talanov
fff404780c Add capabilities to moduleDescriptor as a way to put user data into module
Add OriginCapability to ide modules
2015-11-02 20:38:10 +03:00
Dmitry Jemerov
736b496f6a drop deprecated @platformName and @platformStatic annotations 2015-11-02 17:00:44 +01: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
ce4a950697 AbstractSearcherTest: check member kind in test data not the psi implementation class
It is not what should be tested in this test
2015-11-02 18:39:01 +03:00
Pavel V. Talanov
78bb44850d Minor: KotlinAnnotationLightMethod -> KotlinLightAnnotationMethod 2015-11-02 18:39:00 +03:00
Pavel V. Talanov
9f5c0741bd KotlinLightField: create KotlinLightEnumConstant based on delegate psi, not whether could find original declaration
This was not true for decompiled classes and led to enum entries from kotlin compiled files being unresolved in java
2015-11-02 18:38:58 +03:00
Pavel V. Talanov
226c2e3b5c Implement getParent for KotlinLightClassForDecompiledDeclaration
Fixes a bug where java resolve would be unable to resolve return types of CompiledKotlinEnum.values()/valueOf() methods
Tested by EnumAutoGeneratedMethods java against kotlin checker test
2015-11-02 18:38:56 +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
e5f075c7f6 Refactor light fields: move all implementation into one file and prettify code 2015-11-02 18:38:52 +03:00
Pavel V. Talanov
e6b498f943 J2K KotlinLightField: convert and fix compilation 2015-11-02 18:38:50 +03:00
Pavel V. Talanov
d7519225a0 J2K KotlinLightField: rename file 2015-11-02 18:38:49 +03:00
Pavel V. Talanov
f8efdacefd Refactor light methods: drop KotlinLightMethodForTraitFake and KotlinNoOriginLightMethod
Move two remaining meaningful implementation into one place
Move code that choose which implementation to use out of KotlinWrappingLightClass
2015-11-02 18:38:47 +03:00
Pavel V. Talanov
bca516bac3 KtClassBody: get parent by stub is possible 2015-11-02 18:38:43 +03:00
Pavel V. Talanov
be668fc4f5 Introduce JavaAgainstKotlinBinariesTest 2015-11-02 18:38:42 +03:00
Pavel V. Talanov
506b5509f3 KotlinAndJavaCheckerTest -> JavaAgainstKotlinSourceTest and make it generated 2015-11-02 18:38:38 +03:00
Pavel V. Talanov
6b391d6ed2 Make sure constant values for primary constructor parameters default values are written to trace when building light classes for annotation classes 2015-11-02 18:38:37 +03:00
Pavel V. Talanov
03d57e91ec J2K ValueParameterDescriptorImpl: convert and prettify 2015-11-02 18:38:33 +03:00
Pavel V. Talanov
bbd047f932 J2K ValueParameterDescriptorImpl: rename file 2015-11-02 18:38:32 +03:00
Pavel V. Talanov
dc1fbe89ec J2K ValueParameterDescriptor inteface in one go 2015-11-02 18:38:30 +03:00
Pavel V. Talanov
4a3632f70e Backend: generate default values for annotation parameters in light classes mode 2015-11-02 18:38:26 +03:00
Pavel V. Talanov
0b11dc1d7f KotlinAndJavaCheckerTest: Add test for annotating java code with kotlin annotations 2015-11-02 18:38:25 +03:00
Pavel V. Talanov
6a7ecbfd02 Add completion test for annotation parameter 2015-11-02 18:38:23 +03:00
Pavel V. Talanov
5f4bb4e941 Add test for annotation parameter reference 2015-11-02 18:38:22 +03:00
Pavel V. Talanov
69b3e5e21e Add light class test for annotation class 2015-11-02 18:38:20 +03:00
Pavel V. Talanov
37c17ba71e Light classes: correct wrappers for annotation methods 2015-11-02 18:38:19 +03:00
Nikolay Krasko
cde6388e26 getValue and setValue are now operators 2015-11-02 18:23:42 +03:00
Zalim Bashorov
5d72629b0b Add test for lookups in generic constraints; Add cases with lookup to companion and nested object; 2015-11-02 18:18:37 +03:00
Zalim Bashorov
1cf0ca9287 Minor: add new entries to NoLookupLocation and remove UNSORTED 2015-11-02 18:18:36 +03:00
Zalim Bashorov
d5bccd8cdc Minor: remove the no longer needed function KtScope::getClassifier(Name) 2015-11-02 18:18:36 +03:00
Zalim Bashorov
16d585e204 Don't track lookups:
* when find local variables
  we don't need them for incremental compilation;
* when check overrides
  we going to track inheritance separatly;
* when get companion object descriptor;
* when find Descriptor by fqname
  isn't interesting now because used from light-classes and and java-loder;
* when create qualifier
  we already looked up names in this context before.
2015-11-02 18:18:35 +03:00
Zalim Bashorov
2741215ed2 Don't track lookups from deserializer & java loader 2015-11-02 18:18:35 +03:00
Zalim Bashorov
d78d96a856 Don't track lookups to EnumEntryScope and when check names in constraints 2015-11-02 18:18:34 +03:00
Zalim Bashorov
5a6bcea826 Introduce location in SamConversionResolver::resolveSamConstructor and provide right location in usages 2015-11-02 18:18:33 +03:00
Zalim Bashorov
4cb5398c04 Add tests for lookups to declarations form Java 2015-11-02 18:18:32 +03:00
Zalim Bashorov
519172f182 Add tests for lookups to deserialized and java scopes 2015-11-02 18:18:32 +03:00
Zalim Bashorov
3484c43c8c Minor: fix testdata 2015-11-02 18:18:31 +03:00
Zalim Bashorov
24037c8bf4 Added "touch" command to incremental tests and implemented; Implemented more accurate checking lookups after modifications 2015-11-02 18:18:31 +03:00
Zalim Bashorov
c6aa94d30a Track lookups in LazyJavaScope ans LazyJavaPackageScope 2015-11-02 18:18:30 +03:00
Zalim Bashorov
47f1975879 Track lookups in DeserializedMemberScope 2015-11-02 18:18:29 +03:00
Zalim Bashorov
a5d8b47083 Refactoring: introduced val location: LocationInfo? in LookupLocation and use it in LookupTracker::record 2015-11-02 18:18:29 +03:00
Zalim Bashorov
81a288b42c Add LookupTracker to DeserializationComponents 2015-11-02 18:18:28 +03:00
Zalim Bashorov
f1638bf6fd Minor: simplify code 2015-11-02 18:18:27 +03:00
Alexey Sedunov
520e90acf1 Minor: Use kotlin.lazy instead of kotlin.Delegates.lazy in KtPsiFactory.CallableBuilder 2015-11-02 15:15:44 +03:00
Alexey Sedunov
5e223927ea Change Signature: Match calls of different overloads generated due to @JvmOverloads annotation
#KT-9020 Fixed
2015-11-02 15:15:43 +03:00
Alexey Sedunov
6b346d9e77 Change Signature: Drop light method filtering as old-style package facades are not supported anymore 2015-11-02 15:15:41 +03:00
Alexey Sedunov
7ce6f58c27 Change Signature: Constraint indices of parameters generated for overloaded versions of function with @JvmOverloads annotation
#KT-9762 Fixed
2015-11-02 15:15:40 +03:00
Alexey Sedunov
6a72b51677 Change Signature: Run tests with Kotlin stdlib 2015-11-02 15:15:39 +03:00
Alexey Sedunov
4f09bdfe70 Change Signature: Placed kotlin processor after the java one. Fix processUsage() to pass non-Kotlin usages to further processors (if any)
#KT-9219 Fixed
2015-11-02 15:15:38 +03:00
Alexey Sedunov
307778ba79 J2K: JetChangeSignatureUsageProcessor 2015-11-02 15:15:36 +03:00
Alexey Sedunov
dc3a799acb J2K: Rename JetChangeSignatureUsageProcessor.java to .kt 2015-11-02 15:15:35 +03:00
Alexey Sedunov
1de3faf3f5 Codegen: Fix origin of overloaded methods generated for constructors with @JvmOverloads
Find Usages: Add tests for declarations annotated with @JvmOverloads
 #KT-8534 Fixed
2015-11-02 15:15:34 +03:00
Alexey Sedunov
b9ed3b91be Change Signature: Fix descriptor comparison when receiver type is changed
#KT-9201 Fixed
2015-11-02 15:15:33 +03:00
Alexey Sedunov
937b8725c6 Change Signature/Rename: Fix processing of named arguments when renaming parameter of extension function
#KT-8605 Fixed
2015-11-02 15:15:32 +03:00
Alexey Sedunov
18ed3055ee Introduce Variable: Allow introduction of variables with 'dynamic' type
#KT-8483 Fixed
2015-11-02 15:15:31 +03:00
Alexey Sedunov
6dd58ad197 Inline: Fix inlining of if-expressions into qualified expressions
#KT-8008 Fixed
2015-11-02 15:15:29 +03:00
Alexey Sedunov
89132b3f66 Generate Secondary Constructor: Forbid inside of class with explicit primary constructor 2015-11-02 15:15:28 +03:00
Alexey Sedunov
22393d4cd2 Formatter: Use formatter to automatically insert semicolons after the last enum entry when needed 2015-11-02 15:15:26 +03:00
Dmitry Petrov
d060687775 Package vs class conflict in qualifier resolution:
- add test for unresolved 'a.a' after 'import a.a';
- added TODO in copy-paste test for 'a.a'
2015-11-02 10:22:50 +03:00
Dmitry Petrov
e1cb13bd90 Qualifier no longer defers "(nested) class vs package" resolution.
Consider FQN 'a.b.c'.
If 'a' is a classifier in the current scope,
    resolve rest in the corresponding class scope.
Otherwise (if 'a' is a package),
    find the maximum possible prefix 'a.b' resolving to a package,
    resolve rest in the corresponding package scope.
2015-11-02 10:22:50 +03:00
Alexander Udalov
a950f36fd7 Minor, fix test data 2015-10-31 13:52:04 +03:00
Stanislav Erokhin
25a168d2a4 Minor. Fix potential deadlock 2015-10-31 10:01:08 +03:00
Stanislav Erokhin
77411b2181 Allowed call value with extension function type as simple function type. 2015-10-31 10:01:07 +03:00
Denis Zharkov
b6f724cf58 Disconnect loops between upper bounds of type parameters
#KT-9759 Fixed
2015-10-31 09:33:46 +03:00
Denis Zharkov
9b4ad1466a Minor. Extract 'getAllUpperBounds' 2015-10-31 09:33:46 +03:00
Denis Zharkov
18097c0ab7 Introduce 'SupertypeLoopsResolver' and inject it's impls 2015-10-31 09:33:46 +03:00
Denis Zharkov
0bc5043c75 Extract and convert 'findLoopsInSupertypesAndDisconnect' 2015-10-31 09:33:45 +03:00
Denis Zharkov
8ba2dc5530 Simplify detecting loops in classes supertypes 2015-10-31 09:33:45 +03:00
Yan Zhulanow
33d67a3bf4 Fix JvmField applicability test data
(Annotation is not applied both to field & getter now)
2015-10-31 04:30:24 +03:00
Alexander Udalov
b5f89100f6 Remove obsolete SCRIPT markers 2015-10-30 23:41:32 +03:00
Alexander Udalov
c75d96b82c Add testcase for fixed issue
#KT-9850 Fixed
2015-10-30 23:41:10 +03:00
Michael Nedzelsky
48929f3edf Test for obsolete KT-9277
#KT-9277 Obsolete
2015-10-30 18:57:48 +03:00
Michael Nedzelsky
dbc00baa48 Test for obsolete KT-5508
#KT-5508 Obsolete
2015-10-30 18:57:45 +03:00
Michael Nedzelsky
947b4d4ce8 Test for obsolete KT-3343
#KT-3343 Obsolete
2015-10-30 18:57:42 +03:00
Valentin Kipyatkov
d38b3146db More correct completion of overrides in constructor parameters - '$' character confuses parser 2015-10-30 17:43:28 +03:00
Valentin Kipyatkov
c2cf95bcd4 KT-9787 Auto-popup parameter info on typing '['
#KT-9787 Fixed
2015-10-30 17:43:28 +03:00
Valentin Kipyatkov
def0e01e8d KT-9684 Add kotlinx.android.synthetic package to default imports with '*'
#KT-9684 Fixed
2015-10-30 17:43:27 +03:00
Valentin Kipyatkov
ebe3efe710 Minor 2015-10-30 17:43:26 +03:00
Valentin Kipyatkov
7e2b37bb0f KT-9813 Parameter name&type completion gets in the way of typing
#KT-9813 Fixed
2015-10-30 17:43:26 +03:00
Valentin Kipyatkov
752cdd5f83 KT-9815 Import insertion (on Alt-Enter) does not work in Evaluate Expression
#KT-9815 Fixed
2015-10-30 17:43:25 +03:00
Valentin Kipyatkov
61fc3e7705 Added test for auto-import fix in code fragment 2015-10-30 17:37:24 +03:00
Valentin Kipyatkov
ce50a27af0 KT-9729 Invert If Condition intention should run Simplify Negated Expression when applicable
#KT-9729 Fixed
2015-10-30 17:25:36 +03:00
Valentin Kipyatkov
87f68f3332 KT-9688 Completion of methods to override: prefer those that need to be implemented
#KT-9688 Fixed
2015-10-30 17:25:36 +03:00
Valentin Kipyatkov
acc451bc54 KT-9723 Completion of override property in constructor produces bad formatting
#KT-9723 Fixed
2015-10-30 17:25:36 +03:00
Valentin Kipyatkov
c643eb14a1 No i18n 2015-10-30 17:25:36 +03:00
Valentin Kipyatkov
3c1538997e Fixed "Make class open" in case of primary constructor
#KT-9767 Fixed
2015-10-30 17:25:36 +03:00
Valentin Kipyatkov
fc924d1c9f Not operator 2015-10-30 17:25:35 +03:00
Valentin Kipyatkov
d289ebd874 Cannot make any object 'abstract' 2015-10-30 17:25:35 +03:00
Valentin Kipyatkov
2b97a1034f Converted to Kotlin 2015-10-30 17:25:35 +03:00
Valentin Kipyatkov
2b3694a77e Do not drop use of SAM-constructor when it's required for labeled return 2015-10-30 17:25:35 +03:00
Valentin Kipyatkov
34298190b3 Use unaryPlus() and unaryMinus() instead of plus() and minus() + no identityEquals() 2015-10-30 17:25:35 +03:00
Valentin Kipyatkov
c5e13ebc68 Minor corrections on code review 2015-10-30 17:25:34 +03:00
Michael Bogdanov
7ee42ab18d Fix for KT-9828: DX error on MutableMap.MutableEntry<String, Int> deconstruction: attempt to set or access a value of type java.lang.Object using a local variable of type int.
#KT-9828 Fixed
2015-10-30 16:47:21 +03:00
Michael Nedzelsky
9a8b73c5a5 fix texts in error messages for Fintite Bound Restriction & Non-Expansive Inheritance Restriction 2015-10-30 16:39:19 +03:00
Mikhail Glukhikh
182cde1e02 Standard data flow analysis results are taken into account during condition analysis #KT-7933 Fixed 2015-10-30 16:14:34 +03:00
Mikhail Glukhikh
dd1196ae6b Condition analysis: left part of and (true condition) / or (false condition) is used for right part analysis #KT-8780 Fixed 2015-10-30 16:14:33 +03:00
Mikhail Glukhikh
12103d19d2 Smart casts inside property chains like a?.b?.c.foo(a, b) are now handled correctly #KT-7290 Fixed 2015-10-30 16:14:32 +03:00
Natalia Ukhorskaya
8be9be336f Fix NPE on stepping
#KT-9821 Fixed
2015-10-30 14:53:06 +03:00
Natalia Ukhorskaya
e1e845cef1 Fix conditional breakpoints 2015-10-30 14:53:06 +03:00
Michael Nedzelsky
3c855547e5 improve tests for access from tests to internal for maven and gradle (add override for internal function) 2015-10-30 14:42:44 +03:00
Michael Nedzelsky
6ebe0c30ec fix KT-9299 In a project with circular dependencies between modules, IDE reports error on use of internal class from another module, but the corresponding code still compiles and runs.
#KT-9299 Fixed
2015-10-30 14:40:46 +03:00
Mikhail Glukhikh
17b275af23 Preliminary declaration visitor: create for top-most declaration which is not class 2015-10-30 13:44:33 +03:00
Mikhail Glukhikh
932985f0c1 Preliminary declaration visitor: do not create if already exists 2015-10-30 13:34:01 +03:00
Valentin Kipyatkov
44e56c4b93 Correct scope declarations in completion for code fragments 2015-10-30 12:03:53 +03:00
Valentin Kipyatkov
5a69a17ab0 Minor 2015-10-30 12:03:53 +03:00
Valentin Kipyatkov
40d3f71e1a Temporary fix for completion of Android synthetic extensions 2015-10-30 12:03:53 +03:00
Valentin Kipyatkov
129f6f8532 Big refactoring of BasicCompletionSession 2015-10-30 12:03:53 +03:00
Valentin Kipyatkov
8b38d8d7b9 No top-level packages after "::" 2015-10-30 12:03:53 +03:00
Valentin Kipyatkov
46b9879c47 Added test 2015-10-30 12:03:53 +03:00
Valentin Kipyatkov
f44bbc375c Code refactoring + put named arguments completion into more reasonable order 2015-10-30 12:03:52 +03:00
Valentin Kipyatkov
4c6f6c2a2e Minor refactoring: excludeNonInitializedVariable() moved into ReferenceVariantsHelper 2015-10-30 12:03:52 +03:00
Valentin Kipyatkov
2e80a7194c Minor performance optimization 2015-10-30 12:03:52 +03:00
Valentin Kipyatkov
4ab2019da4 Competion in debugger for runtime receiver type should not show members grayed 2015-10-30 12:03:52 +03:00
Valentin Kipyatkov
af441d32b1 Minor corrections to "compareDescriptors" but still lot of question to its implementation and semantics 2015-10-30 12:03:52 +03:00
Valentin Kipyatkov
582443ea7b More efficient filtering of runtime receiver type variants in debugger 2015-10-30 12:03:51 +03:00
Valentin Kipyatkov
3e3d86aebb A little bit more correct filtering 2015-10-30 12:03:51 +03:00
Valentin Kipyatkov
0ee2b512ff Completion of non-imported extensions in debugger for runtime receiver type 2015-10-30 12:03:51 +03:00
Valentin Kipyatkov
c9048266c8 Fixed extensions completion for runtime receiver type in debugger (broken by previos changes in extensions completion) 2015-10-30 12:03:51 +03:00
Valentin Kipyatkov
a26f6da12d Do not filter out synthetic extensions (if they will ever exist in future) 2015-10-30 12:03:51 +03:00
Valentin Kipyatkov
9feed9c3ef Fixed filtering of shadowed declarations after changes in extensions treatment 2015-10-30 12:03:50 +03:00
Valentin Kipyatkov
be5569d31a Performance optimization in completion: do not analyze all extensions available from imports - use index 2015-10-30 12:03:50 +03:00
Michael Bogdanov
9f9217b9c3 Test for obsolete KT-9642
#KT-9642 Obsolete
2015-10-30 09:39:11 +03:00
Michael Bogdanov
f3092bf390 Fix for KT-9637: Runtime crash when using class literal in inline functions with reified type parameters
#KT-9637 Fixed
2015-10-30 09:39:10 +03:00
Michael Bogdanov
34fccc6dae Fix for KT-6990: inline reified doesn't inline call in some cases
#KT-6990 Fixed
2015-10-30 09:39:09 +03:00
Michael Bogdanov
33bf314518 Fix for KT-6552 IllegalAccessError in inline function with "when" over enum across modules
#KT-6552 Fixed
2015-10-30 09:39:09 +03:00
Michael Bogdanov
9e5af43ce1 Fix for KT-9788: AssertionError from back-end when we read field from inline function
#KT-9788 Fixed
2015-10-30 09:39:08 +03:00
Alexander Udalov
7046f63511 Move/inline stuff from TypeUtils to other modules 2015-10-29 21:16:07 +03:00
Alexander Udalov
5677ff60e7 Move/inline stuff from DescriptorUtils to other modules 2015-10-29 21:16:06 +03:00
Alexander Udalov
2c64848826 Don't swallow exception in KotlinBuiltIns, assert instead
See 16b6bcc

 #KT-9820 Open
2015-10-29 21:16:05 +03:00
Alexander Udalov
4d909d9012 Move LexicalScope to frontend 2015-10-29 21:16:05 +03:00
Alexander Udalov
09a36acee4 Minor, remove HTML from kdoc 2015-10-29 21:16:04 +03:00
Denis Zharkov
9b29181878 Minor. Add Kotlin overrides to test
#KT-6733 Obsolete
2015-10-29 21:05:52 +03:00
Denis Zharkov
7eed041a7a Use original descriptor when obtaining source 2015-10-29 21:05:52 +03:00
Denis Zharkov
5755af6b27 Remove wrong condition part: there could be irrelevant overrides from Kotlin 2015-10-29 21:05:52 +03:00
Denis Zharkov
291f0e57d1 Introduce FunctionDescriptor.initialSignatureDescriptor
Mostly it's needed for backend to extract descriptor with initial signature

For example:
class A implements CharSequence {
        char charAt(int index) {}
}

We see `charAt` this method as `fun get(index: Int): Char`, but in backend it
matters what signature had this descriptor before.
2015-10-29 21:05:51 +03:00
Denis Zharkov
95d12260c1 Fix project sources after latter changes
ResolveSession is inherited from two interfaces:
1. The one written in Java with 'getModuleDescriptor'
2. And the second one in Kotlin with property 'moduleDescriptor'

Now we treat such declarations from supertypes like they are just plain
property accessor overrides, and 'getModuleDescripton' and it's friends
becomes invisible via ResolveSession
2015-10-29 21:05:51 +03:00
Denis Zharkov
94803ce1c4 Collect overrides of special builtin members in super types
#KT-9695 Fixed
2015-10-29 21:05:26 +03:00
Denis Zharkov
060178e53f Minor. Convert extension to common function 2015-10-29 18:41:51 +03:00
Denis Zharkov
50125f612e Unify creation of special builtin functions
Create all of them --- both renamed and with de-erased signature ---
within 'computeNonDeclaredFunctions'.

This helps to get rid of open 'resolveMethodToFunctionDescriptor'
and guarantees that method inside 'isVisibleAsFunction'
is always without any magic.
2015-10-29 18:41:51 +03:00
Denis Zharkov
c855d3fad9 Minor. Extract searchMethodsByNameWithoutBuiltinMagic and weaken return types 2015-10-29 18:41:51 +03:00
Denis Zharkov
80bf7316c7 Add 'preserveSource' parameter to methods making substitution copies 2015-10-29 18:41:51 +03:00
Denis Zharkov
dd46056784 Introduce SimpleFunctionDescriptor.createCopyWithNewValueParameters 2015-10-29 18:41:51 +03:00
Denis Zharkov
4e7731f41f Refactor 'isVisibleAsFunction' to make it work with SimpleFunctionDescriptor
Also inline 'resolveMethodToFunctionDescriptorWithName'
2015-10-29 18:41:50 +03:00
Denis Zharkov
ce34550c42 Introduce and implement SimpleFunctionDescriptor.createRenamedCopy 2015-10-29 18:41:50 +03:00
Stanislav Erokhin
69038063a6 Mark callable reference candidate as error when there is error type. 2015-10-29 15:30:32 +03:00
Stanislav Erokhin
d019445493 Minor. Add tracing strategy to MutableResolvedCall 2015-10-29 15:30:32 +03:00
Stanislav Erokhin
97f6213873 Minor. Introduce public constructor ResolvedCallImpl for future use 2015-10-29 15:30:32 +03:00
Stanislav Erokhin
5e6a86fa70 Minor. Make public util function stripCallArguments in CallTransformer 2015-10-29 15:30:31 +03:00
Stanislav Erokhin
cccc4fccd1 Minor. change several signatures 2015-10-29 15:30:31 +03:00
Stanislav Erokhin
1737c7251a Minor. Extract createLookupLocation for call 2015-10-29 15:30:30 +03:00
Stanislav Erokhin
0120139f9c Fix for EA-74904. 2015-10-29 15:30:30 +03:00
Stanislav Erokhin
98379d64e8 Minor. Workaround for KT-9788 AssertionError from backand when we read field from inline function 2015-10-29 15:30:29 +03:00
Nikolay Krasko
41cbc12d7f Don't propose to make objects abstract (KT-9795)
#KT-9795 Fixed
2015-10-29 14:37:15 +03:00
Nikolay Krasko
8bef335b71 Don't propose to generate Any methods in interface to avoid METHOD_OF_ANY_IMPLEMENTED_IN_INTERFACE error (KT-9796)
#KT-9796 Fixed
2015-10-29 14:37:14 +03:00
Nikolay Krasko
625907e49d Refactoring: move check for Any member into builtins 2015-10-29 14:37:13 +03:00
Alexander Udalov
925b0e567e Minor, delete leftovers from package part refactorings 2015-10-28 21:51:19 +03:00
Alexander Udalov
c5ec3b0f6f Minor, drop HTML and improve language in ConstraintSystem kdoc 2015-10-28 21:45:51 +03:00
Alexander Udalov
5fc14e0224 Move constraint system, type intersection, common supertypes to compiler 2015-10-28 19:17:58 +03:00
Alexander Udalov
302cd3ca2f Minor, move some utilities closer to their usages 2015-10-28 19:17:56 +03:00
Alexander Udalov
d6e87c50ab Don't use TypeIntersector when loading generic Java constructors
This is not entirely type-safe but this case is so rare that hardly anyone will
be able to spot the change
2015-10-28 19:17:56 +03:00
Alexander Udalov
86bc21da30 Make getUpperBoundsAsType an utility, remove from TypeParameterDescriptor 2015-10-28 19:17:53 +03:00
Alexander Udalov
12d6b6e7e4 Use "Any?" as out-type for type parameters instead of intersection of bounds
Also refactor checkSubtypeForTheSameConstructor to compute everything in the
best order
2015-10-28 19:12:26 +03:00
Alexander Udalov
bed75e8af2 Remove some unjustified usages of TypeParameterDescriptor#getUpperBoundsAsType 2015-10-28 19:12:24 +03:00
Alexander Udalov
426bddb54e Move OverridingUtil#getUpperBound to OverloadUtil, add tests on overloads 2015-10-28 19:12:05 +03:00
Alexander Udalov
477823b093 Change override rules when type parameters have multiple bounds
Instead of constructing the magic intersection type, compare sets of upper
bounds instead as javac does, modulo the substitution
2015-10-28 19:12:02 +03:00
Alexander Udalov
a59ca2ea9f Simplify obsolete code in OverridingUtil 2015-10-28 19:12:00 +03:00
Alexander Udalov
996c14d071 Use representative upper bound in JetTypeMapper instead of just the first 2015-10-28 19:11:59 +03:00
Alexander Udalov
3918005364 Minor, improve compileJavaAgainstKotlin test
Render human-readable output when there are errors
2015-10-28 19:11:58 +03:00
Alexander Udalov
d29757d927 Make upper bounds of type parameter a list instead of a set
The same for lower bounds, also refactor type parameter implementations
2015-10-28 19:11:56 +03:00
Alexander Udalov
1ce5f8458c Extract ClassMapperLite, add enlightening comment 2015-10-28 19:11:55 +03:00
Alexander Udalov
0302b9504f Minor, inline some other FQ name methods 2015-10-28 19:11:54 +03:00
Alexander Udalov
05f9f5a661 Drop path() from FQ names, remove weird code from FqNameUnsafe 2015-10-28 19:11:53 +03:00
Alexander Udalov
8a89662ea5 Remove FqNameBase, simplify FqName and FqNameUnsafe 2015-10-28 19:11:53 +03:00
Alexander Udalov
894a97a549 Rename field for property metadata cache to prevent problems in inline 2015-10-28 19:11:51 +03:00
Mikhail Glukhikh
6e3eef2d6f JetTypeInfo renamed to KotlinTypeInfo 2015-10-28 17:36:34 +03:00
Dmitry Petrov
4eb7458143 box test for KT-9712: tests were generated in different order. 2015-10-28 17:15:05 +03:00
Michael Nedzelsky
c123af75fd issue warning instead of error in case of finite bound or non-expansive inheritance violation in java code 2015-10-28 17:02:02 +03:00
Mikhail Glukhikh
d2c65a5336 Iterative call chain handling to get rid of JetTypeInfoInsideCallChain and other nasty things #KT-9754 Fixed 2015-10-28 16:00:30 +03:00
Sergey Mashkov
16b6bccd1e Eliminate IllegalArgumentException caused by possible negative sized ArrayList creation 2015-10-28 15:45:25 +03:00
Michael Bogdanov
63f7f90521 Test for obsolete KT-8047
#KT-8047 Obsolete
2015-10-28 14:43:05 +03:00
Mikhail Glukhikh
f8a70302ac Cleanup: get rid of effective visibility warnings 2015-10-28 14:31:51 +03:00
Natalia Ukhorskaya
932542891b Stepping for inline functions: add test for last statement in for 2015-10-28 14:23:52 +03:00
Natalia Ukhorskaya
de5c3733e9 Do not use visitor for counting lambda ordinal for debugger 2015-10-28 14:23:52 +03:00
Natalia Ukhorskaya
eac6fdbaa0 Fix linenumbers in tests 2015-10-28 14:23:51 +03:00
Natalia Ukhorskaya
a8008dfa26 Do not use resove in catPutAt for breakpoints 2015-10-28 14:23:50 +03:00
Natalia Ukhorskaya
67e66f74bc Minor: fix warnings 2015-10-28 14:23:49 +03:00
Natalia Ukhorskaya
e534636f03 Support multiple breakpoints at one line (especially for lambdas) 2015-10-28 14:23:49 +03:00
Natalia Ukhorskaya
c071bf5c63 Fix lines for FieldBreakpoints in tests 2015-10-28 14:23:48 +03:00
Natalia Ukhorskaya
17a564495d Stepping for inline function: filter out inline function body lines from step over
#KT-9665 Fixed
2015-10-28 14:23:47 +03:00
Natalia Ukhorskaya
b8e649e843 Minor: rename test 2015-10-28 14:23:46 +03:00
Natalia Ukhorskaya
66a5351cd0 Do not show fake local variables for inline function/argument in Variables View for Debugger 2015-10-28 14:23:45 +03:00
Natalia Ukhorskaya
cdcafb8199 Fix stepping for inline function inside while statement 2015-10-28 14:23:45 +03:00
Natalia Ukhorskaya
258790cc2f Minor: refactor tests 2015-10-28 14:23:44 +03:00
Natalia Ukhorskaya
e2411f8e46 Debugger tests: catch exceptions correctly 2015-10-28 14:23:43 +03:00
Natalia Ukhorskaya
4f1af224d1 Rewrite CheckLocalVariableTableTest using assertEqualsToFile 2015-10-28 14:23:43 +03:00
Natalia Ukhorskaya
dd30462fd1 Support smart step into for inline function arguments 2015-10-28 14:23:42 +03:00
Natalia Ukhorskaya
c98ebffbcf Debugger: evaluate Ref$element to element value 2015-10-28 14:23:41 +03:00
Natalia Ukhorskaya
77f1a3a7f3 Minor: change test directives 2015-10-28 14:23:40 +03:00
Natalia Ukhorskaya
e68700190d Use fake local variable for inline argument in debugger 2015-10-28 14:23:39 +03:00
Natalia Ukhorskaya
dfbafc7173 Extract isInlineArgument for debugger 2015-10-28 14:23:39 +03:00
Michael Bogdanov
7c7cff3d6e Updated diagnostic message for INVISIBLE_MEMBER_FROM_INLINE
#KT-7323 Fixed
2015-10-28 14:10:27 +03:00
Nikolay Krasko
0fcb51f0a2 KT-1478 Quick fix for using nullable collection in "for in" expression
#KT-1478 Fixed
2015-10-28 13:39:49 +03:00
Nikolay Krasko
911432c99c Use default render to check are all errors mentioned in tests. It's far more easier to read. 2015-10-28 13:39:46 +03:00
Nikolay Krasko
b8c72ec4e9 Suggest to add !! as a quick-fix for type mistmach 2015-10-28 13:39:44 +03:00
Michael Bogdanov
f3e6fab68e Fix for KT-4250: IllegalAccessError when using protected java member from lambda function
#KT-4250 Fixed
2015-10-28 11:57:21 +03:00
Michael Bogdanov
0a70c80af3 Substitute superClassExpression with superCallClass in synthetic accessors 2015-10-28 11:57:20 +03:00
Dmitry Petrov
21d927b7a4 Test for KT-9712 (fixed along with KT-9717)
#KT-9712 Fixed
2015-10-28 10:39:03 +03:00
Michael Nedzelsky
190bab099c fix KT-9441 Unable to Access Internal Classes from Test Code within Same Module
#KT-9441 Fixed
2015-10-28 01:58:54 +03:00
Alexander Udalov
395c0f12b1 Fix confusing behavior in test when assertion fails 2015-10-27 23:31:29 +03:00
Ilya Gorbunov
e2c9267305 Fix compiler tests with incompatible types in assertEquals arguments. 2015-10-27 21:48:29 +03:00
Ilya Gorbunov
579ce8091c Cleanup tests, specify type where it's ambiguous. 2015-10-27 21:48:27 +03:00
Ilya Gorbunov
0b74698c16 @OnlyInputTypes for assertEquals and expect 2015-10-27 21:48:24 +03:00
Ilya Gorbunov
551e0181dc Require explicit type parameter specification for filterIsInstance. 2015-10-27 21:47:50 +03:00
Zalim Bashorov
a5708c9c0d Track lookups in JavaSyntheticPropertiesScope 2015-10-27 19:38:32 +03:00
Zalim Bashorov
412e078a6b Allow to fail on initial build in incremental tests if testdata contains "init-build.log" file 2015-10-27 19:37:10 +03:00
Zalim Bashorov
cc3c76ae67 Add the support checking lookups after modifications 2015-10-27 19:37:09 +03:00
Zalim Bashorov
2d859d6191 Minor: print "<root>" for root package instead empty string in Lookup tests.
Additionally fixed warnings.
2015-10-27 19:37:09 +03:00
Pavel V. Talanov
289b1a5883 LibraryModificationTracker: check whether project is already disposed 2015-10-27 18:51:50 +03:00
Mikhail Glukhikh
55c1addb93 Workaround for a part of KT-9700: top-level Java classes with private visibility are considered package private 2015-10-27 18:27:41 +03:00
Valentin Kipyatkov
78f0de3de5 Removed hack for Repl 2015-10-27 18:24:56 +03:00
Valentin Kipyatkov
91ff27f78c Rename 2015-10-27 18:24:56 +03:00
Valentin Kipyatkov
79825fc1e6 More efficient LexicalScope.addImportScopes 2015-10-27 18:24:56 +03:00
Valentin Kipyatkov
55c2b71829 Removed asLexicalScope from ScopeUtils.kt 2015-10-27 18:24:55 +03:00
Valentin Kipyatkov
74d14d30b0 No use of "by ..Scope.Empty" 2015-10-27 18:24:55 +03:00
Valentin Kipyatkov
3aa2a60dc1 Repl injects scope via own FileScopeProvider implementation instead of AdditionalScopes 2015-10-27 18:24:55 +03:00
Valentin Kipyatkov
47f938d7fc Minor 2015-10-27 18:24:55 +03:00
Valentin Kipyatkov
67a0cc3c49 Dropped searching synthetic extensions in imports 2015-10-27 18:24:55 +03:00
Valentin Kipyatkov
59fa639ab4 Refactored ReferenceVariantsHelper to not require KtSimpleNameExpression 2015-10-27 18:24:55 +03:00
Pavel V. Talanov
dc791941d7 JvmAnalyzerFacade: Do not fail when java resolve api behaves in an unexpected way
Fixes a problem when java type from a library can be resolved to a class in source root
2015-10-27 18:07:17 +03:00
Pavel V. Talanov
4c70700943 Introduce api to get nullable ResolverForModule by ModuleInfo 2015-10-27 18:07:16 +03:00
Stanislav Erokhin
ff00bde607 Removed dispatch receiver parameter for SyntheticFieldDescriptor 2015-10-27 15:36:38 +03:00
Stanislav Erokhin
553834fa9e KT-9371 Callable reference resolve should not prefer one of the overloads by some magic reasons
#KT-9371 Fixed
2015-10-27 15:36:37 +03:00
Valentin Kipyatkov
891e033d5b KT-9664 Add quickfix to convert a piece of code to pretty look SAM-style
#KT-9664 Fixed
2015-10-27 15:07:59 +03:00
Dmitry Petrov
ad030a2c03 KT-9721:
- Scripts should be included in files with callables.
2015-10-27 15:06:32 +03:00
Michael Bogdanov
b0efcec392 Fix for KT-9711: Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE
#KT-9711 Fixed
2015-10-27 13:22:07 +03:00
Dmitry Petrov
882827bf04 KT-9717, KT-9603:
pass getter/setter-related flags to AccessorForPropertyDescriptor
2015-10-27 12:02:27 +03:00
Natalia Ukhorskaya
e83315f5bc Gradle plugin: do not store generated folder for android into sourceSets, because they are reused for different buildTypes and flavors
#KT-8202 Fixed #KT-9715 Fixed
2015-10-27 11:41:24 +03:00
Yan Zhulanow
10eed8f7cd Fix incremental test (DefaultImpls are not generated for an empty interface) 2015-10-27 02:46:57 +03:00
Michael Nedzelsky
63f84fc60e fix KT-9733 No error shown for 2 "main" functions in the same file
#KT-9733 Fixed
2015-10-26 21:30:24 +03:00
Dmitry Jemerov
31bff24c55 fix senseless action visibility checks 2015-10-26 19:27:01 +01:00
Pavel V. Talanov
55006872a1 LibraryModificationTracker
Do not track external annotations
Make use of BulkFileListener to avoid processing extra files
Defer library classes check for newly created files: fixes a problem of indices not being updated at the time
Correctly check if the file is a jar file root of a library
Ther latter 2 changes fix a problem where resolve caches were not recomputed in case of deleting and readding jar files of a library
2015-10-26 21:14:44 +03:00
Alexander Udalov
b8b98b4eaa Support get/set on KProperty objects for delegated properties 2015-10-26 21:02:35 +03:00
Alexander Udalov
f2a37b4150 Minor, move KProperty for property references to separate file 2015-10-26 21:02:35 +03:00
Alexander Udalov
a97567ea0c Optimize KProperty objects for delegated properties
Don't generate anonymous classes with a lot of methods because this hurts
Android. Add special classes to the runtime instead (also add
FunctionReferenceImpl, to be used later) and just create their instances in the
static initializer of each class
2015-10-26 21:02:34 +03:00
Yan Zhulanow
2d1a7163a3 Minor: changes on review 2015-10-26 20:38:41 +03:00
Yan Zhulanow
3475b4796f Do not generate DefaultImpls if empty 2015-10-26 20:37:31 +03:00
Yan Zhulanow
2a28baa154 Remove ACC_STATIC from DefaultImpls 2015-10-26 20:37:29 +03:00
Pavel V. Talanov
bf6464ddcd Repl: clearer separation of ide and console logic
Fix a bug with redundant new lines printed in console mode
2015-10-26 20:17:45 +03:00
Pavel V. Talanov
d0097c85d3 Repl: enhance test framework to wait for commands to be processed, not some text to appear 2015-10-26 20:17:45 +03:00
Pavel V. Talanov
03c3fd2c2b Repl: correctly handle readLine() 2015-10-26 20:17:44 +03:00
Pavel V. Talanov
6237e516d4 Repl: fix a problem where handling an incomplete message led to xml parsing exception 2015-10-26 20:17:43 +03:00
Pavel V. Talanov
e20bcbde53 Repl: keep track of command entries which were already processed
Fixes race condition
2015-10-26 20:17:43 +03:00
Pavel V. Talanov
0fe3ef7cf4 Repl: refactor ide code
More accurate class names
Move all shared state to KotlinConsoleRunner class
2015-10-26 20:17:42 +03:00
Pavel V. Talanov
e10df1a05d Repl: notify about successfully executing lines 2015-10-26 20:17:41 +03:00
Pavel V. Talanov
b5dfbcdde8 Repl, minor: extract function 2015-10-26 20:17:40 +03:00
Pavel V. Talanov
b07fb88a22 Repl, minor: more meaningful method names 2015-10-26 20:17:40 +03:00
Pavel V. Talanov
e08ce5545e Repl test: increase waiting time
Hoping to prevent failing on slow teamcity agents
2015-10-26 20:17:39 +03:00
Alexander Udalov
d021821db5 Minor, add constructors with messages and causes to KotlinReflectionNotSupportedError 2015-10-26 19:40:04 +03:00
Dmitry Petrov
09f0b3fe87 KT-9721:
- Kotlin/JS still uses package facades.
Handle them properly in StubClassBuilder parentStack.
- Generate backend-related diagnostics in IDE
using light class generation for file facades.
- Drop PackageFacadeStubCache.
2015-10-26 19:37:52 +03:00
Valentin Kipyatkov
4fcd35a5a9 Introduced LexicalScope for file top-level to obtain ownerDescriptor 2015-10-26 19:30:05 +03:00
Valentin Kipyatkov
7a33a16481 Removed one more usage of asKtScope() 2015-10-26 19:30:05 +03:00
Valentin Kipyatkov
c239e84aa0 Removed hack for package directive completion 2015-10-26 19:30:05 +03:00
Valentin Kipyatkov
a5982281af Temporary fix for problem with ownerDescriptor in ImportingScope 2015-10-26 19:30:05 +03:00
Valentin Kipyatkov
03f18e1ac1 Extraction refactorings tests: do not generate conflict files in case of any exception from code 2015-10-26 19:30:05 +03:00
Valentin Kipyatkov
c44dc41431 Fixed getting ownerDescriptor from ImportingScope 2015-10-26 19:30:04 +03:00
Valentin Kipyatkov
95a0372b43 Using PsiElement.getResolutionScope instead of LEXICAL_SCOPE from BindingContext 2015-10-26 19:30:04 +03:00
Valentin Kipyatkov
6af71caaa9 Moved PsiElement.getResolutionScope utliity into ide-common 2015-10-26 19:30:04 +03:00
Valentin Kipyatkov
a6165f4690 Got rid of two getContributedDescriptors calling each other 2015-10-26 19:30:04 +03:00
Valentin Kipyatkov
ed6f845377 Added utility functions for synthetic extensions in scope 2015-10-26 19:30:04 +03:00
Valentin Kipyatkov
c09cf63424 Added utility functions for functions and variables in scope 2015-10-26 19:30:03 +03:00
Valentin Kipyatkov
5f06f53bfd Renames 2015-10-26 19:30:03 +03:00
Valentin Kipyatkov
e1b8b21abb Minor 2015-10-26 19:30:03 +03:00
Valentin Kipyatkov
6b85bf24a0 One usage of asLexicalScope removed 2015-10-26 19:30:03 +03:00
Valentin Kipyatkov
b4dbb666fc More usages of asKtScope() removed 2015-10-26 19:30:03 +03:00
Valentin Kipyatkov
9a99559b12 No getFileKtScope 2015-10-26 19:30:02 +03:00
Valentin Kipyatkov
2ddaa15036 Removed more usages of asKtScope() 2015-10-26 19:30:02 +03:00
Valentin Kipyatkov
2b325327f4 Dropped one usage of asKtScope() 2015-10-26 19:30:02 +03:00
Valentin Kipyatkov
0b34fecf94 Fixed test data but template macro "kotlinSuggestVariableName()" must be completely rewritten 2015-10-26 19:30:02 +03:00
Valentin Kipyatkov
470e9ba776 Fixed 2015-10-26 19:30:01 +03:00
Valentin Kipyatkov
6ca6718271 Dropped BindingContext.RESOLUTION_SCOPE 2015-10-26 19:30:01 +03:00
Valentin Kipyatkov
44415cf321 Less use of RESOLUTUON_SCOPE from BindingContext 2015-10-26 19:30:01 +03:00
Valentin Kipyatkov
961ffee8ee Converted to Kotlin 2015-10-26 19:30:01 +03:00
Valentin Kipyatkov
3eb1cff36a Less use of KtScope 2015-10-26 19:30:00 +03:00
Valentin Kipyatkov
c93de93332 FileScopeProvider.AdditionalScopes return ImportingScope's 2015-10-26 19:30:00 +03:00
Valentin Kipyatkov
99aeb305db Less conversion between KtScope and ImportingScope 2015-10-26 19:30:00 +03:00
Valentin Kipyatkov
3471667aa0 Minor refactoring 2015-10-26 19:30:00 +03:00
Valentin Kipyatkov
6252fb04c4 Fixing replaceFileScope and other stuff 2015-10-26 19:29:59 +03:00
Valentin Kipyatkov
9eeb051bd4 Refactoring FileScope into a chain of ImportingScope's (all compiler tests pass) 2015-10-26 19:29:59 +03:00
Valentin Kipyatkov
712e294eac Renamed FileScope to ImportingScope and it now may have parent. But all implementations currently have parent == null 2015-10-26 19:29:59 +03:00
Alexey Tsvetkov
294559a94f Overridable val should not be treated as constant
#KT-9443 fixed
2015-10-26 19:23:09 +03:00
Alexey Tsvetkov
0a69cca066 Box primitive types in position of generic receiver
#KT-9469 fixed
2015-10-26 18:36:59 +03:00
Alexey Tsvetkov
7c54024a22 Fix private setter visibility for generic class
#KT-8888 fixed
2015-10-26 18:36:59 +03:00
Ilya Chernikov
7dbb0dff2c Placing forced shutdown timeout into daemon options, setting default to 10s, removing appropriate property as obsolete 2015-10-26 15:59:11 +01:00
Ilya Chernikov
80fb9b8473 Removing try/catch in the lock file acquiring algo, to avoid hanging like in case described here - https://devnet.jetbrains.com/message/5561306
it should now fail and fallback to in-process compilation
2015-10-26 15:59:10 +01:00
Ilya Chernikov
2fa0988c85 Increasing socket backlog size in attempt to solve problems like EA-74493 (connection refused) 2015-10-26 15:59:09 +01:00
Denis Zharkov
881fe640e7 Create non-default getter for Enum.values property
#KT-9687 Fixed
2015-10-26 17:32:15 +03:00
Nikolay Krasko
234360a471 Fix compilation in KotlinFrameExtractVariablesProvider
(cherry picked from commit ed06e05)
2015-10-26 17:16:52 +03:00
Natalia Ukhorskaya
15531d0bb7 Update since for plugin due to compilation error in KotlinFrameExtractVariablesProvider 2015-10-26 17:16:51 +03:00
Natalia Ukhorskaya
4f64661db0 Update to IDEA 143.379.11 2015-10-26 17:16:50 +03:00
Mikhail Glukhikh
4b6cb3ebce A new kind of synthetic accessors for backing fields, if accessed inside lambda / object literal / local class #KT-9657 Fixed
A set of tests provided
Also #KT-4867 Fixed
Also #KT-8750 Fixed
Slight codegen refactoring
2015-10-26 16:37:32 +03:00
Dmitry Petrov
ccad435850 KT-9644: override default behavior for non-local return in FixStackAnalyzer 2015-10-26 15:56:57 +03:00
Nikolay Krasko
5d1bcbf2be Try to cancel jar processing if some thread do it already 2015-10-26 15:08:54 +03:00
Mikhail Glukhikh
d0e01153ec Effective visibility: java package-private is now considered as equivalent to Kotlin internal #KT-9755 Fixed 2015-10-26 15:00:14 +03:00
Mikhail Glukhikh
994feafd6e Lookup fixed to search for SyntheticFieldDescriptor inside MethodContext 2015-10-26 13:36:34 +03:00
Mikhail Glukhikh
98e0771ffa Abstract var setter visibilities: now only private setters are forbidden 2015-10-26 11:55:34 +03:00
Mikhail Glukhikh
5ebbdd9f58 Cleanup: implicit nothing return type is now an error 2015-10-26 11:55:30 +03:00
Alexander Udalov
9d7cc25228 Fix code style settings after language was renamed to Kotlin 2015-10-25 15:52:04 +03:00
Alexey Sedunov
3ba55914c1 Create Test: Postpone J2K conversion until smart mode (matters if the user decides to add library in the Create Test dialog) 2015-10-24 19:50:57 +03:00
Alexey Sedunov
b6c01c0f94 Minor: Move DumpService-related functions to dumbUtils.kt 2015-10-24 19:50:56 +03:00
Alexey Sedunov
8d3296e08d Change Signature: Search & process as-property usages of Java methods (This ixes some muted tests on Change Signature for properties).
Improve test data
2015-10-24 19:50:55 +03:00
Alexey Sedunov
ad0c12935b Find Usages: Include super declarations when highliting usages in the current file 2015-10-24 19:50:54 +03:00
Alexey Sedunov
9c360ef05a Find Usages: Look for as-property usages of Java methods 2015-10-24 19:50:53 +03:00
Alexey Sedunov
7e9222f70a Extraction Engine: Set default visibility to 'public' 2015-10-24 19:50:52 +03:00
Alexey Sedunov
3fd6864461 Extraction Engine: When extracting to enum class body, place new declaration after the last entry
#KT-9629 Fixed
2015-10-24 19:50:52 +03:00
Alexey Sedunov
40f2a983cc Formatter: Spacing before after semicolon in enum classes 2015-10-24 19:50:51 +03:00
Alexey Sedunov
98b3919824 J2K: KtClassBody 2015-10-24 19:50:50 +03:00
Alexey Sedunov
d8864544d2 J2K: Rename KtClassBody (.java -> .kt) 2015-10-24 19:50:49 +03:00
Alexey Sedunov
ca87e7933f Move: Drop Java on-demand static imports of facade class members when original facade is eliminated due to Move refactoring
#KT-9624 Fixed
2015-10-24 19:50:48 +03:00
Alexey Sedunov
5dc0e7f2d5 Extraction Engine: Use original topmost descriptors when validating extracted code (fixes 'mutablyFlexibleType' test which failed after migration to generic contains/remove/etc. members in collections) 2015-10-24 19:50:48 +03:00
Alexey Sedunov
07259fa090 Generate Secondary Constructor: Fix test data loading. Add test with non-generic Java superclass 2015-10-24 19:50:47 +03:00
Nikolay Krasko
3c07bc3df7 Import all components and delegates accessors if possible 2015-10-23 22:07:52 +03:00
Alexander Udalov
1517a099d0 Search for JvmName also among use-site targeted annotations
#KT-9699 Fixed
2015-10-23 19:03:50 +03:00
Alexander Udalov
ae4c7b5a61 Minor, rename codegen tests on platformName and platformStatic 2015-10-23 19:03:49 +03:00
Michael Bogdanov
18f3eb87e4 INSTANCE field deprecated in companion object
Fix for KT-9692: Deadlock between <clinit> of a class (KtSimpleNameExpressionImpl) and <clinit> of its companion object

 #KT-9692 Fixed
2015-10-23 17:39:27 +03:00
Nikolay Krasko
7927185cc7 More fixes in version regexp and move override-version call to the place where compiler is downloaded 2015-10-23 13:17:08 +03:00
Svetlana Isakova
c167a77c8a Filter annotations while substituting compound type 2015-10-22 21:55:17 +03:00
Svetlana Isakova
f00af72e0f Fixed 'OnlyInputTypes' working with platform types 2015-10-22 21:55:16 +03:00
Svetlana Isakova
b24cb2a326 Fixed 'OnlyInputTypes' working with number types 2015-10-22 21:55:14 +03:00
Svetlana Isakova
9877fe1a26 Fixed the call completer
to update the type of the argument expression correctly
2015-10-22 21:55:13 +03:00
Svetlana Isakova
06e90cf6a1 Annotated the return type of 'elvis' function with @Exact
fun <T> ELVIS(T?, T): @Exact T
2015-10-22 21:55:12 +03:00
Svetlana Isakova
7150be7c67 Minor: fixed error message 2015-10-22 19:09:46 +03:00
Valentin Kipyatkov
27ef6fab21 Accessor completion uses code style settings 2015-10-22 18:48:19 +03:00
Valentin Kipyatkov
74f2d60e19 No duplicate property accessor should be allowed 2015-10-22 18:48:19 +03:00
Valentin Kipyatkov
6eba45febd KT-9661 Code completion of "get" and "set" in property accessors
#KT-9661 Fixed
2015-10-22 18:48:19 +03:00
Valentin Kipyatkov
798223b0e4 Better presentation for use site targets in completion 2015-10-22 18:48:18 +03:00
Valentin Kipyatkov
b7809ed94a Functions to properties 2015-10-22 18:48:18 +03:00
Valentin Kipyatkov
6cfb30bb81 KT-9388 Code completion inserts use-site annotation target with superfluous chars
#KT-9388 Fixed
2015-10-22 18:48:18 +03:00
Valentin Kipyatkov
fabf3e5e84 More correct keyword completion after "@" 2015-10-22 18:48:18 +03:00
Valentin Kipyatkov
235399f784 KT-8036 Completion does not suggest file after @ in file header
#KT-8036 Fixed
2015-10-22 18:48:18 +03:00
Valentin Kipyatkov
33a0673f49 Minor 2015-10-22 18:48:17 +03:00
Valentin Kipyatkov
5d3145c3c3 Fixed KT-7431 org.jetbrains.kotlin.idea.quickfix.AutoImportFix memory leak
#KT-7341 Fixed
2015-10-22 18:48:17 +03:00
Valentin Kipyatkov
b26a590614 KT-7844 Completion for top level classes should propose the file name
#KT-7844 Fixed
2015-10-22 18:48:17 +03:00
Valentin Kipyatkov
eb8fb80325 ScrollType.CENTER for create from usage 2015-10-22 18:48:17 +03:00
Valentin Kipyatkov
0a520f8bdd More creation by pattern instead of text 2015-10-22 18:48:17 +03:00
Valentin Kipyatkov
612f9b1041 Comments and formatting preseving added 2015-10-22 18:48:17 +03:00
Valentin Kipyatkov
7c8967ea4e Refactored to use creation of expression by pattern instead of plain text 2015-10-22 18:48:16 +03:00
Valentin Kipyatkov
311bd5f25d One more test added 2015-10-22 18:48:16 +03:00
Valentin Kipyatkov
a3d9085ddd Disabled "Convert to get/set call" intention where it did not work correctly anyway 2015-10-22 18:48:16 +03:00
Valentin Kipyatkov
c6978d6b69 KT-9450 «Replace overloaded operator with function call» breaks code for index access result saved to variable
#KT-9450 Fixed
2015-10-22 18:48:16 +03:00
Valentin Kipyatkov
6baef687ef Minor 2015-10-22 18:48:16 +03:00
Valentin Kipyatkov
ab04ae4956 KT-9365 Code completion does not suggest annotation names at type usage
#KT-9365 Fixed
2015-10-22 18:48:15 +03:00
Valentin Kipyatkov
197218a512 KT-9389 Code completion inserts annotation FQN into annotation list
#KT-9389 Fixed
2015-10-22 18:48:15 +03:00
Valentin Kipyatkov
66310806ca KT-9628 Intention&inspection to replace use of "set" operator function with []
#KT-9628 Fixed
2015-10-22 18:48:15 +03:00
Valentin Kipyatkov
852579e7f3 Renamed class 2015-10-22 18:48:15 +03:00
Valentin Kipyatkov
255373162d KT-9666 Inner classes do not appear in type completion
#KT-9666
2015-10-22 18:48:15 +03:00
Valentin Kipyatkov
375ecb4026 Refactored CompletionKind removing duplication with CallType 2015-10-22 18:48:14 +03:00
Valentin Kipyatkov
b4501a6b98 Fixed filtering of annotation classes in annotation completion broken recently 2015-10-22 18:48:14 +03:00
Michael Bogdanov
d5126213d3 Fix for KT-9364: M13 Wrong compiler error for "unable to inline function"
#KT-9364 Fixed
2015-10-22 17:20:57 +03:00
Michael Bogdanov
a7b3c70d21 Fix for KT-7017: Reified type referenced in object literal crashes at runtime
#KT-7017 Fixed
2015-10-22 16:06:13 +03:00
Michael Bogdanov
3e19514099 Test for obsolete KT-6988: java.lang.VerifyError: Bad return caused by inline reified
#KT-6988 Obsolete
2015-10-22 16:06:10 +03:00
Dmitry Petrov
1a58636ea9 KT-6165, KT-9547: fix testData for JPS plugin.
Test contains effectively single module (with circular dependencies),
and should not have conflicting declarations.
Rename the package in a library used in this test.

 #KT-9547 Fixed
2015-10-22 11:37:01 +03:00
Dmitry Petrov
829fc6938a KT-9547: private package member can conflict only with the members
declared in the same file.
Cleanup OverloadUtil stuff.
Update testData.
2015-10-22 10:45:49 +03:00
Dmitry Petrov
5170341624 OverloadResolver:
fix redeclaration diagnostics issue in incremental compilation (KT-6165)
J2K: OverloadUtil.kt
2015-10-22 10:45:49 +03:00
Dmitry Petrov
f3cc6fc170 J2K: rename OverloadUtil.java --> OverloadUtil.kt 2015-10-22 10:45:49 +03:00
Denis Zharkov
8c62e80d2b Minor. Use property instead of deprecated function in Operations map 2015-10-21 17:51:44 +03:00
Denis Zharkov
8db206e7ff Take into account irrelevant implementation of special builtins 2015-10-21 17:51:43 +03:00
Denis Zharkov
d674aa1427 Refine signature mapping for special overrrides from Java
They have special JVM descriptor only when they are not inherited from
Kotlin super class
2015-10-21 17:51:43 +03:00
Denis Zharkov
f3a652de2f Minor. Add assertion about same modality of accessors 2015-10-21 17:51:43 +03:00
Denis Zharkov
c46b766fea Load special property from Java in cases of J-K-J hierarchy 2015-10-21 17:51:43 +03:00
Denis Zharkov
e31f751830 Minor. Move hasRealKotlinSuperClassWithOverrideOf to descriptor.loader.java 2015-10-21 17:51:43 +03:00
Denis Zharkov
0b3118554b Extract hasRealKotlinSuperClassWithOverrideOf and simplify needGenerateSpecialBridge
Temporary don't mind that some element `reachableDeclarations` is
final in Java because it's anyway follows that function descriptor itself is final.
2015-10-21 17:51:43 +03:00
Michael Bogdanov
4dcf940756 Test for obsolete KT-4860
#KT-4860 Obsolete
2015-10-21 17:12:18 +03:00
Michael Bogdanov
55d2300860 Fix for KT-6722
#KT-6722 Fixed
2015-10-21 17:12:17 +03:00
Michael Bogdanov
f4d3ecf8e6 Generate public constructor for anonymous objects if it inside inline fun
#KT-9331 Fixed
2015-10-21 17:12:17 +03:00
Mikhail Glukhikh
3d56012184 Backing field access highlighting dropped 2015-10-21 16:37:12 +03:00
Mikhail Glukhikh
99943e3185 Backing field: three relevant quick-fixes dropped 2015-10-21 16:37:09 +03:00
Mikhail Glukhikh
03d944d2b3 Backing field: four more errors dropped 2015-10-21 16:37:06 +03:00
Mikhail Glukhikh
e8a5df364b Refactoring (JetFlowInformationProvider) 2015-10-21 16:37:04 +03:00
Mikhail Glukhikh
d6988ad69e Get rid of FIELD_IDENTIFIER at syntax level, two errors dropped, a set of tests fixed / deleted #KT-9539 Fixed 2015-10-21 16:36:55 +03:00
Mikhail Glukhikh
8ea0501a30 Get rid of FIELD_IDENTIFIER: stubs with '$' removed 2015-10-21 16:36:49 +03:00
Mikhail Glukhikh
ef23343844 Test regenerated 2015-10-21 16:36:46 +03:00
Nikolay Krasko
eb2feeeb16 Fixes after review in imports for additional expressions 2015-10-21 14:06:05 +03:00
Nikolay Krasko
2f26480e6b Auto-imports for index functions, += like operators, invoke, delegates and components
#KT-9482 Fixed
 #KT-9397 Fixed
 #KT-8060 Fixed
2015-10-21 14:06:04 +03:00
Nikolay Krasko
0f85d770dd Refactoring: continue extracting base class for auto-import fix 2015-10-21 14:06:03 +03:00
Nikolay Krasko
c84995f8dd Refactoring: prepare AutoImportFix for subclassing: count suggestions in virtual method. 2015-10-21 14:06:03 +03:00
Nikolay Krasko
a7519853cb Fixes after review in creating single action for fixing several problems 2015-10-21 14:06:02 +03:00
Nikolay Krasko
4bae99e8bd Allow to create single quickfix for several same-type diagnostics
This going to be used for multiple auto-import for components functions and get/set pair for delegated properties
2015-10-21 14:06:02 +03:00
Nikolay Krasko
43ae8bb1f3 Revert "Add script to do padding for teamcity version"
There is no need in verison padding now.

This reverts commit 8fce102212.
2015-10-21 14:06:01 +03:00
Nikolay Krasko
da2d3701f0 Updated test for new version format 2015-10-21 14:06:01 +03:00
Valentin Kipyatkov
36ea9cfbfc J2K: fixed conversion of Throwable.getMessage(), Throwable.getCause(), Map.Entry.getKey() and Map.Entry.getValue() 2015-10-21 13:46:57 +03:00
Alexander Udalov
8dde7497e0 Minor, drop outdated constructor from FunctionReference 2015-10-21 13:40:49 +03:00
Alexander Udalov
c204e8fc67 Add more intrinsic methods to be maybe used in the future 2015-10-21 13:40:48 +03:00
Alexander Udalov
a24ac86e1c Support exception messages for reified inline markers 2015-10-21 13:40:47 +03:00
Alexander Udalov
1f1b3660f7 Provide additional overloads of TypeIntrinsics methods for future use 2015-10-21 13:40:47 +03:00
Alexander Udalov
8f6f6f7807 Minor, simplify code in TypeIntrinsics 2015-10-21 13:40:46 +03:00
Alexander Udalov
121807654a Add generalized methods to InlineMarker
To be able to use them in the future compiler without breaking binary
compatibility
2015-10-21 13:40:45 +03:00
Alexander Udalov
3f9806d758 Add constructors with messages and causes to runtime exceptions 2015-10-21 13:40:44 +03:00
Alexander Udalov
1e9624901a Add NonVolatileRef to runtime 2015-10-21 13:40:02 +03:00
Michael Nedzelsky
f987feed6f fix compilation (KtType -> KotlinType) 2015-10-20 20:46:11 +03:00
Michael Nedzelsky
1c36090b6d check for violation of Finite Bound Restriction and Non-Expansive Inheritance Restriction 2015-10-20 20:06:07 +03:00
Denis Zharkov
1413cab1e6 Mixin kotlin.Number methods into j.l.Number member scope
#KT-9672 Fixed
2015-10-20 19:41:58 +03:00
Alexey Sedunov
b774373dbc Minor: Restore ant.xml deleted in a previous commit 2015-10-20 19:41:06 +03:00
Michael Bogdanov
926e3fd350 Test for obsolete KT-9560
#KT-9560 Obsolete
2015-10-20 19:19:43 +03:00
Michael Bogdanov
1d84103cce Test for obsolete KT-6453
#KT-6453 Obsolete
2015-10-20 19:19:43 +03:00
Michael Bogdanov
378233e1f5 Test for obsolete KT-8095
#KT-8095 Obsolete
2015-10-20 19:19:42 +03:00
Michael Bogdanov
32d51af5dd Test for obsolete KT-8094
#KT-8094 Obsolete
2015-10-20 19:19:42 +03:00
Michael Bogdanov
98b818203f Test data fixed 2015-10-20 19:19:41 +03:00
Michael Bogdanov
d977d29ec4 Support access to companion private members from nested classes
#KT-5363 Fixed
  #KT-6804 Fixed
2015-10-20 19:19:41 +03:00
Alexey Sedunov
3d88df73e0 Minor: Fix spelling of intention text
#KT-9639 Fixed
2015-10-20 18:39:48 +03:00
Alexey Sedunov
929d06c86f Create from Usage: Implement 'Create property as constructor parameter' quick-fix
#KT-8426 Fixed
2015-10-20 18:39:47 +03:00
Alexey Sedunov
bdd495460b Extraction Engine: Properly retrieve declaration for overriden/delegated Java synthetic properties
#KT-9554 Fixed
2015-10-20 18:39:43 +03:00
Alexey Sedunov
84aa4e7664 Create from Usage: Fix rendering of receiver type reference
#KT-9559 Fixed
2015-10-20 18:39:40 +03:00
Alexey Sedunov
c2c8eccc77 Pull Up: Do not suggest indirect superinterfaces in the Pull Up dialog. Prefer superclass over superinterface as pull-up target
#KT-9543 Fixed
2015-10-20 18:39:39 +03:00
Alexey Sedunov
93ab055d17 Change Signature: Do not fail on unresolved PsiMethod
#KT-9535 Fixed
2015-10-20 18:39:38 +03:00
Alexey Sedunov
21d27d9340 Change Signature: Show conflict dialog in silent mode 2015-10-20 18:39:36 +03:00
Ilya Gorbunov
9e8600e52f Cleanup in stdlib generators 2015-10-20 18:10:20 +03:00
Ilya Gorbunov
d3d239bc1b Add deprecated xxxValue() extensions to Number for migration. 2015-10-20 18:10:18 +03:00
Mikhail Glukhikh
c9d8a15965 Generate Tests target fixed (file facades) 2015-10-20 17:44:25 +03:00
Dmitry Jemerov
d6a3870101 rename Kt to Kotlin in KtType, KtIcons 2015-10-20 16:23:31 +02:00
Andrey Breslav
9d7a8e7696 Create empty sources JAR for kotlin-osgi-bundle 2015-10-20 16:32:42 +03:00
Ilya Gorbunov
a439cce7d1 Correct deprecation message for StringBuilder { }. 2015-10-20 16:31:32 +03:00
Michael Bogdanov
d054c6bf6a Stable element order in redeclaration diagnostic 2015-10-20 13:25:27 +03:00
Mikhail Glukhikh
4501836b33 Java 8 tests fixed (txt only) 2015-10-20 11:18:38 +03:00
Mikhail Glukhikh
3151d4ca9d Check of type parameter bounds consistency #KT-9438 Fixed 2015-10-20 11:02:19 +03:00
Valentin Kipyatkov
73176fae17 Property with all accessors deprecated considered as deprecated 2015-10-20 10:12:34 +03:00
Valentin Kipyatkov
8e6b0a26bb Synthetic extensions to take all annotations from original declarations
#KT-9387 Fixed
2015-10-20 10:12:34 +03:00
Ilya Gorbunov
a0ccd36377 Fix legacy package facade name usage. 2015-10-20 04:37:19 +03:00
Ilya Gorbunov
8635eaae69 Alter regex in verify script for versions like 1.0.0-beta+1005 2015-10-20 04:37:05 +03:00
Nikolay Krasko
07f7f95fed Update pattern for bootstrap download 2015-10-20 04:14:57 +03:00
Nikolay Krasko
f3b5c7f36c Escape version pattern 2015-10-20 03:06:51 +03:00
Ilya Gorbunov
059bddf31c ReplaceWith for File.recurse 2015-10-20 02:32:08 +03:00
Ilya Gorbunov
6ac28facf1 Fix deprecations in tests 2015-10-20 02:31:51 +03:00
Ilya Gorbunov
fc7c008672 Provide deprecated unconstrained contains, indexOf, lastIndexOf methods for migration. 2015-10-20 02:31:18 +03:00
Ilya Gorbunov
95aac7ade6 Generate contains, indexOf, lastIndexOf with @NoInfer 2015-10-20 02:30:54 +03:00
Dmitry Jemerov
69a924a3ab fix main class name for builtin serializer 2015-10-20 00:49:03 +02:00
Ilya Gorbunov
100cba7d4f Fix legacy package facade names in maven plugin tests. 2015-10-19 23:04:02 +03:00
Ilya Gorbunov
59cd1cd14a Restore referential equality for AnnotatedClassDescriptor and AnnotatedConstructorDescriptor. 2015-10-19 23:03:59 +03:00
Svetlana Isakova
abf4030ef9 Don't exclude internal type annotations from decompiler renderers 2015-10-19 23:02:03 +03:00
Svetlana Isakova
667f6269e4 Filter internal annotations for resolve in type substitutor
to avoid having List<@NoInfer Int> as a result type
of function invocation (the function returns List<@NoInfer T>)
2015-10-19 23:02:03 +03:00
Andrey Breslav
fe057f781c Compilation fixed 2015-10-19 22:56:41 +03:00
Andrey Breslav
18524ea8ec Proper semantics for former data classes 2015-10-19 22:42:33 +03:00
Dmitry Jemerov
49033e0002 rename Jet* classes to Kt* 2015-10-19 21:35:30 +02:00
Dmitry Jemerov
660972b12d Merge remote-tracking branch 'origin/master' 2015-10-19 21:34:53 +02:00
Alexander Udalov
1c280c96b6 Set binary version to 1.0.0 2015-10-19 22:12:39 +03:00
Dmitry Jemerov
0dcd45daf0 Merge remote-tracking branch 'origin/master' 2015-10-19 21:01:38 +02:00
Svetlana Isakova
452637a946 Changed retention to 'binary' for annotations
used in resolve
2015-10-19 21:35:58 +03:00
Svetlana Isakova
6ced795db6 Fixed the problem with 'OnlyInputTypes' annotation 2015-10-19 21:35:57 +03:00
Alexey Tsvetkov
3476bed18a Drop @native from stdlib 2015-10-19 21:32:24 +03:00
Max Kammerer
715893446c Incremental compilation test data update after making package property backing field private 2015-10-19 21:21:02 +03:00
Nikolay Krasko
4c8384240b Check version in new format 2015-10-19 20:57:03 +03:00
Nikolay Krasko
8fce102212 Add script to do padding for teamcity version 2015-10-19 20:57:02 +03:00
Nikolay Krasko
4a9cd95d1d Update to 143.249.6 2015-10-19 20:57:01 +03:00
Alexey Tsvetkov
a1d4d099ba Increment jvm abi and stub versions 2015-10-19 20:45:03 +03:00
Alexey Tsvetkov
e9e42b0251 Code cleanup 2015-10-19 20:45:03 +03:00
Alexey Tsvetkov
6f96484e1f Fix tests 2015-10-19 20:45:03 +03:00
Alexey Tsvetkov
5c23820605 Fix load builtins test 2015-10-19 20:45:02 +03:00
Alexey Tsvetkov
3cd85a25e4 Generate ACC_NATIVE for external 2015-10-19 20:45:02 +03:00
Alexey Tsvetkov
5e90bafe18 Build stubs for modifiers 2015-10-19 20:45:02 +03:00
Alexey Tsvetkov
c459e78a7d Prohibit inline modifier on property, getter or setter 2015-10-19 20:45:02 +03:00
Alexey Tsvetkov
7a1b6ed13f Fix supressing no body errors for external functions 2015-10-19 20:45:02 +03:00
Alexey Tsvetkov
1e2256207c Update test data 2015-10-19 20:45:02 +03:00
Alexey Tsvetkov
d86121863a Render external, inline, tailrec, crossinline, noinline modifiers 2015-10-19 20:45:02 +03:00
Alexey Tsvetkov
d87ce33458 Drop @inline from tests and incremental compilation 2015-10-19 20:45:01 +03:00
Alexey Tsvetkov
df8066b1e4 Drop annotations from stdlib and compiler 2015-10-19 20:45:01 +03:00
Alexey Tsvetkov
c50aab6a75 Add modifier flags to descriptors 2015-10-19 20:45:01 +03:00
Alexey Tsvetkov
ea40f8af92 Serialize flags 2015-10-19 20:45:01 +03:00
Alexey Tsvetkov
8d22aabd9f Add flags 2015-10-19 20:45:01 +03:00
Alexey Tsvetkov
dc27363452 Remove @annotation from test data 2015-10-19 20:45:01 +03:00
Alexey Tsvetkov
ae17c06f7a Render ANNOTATION_CLASS kind correctly 2015-10-19 20:45:00 +03:00
Alexey Tsvetkov
f2c69e56d2 Remove @annotation from stdlib and compiler 2015-10-19 20:45:00 +03:00
Alexey Tsvetkov
28ca2e8b84 Build stubs for data modifier 2015-10-19 20:45:00 +03:00
Alexey Tsvetkov
1973573a89 Remove @data from test data 2015-10-19 20:45:00 +03:00
Alexey Tsvetkov
106e2667d4 Render data modifier 2015-10-19 20:45:00 +03:00
Alexey Tsvetkov
ec57d3f144 Remove @data from stdlib and compiler 2015-10-19 20:45:00 +03:00
Alexey Tsvetkov
264bd5235b Add isData() to ClassDescriptor 2015-10-19 20:45:00 +03:00
Alexey Tsvetkov
1414fe1699 Add IS_DATA flag 2015-10-19 20:44:59 +03:00
Dmitry Jemerov
ac55c9134c don't abort refactoring in case of exceptions in AutomaticVariableRenamer 2015-10-19 18:57:14 +02:00
Valentin Kipyatkov
30cbec3fc8 Refactoring 2015-10-19 19:22:26 +03:00
Valentin Kipyatkov
28c950ffbe Better replacement for annotations with parameters in ReplaceWIth pattern but still lot of safety pre-checks to be added 2015-10-19 19:22:26 +03:00
Valentin Kipyatkov
4290601807 VERY rough implementation of annotations with parameters in ReplaceWIth pattern 2015-10-19 19:22:26 +03:00
Michael Bogdanov
c8c3e88c82 Make top-level property backing field private in bytecode 2015-10-19 19:09:30 +03:00
Ilya Chernikov
376c188cf7 Setting property that controls application environment lifetime for daemon builds 2015-10-19 18:01:45 +02:00
Ilya Chernikov
25a128a8c6 Removing environment reuse diagnostics, because it breaks many tests
(cherry picked from commit 857488f)
2015-10-19 18:01:44 +02:00
Dmitry Jemerov
56735b3302 system property to keep application environment alive across multiple compilations
(cherry picked from commit a6b269c)
2015-10-19 18:01:43 +02:00
Natalia Ukhorskaya
f9399f0510 Skip MultiFileFacade classes as synthethic 2015-10-19 18:57:41 +03:00
Natalia Ukhorskaya
556e08b9eb Fix exception during Step Over 2015-10-19 18:57:40 +03:00
Valentin Kipyatkov
3a9beb719f Better test 2015-10-19 18:40:15 +03:00
Valentin Kipyatkov
a8d9c761c8 Correct detection of non-qualified references in ReplaceWith analyzer 2015-10-19 18:40:15 +03:00
Valentin Kipyatkov
7eaf00a34d Additional check to not corrupt PSI tree 2015-10-19 18:40:15 +03:00
Valentin Kipyatkov
66ea544a48 Fixed incorrect handling of this and super expressions in copy/paste processing and optimize imports 2015-10-19 18:40:15 +03:00
Valentin Kipyatkov
33d206ab22 Changed UI layout 2015-10-19 18:40:15 +03:00
Valentin Kipyatkov
872af51c99 Better wording in import settings UI 2015-10-19 18:40:14 +03:00
Valentin Kipyatkov
115d7a2eae Code style setting for importing Java statics and enums with '*'
#KT-9592 Fixed
2015-10-19 18:40:14 +03:00
Valentin Kipyatkov
27228c2fcc KT-9638 Optimize imports: don't create import for static methods from superclasses
#KT-9638 Fixed
2015-10-19 18:40:14 +03:00
Valentin Kipyatkov
edd2d853b1 KT-8961 Optimize Imports adds useless import for static Java method reference
#KT-8961 Fixed
2015-10-19 18:40:14 +03:00
Valentin Kipyatkov
b62260180f Changed semantics of ImportInsertHelper.importDescriptor() - it does not check if we allowed to import it on reference shortening 2015-10-19 18:40:14 +03:00
Valentin Kipyatkov
1730069d5e Corrected implementation of DeclarationDescriptor.canBeReferencedViaImport() to include object members 2015-10-19 18:40:13 +03:00
Nikolay Krasko
4a0eb3836f Diagnostic for EA-70732 (another try) 2015-10-19 18:38:46 +03:00
Valentin Kipyatkov
0cfccdefe4 "enum class" and "annotation class" are completed as single keywords 2015-10-19 18:36:06 +03:00
Valentin Kipyatkov
fa14b18f7f KT-8624 Don't complete "dynamic" keyword when targeting JVM
#KT-8624 Fixed
2015-10-19 18:36:06 +03:00
Valentin Kipyatkov
0a5255ee4e Dropped inspection for functions matching operator convention - only intention left 2015-10-19 18:36:06 +03:00
Mikhail Glukhikh
ff60a13228 libraries/tools fix (data classes migration) 2015-10-19 18:17:22 +03:00
Pavel V. Talanov
85c05b18f5 More compact and meaningful error reporting in ResolverForProject
No more enormous module lists
2015-10-19 18:03:08 +03:00
Pavel V. Talanov
668b36f684 Minor: meaningful message on failure to find nested class data when building cls stubs 2015-10-19 18:02:13 +03:00
Dmitry Petrov
dda508234f Drop package facades:
- update tests
- cleanup JetTyMapper after rebase
2015-10-19 16:03:22 +03:00
Dmitry Petrov
639300a89d Drop package facades: fix testData for IncrementalProjectPathCaseChangedTest 2015-10-19 16:03:21 +03:00
Dmitry Petrov
ac1f0efe7c Drop package facades: fix testData for IncrementalLazyCachesTestGenerated 2015-10-19 16:03:21 +03:00
Dmitry Petrov
621d26aeeb Drop package facades: fix incremental compilation tests & proto comparison tests
(package facades are no longer generated)
2015-10-19 16:03:21 +03:00
Pavel V. Talanov
300aeb83b0 Fix test data for j2k conversion
(cherry picked from commit e3bac5e)
2015-10-19 16:03:21 +03:00
Pavel V. Talanov
4f5f5fc3b9 Fix test data for completion in java of source/compiled kotlin
(cherry picked from commit 83f2625)
2015-10-19 16:03:21 +03:00
Dmitry Petrov
f227908151 Drop package facades:
- update incremental compilation tests
2015-10-19 16:03:21 +03:00
Dmitry Petrov
70c91b2e75 Drop package facades:
- getting rid of package facades in InlineCodegen & related stuff.
Provide binary source element to top-level package members.
2015-10-19 16:03:20 +03:00
Dmitry Petrov
989f761166 Drop package facades:
- fix KotlinJpsBuildTest
2015-10-19 16:03:20 +03:00
Dmitry Petrov
c55106a325 Drop package facades:
- incremental cache impl should not depend on package facades
- fix trivial incremental compilation tests
TODO: inlines DO NOT WORK with incremental compilation
2015-10-19 16:03:20 +03:00
Dmitry Petrov
8c64279419 Drop package facades: fix testData in duplicate JVM signature test
(declaration origins are now ordered alphabetically)
2015-10-19 16:03:20 +03:00
Dmitry Petrov
a76fb328cb Dropping package facades:
- fix testData for 'move' tests
(NB regression in **/onDemandStaticImport.java, see: https://youtrack.jetbrains.com/issue/KT-9624)
2015-10-19 16:03:20 +03:00
Dmitry Petrov
31a85132c6 Dropping package facades:
- use KotlinCodegenFacade to build light classes
(PackageCodegen is not enough to obtain proper diagnostics)
2015-10-19 16:03:19 +03:00
Dmitry Petrov
9de45f4c56 Dropping package facades:
- add @Deprecated kotlin.internal.InternalPackage to runtime
(for compatibility with older Kotlin code)
2015-10-19 16:03:19 +03:00
Dmitry Petrov
8ab55813fe Dropping package facades:
- clashing JVM signature diagnostics should be reported in stable order
- drop tests for clashes vs package facades
- introduce box test for class named as old package facade
- fix some testData
2015-10-19 16:03:19 +03:00
Dmitry Petrov
014bcfeb15 Dropping package facades: JetPositionManager should use file class 2015-10-19 16:03:19 +03:00
Dmitry Petrov
6b2b64e438 Drop package facades: fix evaluation tests 2015-10-19 16:03:19 +03:00
Dmitry Petrov
dc399ac46b Drop package facades: get rid of isPackageClassFqName 2015-10-19 16:03:18 +03:00
Pavel V. Talanov
12d5aca9d6 Fix test data for safe delete test
(cherry picked from commit 25f363d)
2015-10-19 16:03:18 +03:00
Pavel V. Talanov
50ff146865 Fix test data for reference resolve in java test
(cherry picked from commit fcfe51a)
2015-10-19 16:03:18 +03:00
Pavel V. Talanov
ba84214bd0 Fix test data for rename test
(cherry picked from commit aee4f25)
2015-10-19 16:03:18 +03:00
Pavel V. Talanov
e578caaed2 Fix test data for move test
Tests do not pass after this change
(cherry picked from commit d4437d7)
2015-10-19 16:03:18 +03:00
Pavel V. Talanov
2e1967eb84 Fix test data for change signature test
(cherry picked from commit 8d420f1)
2015-10-19 16:03:18 +03:00
Pavel V. Talanov
fd893ba499 Fix test data for reconcile package with directory test
(cherry picked from commit b926e02)
2015-10-19 16:03:17 +03:00
Pavel V. Talanov
abca7107a7 Fix test data for convert function/property to property/function test
(cherry picked from commit e78c26a)
2015-10-19 16:03:17 +03:00
Pavel V. Talanov
c2bc1280d3 Fix test data for call hierarchy test
(cherry picked from commit 0145cc4)
2015-10-19 16:03:17 +03:00
Pavel V. Talanov
5cf1417511 Fix test data for quick doc test
(cherry picked from commit 57589e3)
2015-10-19 16:03:17 +03:00
Pavel V. Talanov
9b7f22d2c7 Fix ClsStubConsistencyTest: it didn't do anything after some previous changes
(cherry picked from commit f5af9fc)
2015-10-19 16:03:17 +03:00
Pavel V. Talanov
bb77890a4e Drop DeprecatedFacadeUsageInspection
(cherry picked from commit f18b95d)
2015-10-19 16:03:17 +03:00
Pavel V. Talanov
93bb010875 Drop decompiledText/clsStub tests for package facades
(cherry picked from commit fbaa81c)
2015-10-19 16:03:16 +03:00
Pavel V. Talanov
3a34dc0efe minor: fixes in test data
(cherry picked from commit 6ea4fbd)
2015-10-19 16:03:16 +03:00
Dmitry Petrov
d19ce49606 Dropping package facades:
- do not depend on package facade in LazyJavaPackageFragment
2015-10-19 16:03:16 +03:00
Dmitry Petrov
149e70aa07 Dropping package facades:
- light classes: do not generate light class for package facade
- drop package facades as multifile classes compilation mode support
- get rid of some additional package facade fqName usages
- update tests for light classes
2015-10-19 16:03:16 +03:00
Dmitry Petrov
e7fb7483c5 Drop package facades: update compiler tests. 2015-10-19 16:03:16 +03:00
Dmitry Petrov
3502c393fc Drop package facades: JVM BE tests passed. 2015-10-19 16:03:16 +03:00
Ilya Gorbunov
a59cb22bc6 Update testdata for LoadBuiltinsTest 2015-10-19 15:37:44 +03:00
Ilya Gorbunov
078d904d41 Deprecated ranges: relax errors to warnings. 2015-10-19 15:37:42 +03:00
Ilya Gorbunov
69dc6701cc Deprecate Double, Float and Comparable range implementations. 2015-10-19 15:37:41 +03:00
Pavel V. Talanov
aeb4abe39d Fix decompiled text for named companion object
Fix stub/ast mismatch for compiled named companion objects
Add tests
2015-10-19 15:27:49 +03:00
Pavel V. Talanov
d74a989d93 Tweak light classes to avoid computing stubs on certain api calls
Should speed up completion from java for certain cases
2015-10-19 15:27:48 +03:00
Mikhail Glukhikh
8d88109c00 Underscore names are now forbidden 2015-10-19 15:24:45 +03:00
Mikhail Glukhikh
f61aa18a05 Code cleanup: get rid of _ (mostly renamed to arg) 2015-10-19 15:24:42 +03:00
Mikhail Glukhikh
059175560c No __ as lambda parameter 2015-10-19 15:24:39 +03:00
Mikhail Glukhikh
14e38ff6d4 data deprecations cleanup: reserved word tests fixed 2015-10-19 15:24:36 +03:00
Mikhail Glukhikh
a4af6a3076 data deprecations (empty constructors, non val/var arguments, vararg, superclasses) are now errors, relevant tests fixed 2015-10-19 15:24:28 +03:00
Mikhail Glukhikh
cae0388a57 Code cleanup: data deprecations and some effective visibility stuff 2015-10-19 15:24:22 +03:00
Alexander Udalov
a501878d60 Workaround circular dependency of KProperty1 and KClassImpl
This appeared after introduction of KProperty in delegated property convention
methods. If a KProperty1 instance is created while constructing a KClassImpl
instance before assigning the 'jClass' field, an NPE is thrown because the
constructor of that KProperty1 instance tries to lookup the declaring class of
the property, which in some case happens to be the exact KClassImpl we're
constructing. No test added because I was not able to reproduce the behavior in
an isolated environment
2015-10-19 15:20:20 +03:00
Valentin Kipyatkov
d0f318d7db Fixed bug in completion with double insertion of "::class.java" 2015-10-19 15:10:21 +03:00
Svetlana Isakova
499ca02615 Changed retention to 'binary' for LowPriorityInOverloadResolution 2015-10-19 14:58:02 +03:00
Ilya Chernikov
ab3cfc3454 Adding property to enforce daemon shutdown, dropping unnecessary inheritance of the CompilerServiceImpl from UnicastRemoteObject, because manual control is used
(cherry picked from commit 182a231)
(cherry picked from commit eecd953)
2015-10-19 13:32:20 +02:00
Ilya Chernikov
16817f47e9 Removing dependency of kotlin plugin from daemon client (kotlinr), it should only depend on rmi-interface
(cherry picked from commit 01309eb)
(cherry picked from commit ed91190)
(cherry picked from commit da54faf)
2015-10-19 13:32:19 +02:00
Svetlana Isakova
514a1dea57 Changed test for 'LowPriorityInOverloadResolution' annotation 2015-10-19 14:15:06 +03:00
Svetlana Isakova
cb34498278 Check nullability in initial constraints
except constraints for receiver type (it can be accessed via safe call)
2015-10-19 14:15:06 +03:00
Svetlana Isakova
bb9f7094e0 Report 'TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH'
on call element, not on callee expression
2015-10-19 14:15:05 +03:00
Svetlana Isakova
4c85b69c88 Report type inference error
when inference failed with 'NoInfer' annotation
2015-10-19 14:15:05 +03:00
Zalim Bashorov
5ab3dd1716 Minor: do simpler check first 2015-10-19 14:01:59 +03:00
Yan Zhulanow
b2470a6aad Report warning on unary plus()/minus() 2015-10-19 11:51:54 +03:00
Nikolay Krasko
58cbf09232 Refactoring: collect all annotation presentation data in one place 2015-10-19 11:30:50 +03:00
Nikolay Krasko
4adcf3f114 Refactoring: return not-null from doCreateActions() 2015-10-19 11:30:49 +03:00
Nikolay Krasko
9ef8370871 Allow to create quickfix multifile tests in single file
It simplifies creating new tests
2015-10-19 11:30:47 +03:00
Nikolay Krasko
573738c87e Refactoring: extract name highlighting to separate class 2015-10-19 11:30:44 +03:00
Valentin Kipyatkov
734d3f4fca Removed test which did not work by some reason 2015-10-19 09:43:13 +03:00
Valentin Kipyatkov
963a8992b1 Fixed availability of "Make abstract" and "Implement members" quickfixes 2015-10-19 09:43:13 +03:00
Valentin Kipyatkov
fc10fa66be J2K does not convert usages of java "get" methods into "[]" (explicit "operator" modifier is required) 2015-10-19 09:43:13 +03:00
Valentin Kipyatkov
e7fa2cb776 Replace with explicit "get" inspection enabled by default but is reported only for functions explicitly marked with "operator" 2015-10-19 09:43:13 +03:00
Valentin Kipyatkov
e3ff464109 Minor 2015-10-19 09:43:13 +03:00
Valentin Kipyatkov
55575b7f10 J2K adds "operator" modifier to methods that look like operator on conversion 2015-10-19 09:43:12 +03:00
Valentin Kipyatkov
563ad4bab2 Added test 2015-10-19 09:43:12 +03:00
Valentin Kipyatkov
5ce0ed37b1 Moved file to another package 2015-10-19 09:43:12 +03:00
Valentin Kipyatkov
d1de2f65c9 Rewritten AddOperatorModifierInspection to be based on an intention (shouldn't we drop the inspection at all?) 2015-10-19 09:43:12 +03:00
Valentin Kipyatkov
df9ad17ea2 Moved&renamed class 2015-10-19 09:43:12 +03:00
Valentin Kipyatkov
627b31f2f7 Minor 2015-10-19 09:43:12 +03:00
Valentin Kipyatkov
f89d41dcda OperatorModifierInspection: reused code from OperatorChecks 2015-10-19 09:43:11 +03:00
Valentin Kipyatkov
4e73fe0f39 Renamed test data folder 2015-10-19 09:43:11 +03:00
Valentin Kipyatkov
dc909ac166 J2K: coversion of specially mapped built-in methods + replacing "get" with "[]" where possible 2015-10-19 09:43:11 +03:00
Valentin Kipyatkov
50f559a1c8 ReplaceGetIntention should not be available for non-operator functions 2015-10-19 09:43:11 +03:00
Valentin Kipyatkov
45389c61b4 Made AddFunctionToSupertypeFix low priority 2015-10-19 09:43:11 +03:00
Valentin Kipyatkov
5e7fd78028 Don't cause tests to hang because of UnsupportedAbiVersion notification 2015-10-19 09:43:10 +03:00
Valentin Kipyatkov
e42bb1698d MoveAssignmentToInitializerIntention to select property type when it can be removed 2015-10-19 09:43:10 +03:00
Valentin Kipyatkov
fc89b1e766 ShortenReferences to use partial body resolve 2015-10-19 09:43:10 +03:00
Yan Zhulanow
3a89c2194a Fix Java 8 tests (annotation methods are not loaded as functions anymore) 2015-10-19 03:56:15 +03:00
Yan Zhulanow
e14c9645dc Error on 'if' without an 'else' branch when used as an expression 2015-10-19 03:56:15 +03:00
Zalim Bashorov
de5dc61820 Make NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION error 2015-10-18 22:49:08 +03:00
Michael Bogdanov
a16658a9e9 Temporary workaround for convention method invocation 2015-10-18 17:53:29 +03:00
Michael Bogdanov
01864801f3 Stable accessors names 2015-10-18 17:53:29 +03:00
Michael Bogdanov
7851abd535 Generate access to private members through synthetic accessors in inline functions 2015-10-18 17:53:28 +03:00
Michael Bogdanov
3b02498ca8 Tests for private members and accessors for them 2015-10-18 17:53:28 +03:00
Michael Bogdanov
8641dbf42a Fix couldUseDirectAccessToProperty for private top-level properties 2015-10-18 17:53:27 +03:00
Michael Bogdanov
e2eddac27d Workaround for KT-9603 2015-10-18 17:53:27 +03:00
Michael Bogdanov
7022d84ec1 Use package part context for class generation 2015-10-18 17:53:27 +03:00
Michael Bogdanov
3e64baad78 Support multifile facades in isCallInsideSameClassAsDeclared 2015-10-18 17:53:26 +03:00
Michael Bogdanov
c63d221da3 Skip private members in facades 2015-10-18 17:53:26 +03:00
Michael Bogdanov
5b3a7a473e Private visibility for top-level private members 2015-10-18 15:53:48 +03:00
Ilya Gorbunov
10784644a5 Throwable stackTrace property instead of getStackTrace() function. 2015-10-17 23:43:20 +03:00
Svetlana Isakova
7208efc784 Fix tests with type annotations 2015-10-17 19:07:25 +03:00
Denis Zharkov
fafca76ac5 Generate common bridges for final builtin declaration
#KT-9596 Fixed
2015-10-17 17:46:17 +03:00
Denis Zharkov
cc94acdabc Do not load common for special properties from Java
I.e. do not treat getName in Java enum as override of Enum.name
2015-10-17 17:46:17 +03:00
Denis Zharkov
28c46b73f1 Rename some of builtin parameters 2015-10-17 17:46:16 +03:00
Denis Zharkov
1c02231cda Regenerate rendered descriptors after transforming Enum.values to property 2015-10-17 17:46:16 +03:00
Denis Zharkov
d8ede6d03e Transform Enum.values to property 2015-10-17 17:46:16 +03:00
Mikhael Bogdanov
d985f56b8d Fix local variable shift for inline functions 2015-10-17 17:02:56 +03:00
Natalia Ukhorskaya
9168572b8c Write local variable for inline function and inline argument 2015-10-17 17:02:55 +03:00
Michael Bogdanov
3452fc8d02 Don't initialize const properties in constructor
#KT-9532 Fixed
2015-10-17 15:31:57 +03:00
Stanislav Erokhin
7d7d37719b Forbidden old invokeExtension convention. 2015-10-17 14:45:53 +03:00
Alexey Sedunov
fc4b0a8121 Minor: Rename test class 2015-10-17 00:24:40 +03:00
Alexey Sedunov
6f5d977728 Inspections: Add inspection on equals()/hashCode() 2015-10-17 00:24:39 +03:00
Alexey Sedunov
127cb36602 Minor: Allow running member generation actions without editor 2015-10-17 00:24:38 +03:00
Alexey Sedunov
915236a6ba Code Insight: "Generate equals/hashCode" action 2015-10-17 00:24:37 +03:00
Ilya Gorbunov
d1d0807229 Add a note about *Raw functions behavior. 2015-10-16 23:55:37 +03:00
Ilya Gorbunov
8fd5677fe0 Move map-related *Raw methods to Maps.kt and do some cleanup there.
Correct deprecation messages and replacements.
2015-10-16 23:38:40 +03:00
Ilya Gorbunov
e2cf8a919c Fix contains usages in stdlib tests 2015-10-16 23:38:30 +03:00
Ilya Gorbunov
683bc4bd01 Generate *Raw methods. 2015-10-16 23:38:29 +03:00
Ilya Gorbunov
8aed39d9bb Provide *Raw methods as a replacement. 2015-10-16 23:38:27 +03:00
Ilya Gorbunov
d1a007e902 Do not generate deprecated contains for ranges. 2015-10-16 23:38:25 +03:00
Ilya Gorbunov
c5cd599e30 Delegate indexOf and lastIndexOf to List if the Iterable is List. 2015-10-16 23:38:23 +03:00
Ilya Gorbunov
45d13fafc8 StdLib generator: Allow receiver star-projections to be specified per-family. 2015-10-16 23:38:22 +03:00
Ilya Gorbunov
efa285bc30 ExpressionDecomposer: non-nullable upper bound of R, since supertype expects R to be non-null. 2015-10-16 23:38:20 +03:00
Ilya Gorbunov
654a85368d Allow to evaluate FamilyProperty based on family value specified. 2015-10-16 23:38:18 +03:00
Yan Zhulanow
3bb1b1adfd Put property delegates -related warnings on 'by' 2015-10-16 22:20:06 +03:00
Yan Zhulanow
b42d913bd7 Unify 'lateinit' diagnostics 2015-10-16 22:19:33 +03:00
Yan Zhulanow
9699708fb8 Do not put inapplicable annotations on getter 2015-10-16 22:19:33 +03:00
Yan Zhulanow
9ae3b0fa9c Drop loading Java annotation methods as functions 2015-10-16 22:13:34 +03:00
Svetlana Isakova
25b40455ad Serialize/deserialize annotations on type parameters 2015-10-16 21:58:47 +03:00
Svetlana Isakova
b7e2604bf2 Rename DeserializedTypeParameterDescriptor .java -> .kt 2015-10-16 21:58:47 +03:00
Svetlana Isakova
ded62686a0 Added 'LowPriorityInOverloadResolution' annotation 2015-10-16 21:58:46 +03:00
Svetlana Isakova
1cfb7d8f57 Changed constraint system tests
after adding new error 'hasTypeParameterWithUnsatisfiedOnlyInputTypesError'
2015-10-16 21:58:46 +03:00
Svetlana Isakova
a6ec5cecc0 Added 'OnlyInputTypes' annotation 2015-10-16 21:58:46 +03:00
Svetlana Isakova
082469aee4 Resolve annotations on type parameters of functions and properties 2015-10-16 21:58:45 +03:00
Svetlana Isakova
9b440345a1 Do not render @NoInfer, @Exact annotations
For now they are always not rendered,
but later they should be rendered in descriptors, but omitted in error messages
2015-10-16 21:58:45 +03:00
Svetlana Isakova
566e27788f Moved @NoInfer, @Exact to internal package 2015-10-16 21:58:44 +03:00
Svetlana Isakova
b401d46ae4 Check annotations on type arguments 2015-10-16 21:58:44 +03:00
Svetlana Isakova
6c4771147a Added more tests on annotations for nullable types 2015-10-16 21:58:43 +03:00
Yan Zhulanow
8a5c59e6b7 Inline static fields from Java 2015-10-16 21:36:33 +03:00
Denis Zharkov
7cbab5816c Fix lost testData 2015-10-16 21:11:05 +03:00
Mikhail Glukhikh
4b35e3b135 Preliminary declaration visitor for estimating local variable's predictability for smart casts
Predictability estimation algorithm is completely new, but backward compatibility should present.
A large set of tests. Some updated tests.
Smart casts allowed for captured variables if they are not modified in closure #KT-9051 Fixed
Also #KT-8643 Fixed
Also #KT-7976 Fixed
Correct handling of lambda arguments in functions #KT-9143 Fixed
2015-10-16 20:47:47 +03:00
Stanislav Erokhin
de7d2978db Fix assertEquals usage in kotlin code after adding statics to scope. 2015-10-16 20:42:35 +03:00
Stanislav Erokhin
d5dbc9638d Added static methods, nested classes and companion object from superclasses. 2015-10-16 20:42:34 +03:00
Stanislav Erokhin
ace99f6c3f Don't use ForceResolveUtil.forceResolveAllContents in TypeResolver in order to avoid problems with cyclic hierarchy. 2015-10-16 20:42:33 +03:00
Ilya Gorbunov
e24af934dc Use the same implementation in Array.toArrayList as in arrayListOf. 2015-10-16 19:20:26 +03:00
Valentin Kipyatkov
55122cda9e Minor changes on code review 2015-10-16 19:06:35 +03:00
Valentin Kipyatkov
6cf7d92565 Checking that no quickfixes hold references to DeclarationDescriptor's 2015-10-16 19:06:35 +03:00
Valentin Kipyatkov
a6c4d29640 More correct 2015-10-16 19:06:34 +03:00
Valentin Kipyatkov
6dbfe11afc Dropped inheritance from HintAction when not needed, dropped JetHintAction 2015-10-16 19:06:34 +03:00
Valentin Kipyatkov
9c6e0293ed No i18n 2015-10-16 19:06:34 +03:00
Valentin Kipyatkov
8cc3763465 Inlined JetAddFunctionToClassifierAction class into AddFunctionToSupertypeFix 2015-10-16 19:06:34 +03:00
Valentin Kipyatkov
ff13bcce1f Code simplifications 2015-10-16 19:06:34 +03:00
Valentin Kipyatkov
1a13ec0b00 Converted to Kotlin 2015-10-16 19:06:34 +03:00
Valentin Kipyatkov
41775bf8a0 Code refactoring 2015-10-16 19:06:34 +03:00
Valentin Kipyatkov
7c4e9f1caf ChangeMemberFunctionSignatureFix to not hold DeclarationDescriptor's 2015-10-16 19:06:33 +03:00
Valentin Kipyatkov
8dcc0096a8 Code simplifications + no i18n 2015-10-16 19:06:33 +03:00
Valentin Kipyatkov
cd6450e1a1 Converted to Kotlin 2015-10-16 19:06:33 +03:00
Valentin Kipyatkov
714e97751d Not holding descriptor in SuperClassNotInitialized.AddParametersFix 2015-10-16 19:06:33 +03:00
Valentin Kipyatkov
412f4a30c4 Correctness check for wrapper action's priority 2015-10-16 19:06:33 +03:00
Valentin Kipyatkov
670b278891 MapPlatformClassToKotlinFix to not hold descriptors directly 2015-10-16 19:06:33 +03:00
Valentin Kipyatkov
9bb159d4bc Code simplifications 2015-10-16 19:06:32 +03:00
Valentin Kipyatkov
78ac41a676 Converted to Kotlin + no i18n 2015-10-16 19:06:32 +03:00
Valentin Kipyatkov
17123a3cf2 Renames 2015-10-16 19:06:32 +03:00
Valentin Kipyatkov
c849c029cc More refactoring 2015-10-16 19:06:32 +03:00
Valentin Kipyatkov
4cf440b801 Refactoring 2015-10-16 19:06:32 +03:00
Valentin Kipyatkov
f311d9febf Refactored change signature fixes to not hold DeclarationDescriptor's 2015-10-16 19:06:31 +03:00
Valentin Kipyatkov
b2a04a7b04 Code refactorings in QuickFixWithDelegateFactory 2015-10-16 19:06:31 +03:00
Valentin Kipyatkov
de52cae7be Moved and renamed CreateFromUsageFactory 2015-10-16 19:06:31 +03:00
Valentin Kipyatkov
79375fa5e1 No i18n 2015-10-16 19:06:31 +03:00
Valentin Kipyatkov
0542ef30e3 Converted to Kotlin 2015-10-16 19:06:31 +03:00
Valentin Kipyatkov
5d1d44dfd3 More correct way to map arguments to parameters 2015-10-16 19:06:31 +03:00
Valentin Kipyatkov
4df9a46b00 Moved method 2015-10-16 19:06:30 +03:00
Valentin Kipyatkov
bce9f26327 Code improvements 2015-10-16 19:06:30 +03:00
Valentin Kipyatkov
f67e05de72 No i18n 2015-10-16 19:06:30 +03:00
Valentin Kipyatkov
4816003efd Refactoring to not pass BindingContext 2015-10-16 19:06:30 +03:00
Valentin Kipyatkov
c79d93b46c Converted to Kotlin 2015-10-16 19:06:30 +03:00
Valentin Kipyatkov
23025b072e Renamed JetIntentionAction to KotlinQuickFixAction 2015-10-16 19:06:29 +03:00
Valentin Kipyatkov
ab87471177 Converted JetIntentionAction to Kotlin 2015-10-16 19:06:29 +03:00
Valentin Kipyatkov
800e629614 Changed code style settings to place 'else' on new line 2015-10-16 19:06:18 +03:00
Ilya Gorbunov
59f88cfb52 Ensure vararg copy behavior for specific case of arrayListOf in JS. 2015-10-16 18:43:41 +03:00
Ilya Gorbunov
446cdc087d Optimizations in listOf and arrayListOf constructor functions.
Remove linkedListOf() from JS.
#KT-5703 Fixed
#KT-8519 Fixed
2015-10-16 18:28:43 +03:00
Denis Zharkov
032ba44070 Minor. Add optimization for getOverriddenBuiltinWithDifferentJvmName 2015-10-16 18:16:03 +03:00
Denis Zharkov
155bbd40ae Do not generate not-null assertion for argument of Collection.contains
Of course not only for contains but for other methods having INSTANCEOF bar.rier
Otherwise using platform null values becomes for such methods becomes
dangerous in cases like `platformString in setOf("", "")`
2015-10-16 18:16:02 +03:00
Denis Zharkov
495780f5ab Generate INVOKEVIRTUAL 'contains(Object)' instead of 'contains(String)'
In cases when callee overrides Collection<String>.contains
2015-10-16 18:16:02 +03:00
Denis Zharkov
64da399b31 Do not generate builtin bridges with Kotlin signature as synthetic
They should be available in Java (at least for overridding)
2015-10-16 18:16:02 +03:00
Denis Zharkov
d335f71dfe Generate special bridges for builtins with same name but different JVM descriptor 2015-10-16 18:16:02 +03:00
Denis Zharkov
07d8754adb Minor. Add bytecode listing tests with contains* methods 2015-10-16 18:16:02 +03:00
Denis Zharkov
b5296104e9 Ignore fake overrides when generating stub methods for MutableCollections
Because it's redundant as we go through all mutable collection hierarchy anyway
It wasn't a problem because for fake override just `generatedBridges` is being called
and there were no special bridges for such methods.
2015-10-16 18:16:02 +03:00
Denis Zharkov
65551e1185 Print 'final' and 'abstract' in BytecodeListing tests and sort declarations
Latter is needed to make format stable
2015-10-16 18:16:02 +03:00
Denis Zharkov
978a4cfa3c Minor. Refine naming for SpecialBuiltinMembers 2015-10-16 18:16:02 +03:00
Denis Zharkov
b6df6d8ae0 Exclude runtime.jvm from source roots
It's needed not to broke whole project compilation
while transforming Array.size
2015-10-16 18:16:02 +03:00
Denis Zharkov
bd37a10677 Transform *Array.size to properties 2015-10-16 18:16:02 +03:00
Andrey Breslav
b050324869 Mark string prefixes and suffixes as unsupported 2015-10-16 18:03:53 +03:00
Andrey Breslav
267ec2724e Minor. Ant task renamed: JetLexer -> KotlinLexer 2015-10-16 17:55:12 +03:00
Andrey Breslav
d1a3a66e12 Minor. Comments removed 2015-10-16 17:55:11 +03:00
Nikolay Krasko
cf7f94a559 Process request for searching class with empty qualified name without errors 2015-10-16 16:28:02 +03:00
Yan Zhulanow
2a55894bec Update OperationsMapGenerated 2015-10-16 16:19:51 +03:00
Zalim Bashorov
e54e6a3f31 Minor: fix build 2015-10-16 16:14:34 +03:00
Zalim Bashorov
79d38a6c8f Report the error when a declaration in Kotlin accidentally overrides a static member from Java 2015-10-16 16:14:34 +03:00
Zalim Bashorov
72a686f9e0 Add tests for accessing to Java/Kotlin inner/nested classes 2015-10-16 16:09:35 +03:00
Zalim Bashorov
9acf3e40de Generic type with Nothing in arguments compiles to raw type 2015-10-16 15:30:41 +03:00
Michael Nedzelsky
8e9f1ac31a Extension function type is not allowed as supertype 2015-10-16 14:23:47 +03:00
Dmitry Petrov
d3e2dd5942 Dropping package facades: drop package facades not cleaned up automatically 2015-10-16 13:53:23 +03:00
Dmitry Petrov
670b49ec5e Dropping package facades: remove unused imports from package facades
(not cleaned up automatically)
2015-10-16 11:23:22 +03:00
Alexander Udalov
74cd449d86 Fix runtime copying for IDEA run configuration
- 'overwrite' is false by default, so now it's set to true explicitly
- copy the runtime to all other plugins as well because runtimes from those
  plugins sometimes appear before the Kotlin one
2015-10-15 22:36:23 +03:00
Alexander Udalov
f62128bdcd Fix protobuf extension API usages
"getExtension" returns default value when the requested extension is not
present, which is 0 for Int, which makes no sense for extensions like
methodImplClassName that are storing the number in the string table
2015-10-15 22:36:22 +03:00
Nikolay Krasko
4a361ebe60 Hide update plugin popup right after Intall was clicked to prevent multiple downloads 2015-10-15 19:37:22 +03:00
Michael Nedzelsky
114d19e6d9 use MainFunctionDetector in order to check for main function 2015-10-15 19:24:45 +03:00
Valentin Kipyatkov
e2c7ba7f40 Changed test data to not use deprecated api 2015-10-15 19:20:12 +03:00
Valentin Kipyatkov
36b3b16cb5 KT-5145 has been resolved but KT-9606 exists 2015-10-15 19:20:12 +03:00
Valentin Kipyatkov
a83539705e Fixed completion handler for annotations (because the parser does not parse "@ xxx" as annotation anymore) 2015-10-15 19:20:12 +03:00
Valentin Kipyatkov
dc83d5cf04 Fixed test data 2015-10-15 19:20:12 +03:00
Valentin Kipyatkov
f67bd8c13f Even more precise keyword completion for modifiers 2015-10-15 19:20:11 +03:00
Valentin Kipyatkov
15d507bf47 Removed obsolete comments 2015-10-15 19:20:11 +03:00
Valentin Kipyatkov
762900037e Minor 2015-10-15 19:20:11 +03:00
Valentin Kipyatkov
26768ad34b Renames 2015-10-15 19:20:11 +03:00
Valentin Kipyatkov
292ea7625c Removed obosolete modifier "ref" from tests 2015-10-15 19:20:11 +03:00
Valentin Kipyatkov
dfcf459bf6 Minor 2015-10-15 19:20:11 +03:00
Valentin Kipyatkov
87cfccc2d9 Removed all places in parser where obsolete annotation syntax was allowed 2015-10-15 19:20:10 +03:00
Valentin Kipyatkov
875eaa52e3 Removing unused code 2015-10-15 19:20:10 +03:00
Valentin Kipyatkov
58a9b34276 Minor 2015-10-15 19:20:10 +03:00
Valentin Kipyatkov
78f60503e3 More correct keyword completion after @ 2015-10-15 19:20:10 +03:00
Valentin Kipyatkov
e27528477f KT-9478 No override completion for second parameter in primary constructor
#KT-9478 Fixed
 #KT-9386 Fixed
2015-10-15 19:20:10 +03:00
Valentin Kipyatkov
434be3be21 Adapted keyword completion to changed parser + more precise completion for modifier keywords 2015-10-15 19:20:09 +03:00
Valentin Kipyatkov
f90ff31507 Adapting code completion to no annotations without "@" 2015-10-15 19:20:09 +03:00
Valentin Kipyatkov
ddcab047ce Added CallType.ANNOTATION 2015-10-15 19:20:09 +03:00
Valentin Kipyatkov
0030fb7155 Removed unused code 2015-10-15 19:20:09 +03:00
Valentin Kipyatkov
9e694523f8 Fixing conversion from Java on copy/paste after changes in parser 2015-10-15 19:20:09 +03:00
Valentin Kipyatkov
b519a8af08 Fixing live template context detection after changes in parser 2015-10-15 19:20:09 +03:00
Valentin Kipyatkov
988c934e78 Fixed Pull Up to generate correct annotation syntax 2015-10-15 19:20:08 +03:00
Valentin Kipyatkov
c8135fe4f2 Removed obolete syntax for enum entries in test data 2015-10-15 19:20:08 +03:00
Valentin Kipyatkov
090ea37a32 Fixed test data to use only annotation syntax with @ 2015-10-15 19:20:08 +03:00
Valentin Kipyatkov
487501a7a4 Fixed test data after changes in parser 2015-10-15 19:20:08 +03:00
Valentin Kipyatkov
d84020b1f3 Removed special support for parsing annotations for multi-declaration in for 2015-10-15 19:20:08 +03:00
Valentin Kipyatkov
98dc8f234e Drop suppport for annotation syntax without '@' from parser 2015-10-15 19:20:07 +03:00
Ilya Gorbunov
d8ba854036 Fixes and cleanup in stdlib generator after builtin renames. 2015-10-15 18:35:11 +03:00
Ilya Gorbunov
a5ccecfc3d StdLib generator: refactor deprecation DSL to be able to set deprecation level. 2015-10-15 18:30:19 +03:00
Alexander Udalov
66417ed329 Parse type arguments after callable reference as error
Is likely to be supported in the future
2015-10-15 18:25:42 +03:00
Alexander Udalov
32a9bddbf9 Increase ABI version after yet another change to binary format 2015-10-15 18:25:42 +03:00
Alexander Udalov
bf4a681589 Deduce receiver type of callable reference from LHS, not from descriptor 2015-10-15 18:25:42 +03:00
Alexander Udalov
2cf437c0e2 Fix type of callable reference to fake override 2015-10-15 18:25:41 +03:00
Alexander Udalov
9eb2e16b94 Support strings directly in JVM string table
For small strings it may be beneficial to store them as is in the proto at one
point instead of in a class annotation, because each annotation argument in the
classfile has a constant overhead which may be significant for small strings
2015-10-15 18:25:41 +03:00
Alexander Udalov
4c21142648 Store type parameter names sometimes instead of ids
This helps to reuse instances of types when TypeTable is enabled in cases when
a file or a class contains a lot of functions with type parameters with the
same name (like Maps.kt in the stdlib with "Map<K, V>")
2015-10-15 18:25:40 +03:00
Alexander Udalov
fb5d8de84b Use type table in DescriptorSerializer, add switch to enable/disable, test 2015-10-15 18:25:40 +03:00
Alexander Udalov
82d2e623d3 Support a more optimized way of storing types in metadata
Together with almost every type now there's also an id which references a type
from a separate table. Storing such ids instead of Type messages will allow to
reduce the size of the metadata for files where types are used many times over
and over again. Currently only deserialization of such types is supported,
along with the former mechanism
2015-10-15 18:25:39 +03:00
Yan Zhulanow
bff6639e2d Use stubs in checkParameterInFunctionType 2015-10-15 18:23:58 +03:00
Yan Zhulanow
d52f245cf7 Rename unary plus/minus in builtins and stdlib 2015-10-15 18:23:58 +03:00
Yan Zhulanow
f7ce0c2d20 Add new intrinsic methods: unaryPlus, unaryMinus 2015-10-15 18:23:58 +03:00
Ilya Gorbunov
2fba80168d Remove usages of Delegates.lazy 2015-10-15 18:20:41 +03:00
Ilya Gorbunov
c4ef4758d2 Remove last two usages of Delegates.blockingLazy 2015-10-15 18:20:39 +03:00
Pavel V. Talanov
053e61a226 file facade index: Fix indexing files without top level members by mistake 2015-10-15 15:49:46 +03:00
Pavel V. Talanov
d9ed79e781 Add test for not generating file facade light class for empty file 2015-10-15 15:49:46 +03:00
Pavel V. Talanov
123c55b6db IDELightClassGenerationSupport: fix not generating @JvmName annotation for file facade light classes
This was a minor inconsistency between compiler and ide light classes
2015-10-15 15:49:45 +03:00
Pavel V. Talanov
9e9f593a7f Generate tests for ide light classes from the same test data as for compiler light classes 2015-10-15 15:49:45 +03:00
Pavel V. Talanov
35e56993d3 Rename: KotlinLightClassTest -> CompilerLightClassTest
In fact we have very different code in compiler and ide but only one test
2015-10-15 15:49:44 +03:00
Pavel V. Talanov
225e5abc92 Test renaming empty file 2015-10-15 15:49:43 +03:00
Pavel V. Talanov
53b21061fd Don't use StubBasedPsiElementBase#getStubOrPsiParent
#KT-9579 Fixed
2015-10-15 15:49:42 +03:00
Pavel V. Talanov
bfcabad148 Don't override StubBasedPsiElementBase.getStub
#KT-9575 Fixed
2015-10-15 15:49:42 +03:00
Michael Nedzelsky
890ae3e914 Make single-file classes tolerant to having many main()'s 2015-10-15 15:46:26 +03:00
Dmitry Petrov
416dda95ce Drop package facades: build reflection in "regular" mode
(no multifile package facades).
2015-10-15 10:33:53 +03:00
Dmitry Petrov
8cd624a58a Drop package facades: code cleanup in Kotlin project. 2015-10-15 10:33:47 +03:00
Dmitry Petrov
57869d85e8 Spread should always copy arrays.
Introduce a special (package private) utility class ArraysUtilJVM
to fix Array<T>.asList() issues.
2015-10-15 09:16:21 +03:00
Alexander Udalov
97946feb9a Minor, rename and adapt test 2015-10-15 00:51:37 +03:00
Alexander Udalov
556a169a5d Update stdlib usages of PropertyMetadata to KProperty<*> 2015-10-15 00:05:31 +03:00
Ilya Gorbunov
43bb9347c6 Rename Regex.hasMatch to containsMatchIn, and add corresponding contains function to CharSequence. 2015-10-14 22:49:50 +03:00
Ilya Gorbunov
d1d865aa0f Rename methods in Regex. Add matchEntire method to match entire string against regex. 2015-10-14 22:49:48 +03:00
Ilya Gorbunov
d860f335a3 JS: Make StringBuilder implement CharSequence and introduce secondary constructors. 2015-10-14 22:49:47 +03:00
Ilya Gorbunov
935024db4e Fix with hack bridge codegen for indexOf and lastIndexOf methods. More sophisticated solution is required. 2015-10-14 22:49:40 +03:00
Alexander Udalov
5017e54022 Fix test broken during merge 2015-10-14 22:02:11 +03:00
Alexander Udalov
bd5f068454 Fix build after subtle change of Enum.name from function to property 2015-10-14 22:00:48 +03:00
Michael Nedzelsky
57205f5721 drop BASE_WITH_NULLABLE_UPPER_BOUND 2015-10-14 20:51:01 +03:00
Alexander Udalov
ced1edcf98 Prohibit callable references to object members
To be able to make them more useful in the future, i.e. bound to the object
instance
2015-10-14 20:45:56 +03:00
Alexander Udalov
63dfe13c43 Add some tests on KProperty usage from delegate methods 2015-10-14 20:45:55 +03:00
Alexander Udalov
6a965c9a06 Update IDE tests to use KProperty instead of PropertyMetadata 2015-10-14 20:45:55 +03:00
Alexander Udalov
51bf68ce27 Update compiler tests to use KProperty instead of PropertyMetadata 2015-10-14 20:45:54 +03:00
Alexander Udalov
a6846b3967 Insert KProperty<*> when creating property delegate methods in IDE 2015-10-14 20:45:26 +03:00
Alexander Udalov
ec1b4776fe Deprecate PropertyMetadata, use KProperty<*> for delegated properties instead 2015-10-14 20:45:25 +03:00
Alexander Udalov
3c74f48f91 Pass KProperty instances to property delegates
Inherit KProperty from PropertyMetadata, cache corresponding KProperty objects
instead of PropertyMetadataImpl objects, add support for properties with 2
receivers
2015-10-14 20:45:24 +03:00
Mikhail Glukhikh
4614e74e3f isFromJavaOrBuiltins() is now public (compilation fix) 2015-10-14 20:40:34 +03:00
Mikhail Glukhikh
8b482a59d9 No inline for MutableMap extensions with JvmName (to prevent stub comparison breaking) 2015-10-14 20:40:31 +03:00
Mikhail Glukhikh
3461837c28 Temporary move std-lib deprecated back to MutableCollections (due to backward compatibility stuff) 2015-10-14 20:40:29 +03:00
Mikhail Glukhikh
4987e095e5 Move some methods to deprecated built-ins 2015-10-14 20:40:26 +03:00
Mikhail Glukhikh
37ecf5def5 Fix: bridges are now generated for non-final functions of Kotlin built-in classes 2015-10-14 20:40:23 +03:00
Mikhail Glukhikh
d4a1a469b7 Number rename: xxxValue() --> toXxx(), test 2015-10-14 20:40:21 +03:00
Mikhail Glukhikh
c6a1bd7df3 different enum property rename: name --> ... 2015-10-14 20:40:18 +03:00
Mikhail Glukhikh
7ee1e555bc DataFlowValue enum property rename: name --> str 2015-10-14 20:40:15 +03:00
Mikhail Glukhikh
f8a356747e Stdlib rename: 'name' and 'ordinal' are now properties in Enum, same name functions are deprecated 2015-10-14 20:40:13 +03:00
Mikhail Glukhikh
78cfeb0d7d Stdlib rename: List.indexOf(T), List.lastIndexOf(T), MutableCollection.removeAll(Collection<T>), MutableCollection.retainAll(Collection<T>) 2015-10-14 20:40:09 +03:00
Denis Zharkov
ed5ba01e85 Temporary revert moving CharSequence.charAt because of markdown parser 2015-10-14 20:40:07 +03:00
Denis Zharkov
9e052372e6 Make SmartSet smarter 2015-10-14 20:40:04 +03:00
Denis Zharkov
6322198a11 Revert 'isEmpty' transformation 2015-10-14 20:40:01 +03:00
Denis Zharkov
17c906658d Transform Throwable members to properties 2015-10-14 20:39:59 +03:00
Denis Zharkov
9088bf67c7 Extract and clean deprecated builtin extensions 2015-10-14 20:39:56 +03:00
Denis Zharkov
0b9c9a6047 Support builtin properties in ConstantExpressionEvaluator 2015-10-14 20:39:53 +03:00
Denis Zharkov
e062e32f95 Do not load special builtin overrides from Java as synthesized
It has been done just to avoid clashes with real declarations that look
like our builtins: e.g. 'String removeAt(int index) {}' and 'String remove(int index) {}'in Java.

But synthesized members are even weaker than extensions.

Solution is just to ignore the latter declaration and treat first as effective override
of out builltin.
2015-10-14 20:39:51 +03:00
Denis Zharkov
cd589b7e6a Add workaround for KT-9571 2015-10-14 20:39:48 +03:00
Denis Zharkov
5c2fd75389 Minor. Clarified comments in test 2015-10-14 20:39:46 +03:00
Denis Zharkov
a6dfa53d77 Adjust JS stdlib maps to changes in builtins 2015-10-14 20:39:43 +03:00
Denis Zharkov
d71b0144d5 Adjust testData to *Map transformation 2015-10-14 20:39:40 +03:00
Denis Zharkov
6fa8083a70 Transform builtin Map declaration and adjust stdlib 2015-10-14 20:39:38 +03:00
Denis Zharkov
f0e3fd617d Adjust testData to CharSequence.length transformation 2015-10-14 20:39:35 +03:00
Denis Zharkov
cb562e7ea5 Adjust JS backend to CharSequence.length transformation 2015-10-14 20:39:32 +03:00
Denis Zharkov
1305d9755a Transform CharSequence.length to property 2015-10-14 20:39:29 +03:00
Denis Zharkov
6c0d55e4ed Minor. Rename kotlin file and package part: builtinsPropertiesUtil -> specialBuiltinMembers 2015-10-14 20:39:27 +03:00
Denis Zharkov
0a6bf31a2c Refactor util methods
Group semantically similar parts by objects
2015-10-14 20:39:24 +03:00
Alexey Tsvetkov
eae644c365 Remove isArrayOf reference from common JVM/JS test 2015-10-14 20:06:52 +03:00
Yan Zhulanow
528482f625 Deprecated conventions (get -> getValue, plus -> unaryPlus) quickfix 2015-10-14 19:10:36 +03:00
Yan Zhulanow
f9e89596fd Add 'operator' modifier to stdlib property Delegate functions 2015-10-14 19:10:36 +03:00
Mikhail Glukhikh
d2358c7fb4 Accidentally added code was rolled back 2015-10-14 18:55:26 +03:00
Alexey Tsvetkov
5449cea6b7 Make Array type parameter T non-reified 2015-10-14 18:36:53 +03:00
Alexey Tsvetkov
62c25c0370 Replace is Array<T> with .isArrayOf<T>() 2015-10-14 18:36:53 +03:00
Michael Nedzelsky
01cd277d63 fix maven build 2015-10-14 18:34:10 +03:00
Ilya Gorbunov
cac7bfc80b Clarify some type in tests. 2015-10-14 18:26:46 +03:00
Ilya Gorbunov
93c73500d7 Do not allow to delegate readonly property to a map with incompatible value type.
Infer type of delegated readonly property from the map value type.
2015-10-14 18:22:30 +03:00
Ilya Gorbunov
96b33a8bfd Minor reindent optimizations 2015-10-14 18:19:57 +03:00
Ilya Gorbunov
af0a59dd02 Deprecate StringBuilder { } function, and introduce buildString { } instead.
#KT-7295 Fixed
2015-10-14 18:19:57 +03:00
Ilya Gorbunov
6d7cc0671e Allow equals with ignoreCase parameter to take nullable Strings both as a receiver and a parameter.
#KT-9188
2015-10-14 18:19:56 +03:00
Mikhail Glukhikh
c0faf82f77 Initializer is now required for mutable properties with backing fields and open or custom setter #KT-9449 Fixed
Setters without body are not taken into account accordingly to KT-9449.
Old INITIALIZATION_USING_BACKING_FIELD_SETTER are both dropped.
2015-10-14 18:00:13 +03:00
Mikhail Glukhikh
9c9ab671b3 Effective visibility: local is now considered private, TYPE_DEPENDS_ON_LOCAL_CLASS diagnostics removed as repeated #KT-9542 Fixed #KT-9526 Fixed 2015-10-14 18:00:10 +03:00
Mikhail Glukhikh
3a902d6002 Effective visibility: fix for internal & protected vs protected comparison #KT-9582 Fixed 2015-10-14 18:00:07 +03:00
Mikhail Glukhikh
d1c7749103 Effective visibility: messages fix 2015-10-14 18:00:05 +03:00
Mikhail Glukhikh
c210ca5b4d Additional correctness check for noinline & crossinline #KT-9567 Fixed 2015-10-14 18:00:02 +03:00
Mikhail Glukhikh
96b567254d Deprecation fixes 2015-10-14 17:59:59 +03:00
Michael Nedzelsky
27b13dda65 improve diagnostic for KT-9484 Don't allow named arguments for inherited functions with parameter name conflicts
#KT-9484 Fixed
2015-10-14 16:58:19 +03:00
Michael Nedzelsky
d05a7224c7 add check for escaped identifiers 2015-10-14 16:57:06 +03:00
Michael Nedzelsky
1818e9f1bd fix parse `` 2015-10-14 16:57:03 +03:00
Michael Nedzelsky
7f0fbb4577 fix tests for quoted names 2015-10-14 16:57:00 +03:00
Michael Nedzelsky
2a97c28491 remove validation from FqName and FqNameUnsafe constructors 2015-10-14 16:56:58 +03:00
Michael Nedzelsky
cc2dfc4937 remove validation from Name.identifier 2015-10-14 16:56:55 +03:00
Mikhail Glukhikh
001b1269b9 IO deprecations: String.separatorsToSystem() --> File.separatorsToSystem() KT-9534, FileTreeWalk.filter --> FileTreeWalk.treeFilter KT-8517 2015-10-14 16:10:11 +03:00
Michael Bogdanov
d78b59eb73 Package private visibility for private top-level members 2015-10-14 16:03:54 +03:00
Pavel V. Talanov
d603142cc6 Provide inspection and quickfixes for usages of static fields which will be no longer accessible in future versions
For this inspection three kinds of fixes are potentially available:
- Add 'const' modifier to kotlin property
- Add '@JvmField' annotation to kotlin property
- Change field reference to getter invocation

In case user chooses to 'cleanup code', these fixes are prioritized in this order
2015-10-14 14:42:26 +03:00
Pavel V. Talanov
47cca7db1f Test data: adjust test data after prohibiting properties with typeparameters not used in receiver 2015-10-14 13:42:13 +03:00
Pavel V. Talanov
3468e83671 Drop ID property which would be unsupported 2015-10-14 13:42:11 +03:00
Pavel V. Talanov
2e75f7f103 Js stdlib: noImpl property has 'Nothing' type 2015-10-14 13:41:56 +03:00
Pavel V. Talanov
be15399313 Report errors for type parameters of properties that are not used in receiver types 2015-10-14 13:40:10 +03:00
Ilya Chernikov
b5537e7d42 Merge pull request #766 from JetBrains/rr/daemon-fixes
daemon fixes
2015-10-14 12:21:51 +02:00
Ilya Chernikov
3f83a2895f Code cleanup 2015-10-14 12:20:01 +02:00
Ilya Chernikov
029e823b06 Placing temp files to appropriate location in DaemonExecutionViaIntermediateProcess test 2015-10-14 12:20:01 +02:00
Ilya Chernikov
d9b0e4db48 Simplifying java binary selection: java.awt.headless property seems work on all platforms 2015-10-14 12:20:00 +02:00
Ilya Chernikov
21558fe1c6 Deriving callback server classes from UnicastRemoteObject instead of manual registration, magically solves the problems with parallel builds; modifying and refactoring usage places accordingly 2015-10-14 12:20:00 +02:00
Ilya Chernikov
5b5ec2cb04 Make getDaemonConnection synchronized to avoid racing conditions on connection 2015-10-14 12:19:59 +02:00
Michael Bogdanov
0209cd080e Deprecated flag for static non-JvmField and non-const properties 2015-10-14 13:13:49 +03:00
Yan Zhulanow
275f3f8954 'operator' checks 2015-10-14 01:29:10 +03:00
Yan Zhulanow
dc8e796e49 getValue()/setValue() should be marked with 'operator' 2015-10-14 01:29:09 +03:00
Yan Zhulanow
bc3d1ddda0 Remove old 'get' delegate convention in interfaces 2015-10-14 01:29:09 +03:00
Ilya Gorbunov
6d2f9cc669 Remove obsolete iterator tests 2015-10-13 22:31:15 +03:00
Ilya Gorbunov
c58d21a1e7 Remove obsolete test for KT-1131 2015-10-13 22:31:14 +03:00
Ilya Gorbunov
2cdd413590 StdLib generators: Add some infix extensions for DSL, remove unneeded import, simplify declarations. 2015-10-13 22:23:13 +03:00
Svetlana Isakova
075a8eaf39 Moved 'Exact' and 'NoInfer' annotations to stdlib 2015-10-13 21:42:54 +03:00
Alexey Sedunov
30d697109c Code Insight: "Generate secondary constructor" action
#KT-6970 Fixed
2015-10-13 20:56:52 +03:00
Alexander Udalov
78829b9e8f Minor, drop some obsolete usages of TRAIT in compiler 2015-10-13 20:29:39 +03:00
Alexander Udalov
baaa3ef50a Remove KotlinSignature annotations from project code 2015-10-13 20:29:16 +03:00
Alexander Udalov
b378969a0a Deprecate KotlinSignature, to be removed later 2015-10-13 20:29:15 +03:00
Alexander Udalov
f16f4e5541 Disable loading parameter names from KotlinSignature, update test data 2015-10-13 20:29:15 +03:00
Alexey Tsvetkov
c21534fea1 Fix annotation on parameter in function type test data 2015-10-13 20:11:34 +03:00
Valentin Kipyatkov
d728417f7f Fixed KT-9496 FQ-class name inserted in type argument on copy/paste
#KT-9496 Fixed
2015-10-13 19:13:22 +03:00
Mikhail Glukhikh
f4e1f53549 Error message fixed 2015-10-13 17:13:17 +03:00
Mikhail Glukhikh
5a16e43579 Synchronized is no more allowed on abstract functions 2015-10-13 16:37:34 +03:00
Mikhail Glukhikh
ccf0c363fa Volatile is no more allowed on values #KT-7670 Fixed 2015-10-13 16:37:24 +03:00
Mikhail Glukhikh
8473be357f Effective visibility: separate InternalProtected and InternalProtectedBound, messages, test change 2015-10-13 16:31:28 +03:00
Mikhail Glukhikh
4dbd7e7f69 Effective visibility: lower bounds introduced for all protected and for protected and internal #KT-9540 Fixed 2015-10-13 16:26:05 +03:00
Michael Bogdanov
bee0fb6283 Fix test data 2015-10-13 16:17:05 +03:00
Alexey Tsvetkov
a564724fa8 Fix issues with incremental cache version change
#KT-9360 fixed
2015-10-13 16:12:15 +03:00
Alexey Tsvetkov
af3f7dfafc Make test generated 2015-10-13 16:12:15 +03:00
Alexey Tsvetkov
0e606a3210 Prohibit named parameters in function types in supertype position 2015-10-13 16:07:55 +03:00
Alexey Tsvetkov
90849a67ae Prohibit annotations, modifiers and default values for parameters in function type
#KT-7619 fixed
2015-10-13 16:07:55 +03:00
Michael Bogdanov
27a1a17c09 Deprecate non-const properties copies in interface 2015-10-13 14:15:47 +03:00
Andrey Breslav
dbc0197a36 @HiddenDeclaration deprecated 2015-10-13 13:50:16 +03:00
Andrey Breslav
8e7f6f3c8c Migrated from @HiddenDeclaration to @Deprecated(..., level = DeprecationLevel.HIDDEN) 2015-10-13 13:50:16 +03:00
Dmitry Jemerov
7663afb7e0 send OS version to plugin update checker 2015-10-13 11:27:20 +02:00
Alexander Udalov
046722100c Minor, drop unused method 2015-10-13 11:59:46 +03:00
Alexander Udalov
571e5aea83 Minor, fix space in diagnostic message 2015-10-13 11:59:18 +03:00
Alexander Udalov
5f18cb8703 Rename files in reflection.jvm
Move KDeclarationContainer.functions to KClasses and make it accept only
KClass, since KPackage is deprecated anyway
2015-10-13 11:58:45 +03:00
Michael Bogdanov
a09c8105c4 Support reflection on top level properties 2015-10-13 11:14:33 +03:00
Michael Bogdanov
e8f9a9f3b8 Support reflection on @JvmField properties inside class companion 2015-10-13 11:14:32 +03:00
Michael Bogdanov
f4b7913dd3 sanitizeAsJavaIdentifier function moved to JvmAbi 2015-10-13 11:14:32 +03:00
Pavel V. Talanov
d8be99a378 Prohibit @JvmField for private properties 2015-10-13 11:14:31 +03:00
Michael Bogdanov
f7164c5bfd Don't rename class property with JvmField annotation, report clashing 2015-10-13 11:14:31 +03:00
Michael Bogdanov
b713328540 Fix reflection for internal properties without getter/setter 2015-10-13 10:50:10 +03:00
Michael Bogdanov
81f478c6fd JvmField retention changed to BINARY 2015-10-13 10:50:09 +03:00
Michael Bogdanov
22142ee44d Initial support of JvmField annotation 2015-10-13 10:50:09 +03:00
Pavel V. Talanov
6cf9bfdb70 publicField -> JvmField
Effectively drop publicField and introduce JvmField (which has the same effect for now)
Implement frontend checks for @JvmField
Replace publicField -> JvmField in test data
2015-10-13 10:50:08 +03:00
Pavel V. Talanov
bfaf806f47 Refactor: move various checkers from JvmPlatformConfigurator.kt 2015-10-13 10:50:07 +03:00
Michael Bogdanov
7ce770d97d Test data fix 2015-10-13 10:50:07 +03:00
Michael Bogdanov
ee6dbac381 Remove synthetic flag from internal members 2015-10-13 10:48:37 +03:00
Andrey Breslav
4f63d47f82 Intention action for hiddnen declarations fixed 2015-10-13 01:45:02 +03:00
Andrey Breslav
1c00b933a5 @Deprecated(..., level = HIDDEN) supported
isAnnotatedAsHidden() moved to front-end
2015-10-13 01:44:46 +03:00
Andrey Breslav
95240fc29f DEPRECATED_ERROR supported 2015-10-13 01:44:46 +03:00
Alexander Udalov
34267e436e Merge two deprecation diagnostics into one DEPRECATION
This also fixes weird suppressions in user code: instead of
«@Suppress("DEPRECATED_SYMBOL_WITH_MESSAGE")» you should now use
«@Suppress("DEPRECATION")»
2015-10-13 01:44:45 +03:00
Denis Zharkov
c817949221 Add services from descriptor.loader.java to resulting jars
#KT-9558 Fixed
2015-10-12 18:51:36 +03:00
Mikhail Glukhikh
92f031cc46 Warning "value of type parameter is predetermined" is no more generated for sealed bound #KT-9244 Fixed 2015-10-12 18:28:47 +03:00
Dmitry Petrov
b24623810e Java 8 and Any-related restrictions: fix commits clash in testData 2015-10-12 18:17:51 +03:00
Mikhail Glukhikh
e121ba549e Accessor visibilities are now forbidden for abstract properties 2015-10-12 18:12:39 +03:00
Svetlana Isakova
b709b431ea Parse annotations on nullable types 2015-10-12 16:28:48 +03:00
Svetlana Isakova
b49a3f8e00 Added test for annotations on nullable types 2015-10-12 16:28:48 +03:00
Svetlana Isakova
c531c5a0af KDoc. Don't ignore links in @see
Such link was totally ignored:
/**
 * @see <a href="http://kotl.in">http://kotl.in</a>
 */
2015-10-12 16:28:48 +03:00
Dmitry Petrov
818931ec06 Check for exposed local classes (or objects) in type signatures: fix IDE test 2015-10-12 15:35:39 +03:00
Dmitry Petrov
7e51fb8521 Check for exposed local classes (or objects) in type signatures 2015-10-12 15:24:54 +03:00
Valentin Kipyatkov
cbf4e4a973 Corrected order of modifier insertion 2015-10-12 15:10:39 +03:00
Valentin Kipyatkov
55cbe185f8 Do not offer to convert to infix call when calling non-infix function 2015-10-12 15:10:39 +03:00
Valentin Kipyatkov
ee7425c1de Checking "infix" modifier in completion and import popup 2015-10-12 15:10:39 +03:00
Valentin Kipyatkov
a7577ac722 Don't use JetSimpleNameExpression too much 2015-10-12 15:09:53 +03:00
Dmitry Jemerov
23e13d4043 fix type parameter migration for extension functions 2015-10-12 13:45:44 +02:00
Andrey Breslav
045df48588 Minor. TRAIT -> INTERFACE 2015-10-12 14:40:48 +03:00
Andrey Breslav
a2e5e60c68 TRAIT -> INTERFACE in diagnostics 2015-10-12 14:36:38 +03:00
Dmitry Petrov
ff1bf673ba Java 8 override restrictions: interface can't implement a method of 'Any'
- update Range and related classes
2015-10-12 14:12:31 +03:00
Dmitry Petrov
7e9e427d4c Java 8 rules for method overrides:
- report errors on implementing methods of Any in interfaces
- update testData

~~~

Java 8 override restrictions: interface can't implement a method of 'Any'
- update compiler sources
2015-10-12 14:12:31 +03:00
Dmitry Petrov
5d9ee7efee Java 8 rules for method overrides:
- base class method wins against a (default) interface method,
so an abstract base class method should always be implemented
in a derived class;

- interface methods clash regardless of abstract/default
with possibly undefined behavior at run-time,
so a class or interface should always define its own method
for methods inherited from multiple interfaces and not from base class;

- meaningful diagnostics for class inheriting conflicting JVM signatures.
Since no override will happen under Java 8 rules,
ACCIDENTAL_OVERRIDE is misleading for this case;

- update testData.
2015-10-12 14:12:31 +03:00
Mikhail Glukhikh
82c0265cb3 Quick fix for implicit nothing with a test 2015-10-12 13:30:22 +03:00
Mikhail Glukhikh
64543e3f52 Implicit Nothing return type is now deprecated 2015-10-12 13:30:16 +03:00
Mikhail Glukhikh
65f0f312ff Private setter is now forbidden for non-private late init variables 2015-10-12 13:30:13 +03:00
Dmitry Jemerov
2cab34bb3f drop hexadecimal double literals 2015-10-12 11:32:34 +02:00
Dmitry Jemerov
ead19076d7 stop calling propertyDelegated() method 2015-10-12 11:16:12 +02:00
Dmitry Jemerov
457e40a0b8 fix a few more tests 2015-10-12 11:11:31 +02:00
Dmitry Jemerov
02a242f15a parser tweaks to compensate for removal of static type assertions 2015-10-12 11:11:30 +02:00
Dmitry Jemerov
a63d3f5a0f fix more compilation errors and some tests 2015-10-12 11:11:29 +02:00
Dmitry Jemerov
f5aaf65ca9 remove usages of static type assertions from the compiler 2015-10-12 11:11:28 +02:00
Dmitry Jemerov
1523d5bcbf removing static type assertions work in progress 2015-10-12 11:11:23 +02:00
Nikolay Krasko
8f87efc0a2 Update to IDEA 143.116.4 2015-10-12 11:49:47 +03:00
Ilya Gorbunov
7ff0e140f0 Update MockJDK to include Pattern.class required in tests for #KT-7732 2015-10-12 00:13:37 +03:00
Ilya Gorbunov
4ae2491ab6 J2K: Special conversion for java.lang.String methods: String.join (cannot be tested with MockJDK)
#KT-7732
2015-10-12 00:13:23 +03:00
Ilya Gorbunov
5914625b53 J2K: Special conversion for java.lang.String methods: more accurate parameter count matching for String.format
#KT-7732
2015-10-12 00:13:09 +03:00
Ilya Gorbunov
77a46cab92 J2K: Special conversion for java.lang.String methods: tests for lastIndexOf
#KT-7732
2015-10-12 00:12:55 +03:00
Ilya Gorbunov
7a0a23366c Use PsiExpressionEvaluator to evaluate constant limit value. 2015-10-12 00:12:41 +03:00
Denis Zharkov
3bb8cf1bff Temporary restore CharSequence.get extension 2015-10-11 19:59:31 +03:00
Denis Zharkov
a76a8fcc3f Adjust various testData to remove/charAt transformation 2015-10-11 19:59:31 +03:00
Denis Zharkov
6d864e0854 Adjust collection stubs generating to 'remove' transformation
See substitutedList* tests in Backend
2015-10-11 19:59:30 +03:00
Denis Zharkov
1c7fa42b86 Adjust js codegen and lib to 'charAt' -> 'get' transformation 2015-10-11 19:59:30 +03:00
Denis Zharkov
6f4579213c Adjust rendered descriptors after remove/charAt transformations 2015-10-11 19:59:30 +03:00
Denis Zharkov
3733d0e84f Adjust stdlib to remove/charAt transformation 2015-10-11 19:59:25 +03:00
Denis Zharkov
89ded4ab1d Implement hack to support both remove() and removeAt() in MutableList<Int>
Also add couple of tests about CharSequence.get
2015-10-11 19:57:22 +03:00
Denis Zharkov
742a538aed Support loading builtin methods from Java with different names 2015-10-11 19:57:22 +03:00
Denis Zharkov
3f5498e9f5 Transform some builtin methods
1. CharSequence.charAt -> get
2. ML.remove(Int) -> removeAt,
3. MC.remove(Any?) -> MC.remove(E)
2015-10-11 19:57:21 +03:00
Denis Zharkov
a98d1e1e55 Minor. Convert some properties to functions 2015-10-11 19:57:08 +03:00
Alexander Udalov
c78410855d Refactor CallableClsStubBuilder, separate functions and properties 2015-10-11 17:10:41 +03:00
Alexander Udalov
9d626ef1d9 Rename KotlinCallable annotation to KotlinFunction 2015-10-11 17:10:40 +03:00
Alexander Udalov
55dd51814f Don't serialize built-in enum entries
These files are never read anyway
2015-10-11 17:10:39 +03:00
Alexander Udalov
15b0d3c7c7 Minor, safer way to avoid storing defaults in proto 2015-10-11 17:10:39 +03:00
Alexander Udalov
d4320b43fa Delete useless class, simplify reading class visitor 2015-10-11 17:10:38 +03:00
Alexander Udalov
9e4823ef82 Write module name to metadata, fix reflection for file facades
Module name will be used for proper introspection of internal members
2015-10-11 17:10:37 +03:00
Alexander Udalov
0218e0351b Deprecate KPackage, to be removed later 2015-10-11 17:10:37 +03:00
Alexander Udalov
790c59d9e5 Increase ABI & stub version
See previous commits for motivation
2015-10-11 17:10:36 +03:00
Alexander Udalov
37c36f806a Rename foreignKotlinClass -> getOrCreateKotlinClass
Previously this cache contained only Java (hence 'foreign') classes, that is
not the case anymore
2015-10-11 17:10:35 +03:00
Alexander Udalov
a4732b442d Don't create KClass and KPackage instances in <clinit>
This proved to be a fragile technique, which probably doesn't even improve
performance in most cases but has lots of unexpected problems: unconditional
initialization of reflection classes, increasing the size of the bytecode, bugs
with <clinit> in annotations on JVM 6, inability to support conversion of a
class from Kotlin to Java without recompiling clients which use it
reflectively, etc.
2015-10-11 17:10:35 +03:00
Alexander Udalov
fe737886cd Drop deprecated K*Function interfaces 2015-10-11 17:10:34 +03:00
Alexander Udalov
8c4d7fdf24 Drop deprecated nested classes from Kotlin metadata annotations 2015-10-11 17:10:33 +03:00
Alexander Udalov
1497648093 Add KOTLIN_MULTIFILE_CLASS annotation to KotlinAbiVersionIndex
It was forgotten during the package reform
2015-10-11 17:10:33 +03:00
Alexander Udalov
1c229d173e Forget old classes from jet.runtime.typeinfo.*, drop JetValueParameter 2015-10-11 17:10:32 +03:00
Alexander Udalov
e3a5590eb7 Simplify FQ name check in ReflectionTypes
Fix EA-73058
2015-10-11 17:10:32 +03:00
Alexander Udalov
cf54a76e3b Optimize JvmStringTable, don't store operation = NONE which is default 2015-10-11 17:10:31 +03:00
Alexander Udalov
934ffed944 Don't write field signatures when not necessary 2015-10-11 17:10:30 +03:00
Alexander Udalov
864926ee2e Don't always write JVM method signatures to metadata
When the trivial type mapping (implemented in JvmProtoBufUtil) from
ProtoBuf.Type instances works fine, don't write the signature since it can be
loaded by exactly the same trivial type mapping
2015-10-11 17:10:30 +03:00
Alexander Udalov
168f1000e4 Remove confusing outdated code about copying JVM signatures
This was necessary with old package facades, but not anymore because metadata
is written separately to file classes and codegen now never tries to serialize
deserialized descriptors
2015-10-11 17:10:29 +03:00
Alexander Udalov
3506a9615e Don't write default values of flags, provide sensible defaults 2015-10-11 17:10:28 +03:00
Alexander Udalov
e58677b8fe Do not fail on unknown visibilities, modalities, etc in deserialization
Provide some sensible defaults like "private", "final", "class" instead, which
will give us a small possibility to not break the format if a new
modality/visibility/... is introduced in the case when the old compiler may
safely consider it as the default one
2015-10-11 17:10:28 +03:00
Alexander Udalov
2e10d21e3f Minor, rename LATE_INIT -> IS_LATEINIT, INNER -> IS_INNER 2015-10-11 17:10:27 +03:00
Alexander Udalov
aa95375029 Fix incorrect copy-paste during proto messages refactoring
Annotations on properties should be loaded not when the message is Property
(this happens for getters/setters as well), but when the kind is explicitly set
to PROPERTY. Also restore construction of JVM signatures for constructors
2015-10-11 17:10:26 +03:00
Alexander Udalov
e4efa27b76 Drop Callable and primary/secondary constructor proto messages 2015-10-11 17:10:26 +03:00
Alexander Udalov
e02854db6d Support new protobuf messages in cls stub builder 2015-10-11 17:10:25 +03:00
Alexander Udalov
a44f74ea20 Load new proto messages for constructors 2015-10-11 17:10:24 +03:00
Alexander Udalov
9bf0502a31 Load new proto messages for functions and properties 2015-10-11 17:10:24 +03:00
Ilya Gorbunov
a58a7727d1 Preprocessor: cleanup unused code. 2015-10-11 16:14:38 +03:00
Ilya Gorbunov
423a146bce Preprocessor: do not use legacy package facade name in build.xml. 2015-10-11 16:14:24 +03:00
Alexey Sedunov
ae9bd371e6 Unit Test Tooling: Test navigation
#KT-6472 In Progress
2015-10-11 01:13:48 +03:00
Alexey Sedunov
ad929a6577 Unit Test Tooling: Implement "Create Test" action
#KT-6472 In Progress
2015-10-11 01:13:41 +03:00
Alexey Sedunov
c697eef803 Minor: Undeprecate JetClassOrObject.isAnnotation() function 2015-10-11 01:08:11 +03:00
Denis Zharkov
f9c7e7add4 Adjust project code to changes in properties loading 2015-10-10 12:29:15 +03:00
Denis Zharkov
97ed8c83a0 Adjust testData to isEmpty/key/value transformations 2015-10-10 12:29:15 +03:00
Denis Zharkov
83b680935b Adjust js stdlib to isEmpty transformation 2015-10-10 12:29:14 +03:00
Denis Zharkov
61459961fc Adjust stdlib to isEmpty transformation 2015-10-10 12:29:14 +03:00
Denis Zharkov
cfc9d19825 Transform Collection.isEmpty and Map.Entry.key/value to properties 2015-10-10 12:29:14 +03:00
Denis Zharkov
ad68378836 Support loading methods from Java as common properties overrides 2015-10-10 12:29:14 +03:00
Michael Nedzelsky
396f38e9b3 fix check for ambiguous parameter names for overriding methods 2015-10-10 02:55:31 +03:00
Ilya Chernikov
c3d3160345 Cleaning jar cache after build in gradle plugin, fixes KT-9440. Some refactorings on the way to fix. 2015-10-09 22:38:15 +02:00
Yan Zhulanow
ed5c059cea Rename unary plus() and minus() to unaryPlus() and unaryMinus() 2015-10-09 22:49:17 +03:00
Yan Zhulanow
1f2b4e20fe Replace get() and set() to getValue() and setValue() (property delegates) 2015-10-09 22:49:16 +03:00
Mikhail Glukhikh
2fee9d362c Local interfaces are forbidden now 2015-10-09 21:06:33 +03:00
Mikhail Glukhikh
d1ab5168ec Error messages about "var with open / custom setter initialization" changed accordingly with the new backing field syntax 2015-10-09 21:06:29 +03:00
Mikhail Glukhikh
6914d09297 Old backing field with dollar is now forbidden 2015-10-09 21:06:26 +03:00
Mikhail Glukhikh
5117f744f7 Change to backing field fix is dropped because of deprecated syntax 2015-10-09 21:06:01 +03:00
Mikhail Glukhikh
cf7146aaf7 Target is given for Throws annotation 2015-10-09 20:04:26 +03:00
Ilya Chernikov
1cb48d5ad9 Enabling daemon by default, removing word "experimental" from settings field name. 2015-10-09 17:47:50 +02:00
Dmitry Jemerov
07d3ab792a enable infix quickfix in cleanup 2015-10-09 17:43:27 +02:00
Dmitry Jemerov
6ca3a9fe9f quickfix to add 'infix' modifier 2015-10-09 17:43:26 +02:00
Dmitry Jemerov
dcab3e406e update checker: fix EDT assertion, don't retry update if plugin repo has no compatible version 2015-10-09 17:39:50 +02:00
Natalia Ukhorskaya
6bc1f15f46 Debugger: fix tests on stepping 2015-10-09 17:33:19 +03:00
Natalia Ukhorskaya
d441f2cf8a Debugger: do not compute location during creation of step command 2015-10-09 17:33:18 +03:00
Natalia Ukhorskaya
bf4a71ee02 Minor: fix number of steps in some tests 2015-10-09 17:33:17 +03:00
Natalia Ukhorskaya
a303c8a2f6 Debugger, stepping: first check that source position is in kotlin file 2015-10-09 17:33:17 +03:00
Valentin Kipyatkov
6fb329c1cd Minor 2015-10-09 16:42:07 +03:00
Valentin Kipyatkov
21b2631558 KT-9500 Prohibit java.lang.Deprecated in completion + no duplicates for built-ins in completion
#KT-9500 Fixed
2015-10-09 16:42:07 +03:00
Valentin Kipyatkov
7b2d63cfb9 Added infix modifier 2015-10-09 16:42:07 +03:00
Valentin Kipyatkov
91b2ba9ef3 Fixed warnings 2015-10-09 16:42:07 +03:00
Valentin Kipyatkov
b549bc913a Dropped ability to specify custom PrefixMatcher in LookupElementsCollector 2015-10-09 16:42:07 +03:00
Valentin Kipyatkov
aa0a68b4be More simple prefix matching in ParameterNameAndTypeCompletion 2015-10-09 16:42:06 +03:00
Valentin Kipyatkov
9b4070b881 Changed lookup strings and prefix matchers for parameter name&type completion to get more stable and correct ordering 2015-10-09 16:42:06 +03:00
Valentin Kipyatkov
7c39064f75 Removed unnecessary 'data' modifier 2015-10-09 16:42:06 +03:00
Valentin Kipyatkov
2c1defaf18 Smart completion for "ClassName::class" and "ClassName::class.java" when specific KClass or Class expected 2015-10-09 16:42:06 +03:00
Michael Nedzelsky
b92a06929e fix KT-9484 Don't allow named arguments for inherited functions with parameter name conflicts
#KT9484 Fixed
2015-10-09 16:35:44 +03:00
Michael Bogdanov
ae15443413 Generate linenumberts in objects clinit 2015-10-09 16:25:21 +03:00
Michael Bogdanov
afa281357a Changed visibility for trait static fields 2015-10-09 16:25:20 +03:00
Michael Bogdanov
8198ac77cb Generate private constructor for object
#KT-9510 Fixed
2015-10-09 16:25:20 +03:00
Michael Bogdanov
a3e0205aec JvmAbi increased 2015-10-09 16:25:19 +03:00
Pavel V. Talanov
f4ef9647b1 Idea: add quick fix for replacing usages of deprecated "INSTANCE$" field 2015-10-09 16:25:19 +03:00
Pavel V. Talanov
d630c25f7d Add test for light class generated from object 2015-10-09 16:25:18 +03:00
Michael Bogdanov
a4997e8b31 backend tests: INSTANCE$ -> INSTANCE 2015-10-09 16:25:18 +03:00
Pavel V. Talanov
679748e1ee j2k tests: INSTANCE$ -> INSTANCE 2015-10-09 16:25:17 +03:00
Pavel V. Talanov
c28107034a Idea tests: INSTANCE$ -> INSTANCE 2015-10-09 16:25:17 +03:00
Michael Bogdanov
7fe71d21f3 Initialize class companion object fields on accessing its java class 2015-10-09 16:25:16 +03:00
Michael Bogdanov
60d1736b97 Instance field generation in objects 2015-10-09 16:25:16 +03:00
Michael Bogdanov
53ced57c42 Annotations.EMPTY replaced with Annotations.Companion.getEMPTY() in java classes 2015-10-09 16:25:15 +03:00
Michael Bogdanov
12afbffb09 Copy to interface just companion object public const properties 2015-10-09 16:25:15 +03:00
Michael Bogdanov
a9aa2bc147 Interface companion object backing fields become static 2015-10-09 16:25:14 +03:00
Nikolay Krasko
8f20595e8c Disable plugin updater check in tests 2015-10-09 16:14:27 +03:00
Natalia Ukhorskaya
391af972d7 CodeFragments: do not add imports from context file 2015-10-09 15:10:03 +03:00
Zalim Bashorov
e9b138557b Report error when try to access to static field which come from many sources 2015-10-09 15:00:59 +03:00
Denis Zharkov
da00ddfc3e Filter out UnsafeVariance annotation when it sticks after substitution 2015-10-09 14:40:34 +03:00
Denis Zharkov
888f8cc548 Adjust stdlib to contains* transformation 2015-10-09 14:40:34 +03:00
Denis Zharkov
14f93a88c4 Adjust rendered collections desciptors to contains* transformation 2015-10-09 14:40:34 +03:00
Denis Zharkov
e9cd9db2a7 Adjust testData after contains transformation 2015-10-09 14:40:34 +03:00
Denis Zharkov
35783f129b Generate INSTANCEOF barrier in bridges for Collection.contains 2015-10-09 14:40:33 +03:00
Denis Zharkov
80da320c2c Customize JVM signature for Collection's members
- Do not write signature for `contains`
- Write signature for `containsAll` as it's declared like `containsAll(Collection<?>)`
2015-10-09 14:40:33 +03:00
Denis Zharkov
1f52dfccdb Setup specific loading contains/containsAll from java
If they override Kotlin collection members

contains(Object) -> contains(E)
containsAll(Collection<?>) -> containsAll(Collection<E>)
2015-10-09 14:40:33 +03:00
Denis Zharkov
d27d3950fb Refine signature for Collection.contains/containsAll 2015-10-09 14:40:33 +03:00
Denis Zharkov
521e958f6d Serialize type annotations in builtins 2015-10-09 14:40:33 +03:00
Denis Zharkov
e800be18c6 Introduce UnsafeVariance annotation 2015-10-09 14:40:33 +03:00
Nikolay Krasko
013b257347 Make it possible to get diagnostics factory was registered for 2015-10-09 14:15:09 +03:00
Nikolay Krasko
efaa1d9614 Minor: add factory info into toString() for diagnostics 2015-10-09 14:15:08 +03:00
Nikolay Krasko
a2ba1d762d Fix spelling in error message (KT-9475)
#KT-9475 Fixed
2015-10-09 14:15:07 +03:00
Dmitry Jemerov
07332106a5 Gradle plugin build fixed 2015-10-09 12:57:02 +02:00
Dmitry Jemerov
a54e49aedd Maven build fixed 2015-10-09 12:43:00 +02:00
Michael Bogdanov
7cdc3d8dd9 Fix test data 2015-10-09 13:03:01 +03:00
Natalia Ukhorskaya
ccbb015606 Completion for evaluate expression: add only imports from code fragment to scope when analyzing it 2015-10-09 12:58:39 +03:00
Dmitry Jemerov
7e2c2ef678 restore compilation after rebase of dropping external annotations; fix affected tests 2015-10-09 11:52:02 +02:00
Alexander Udalov
c41aefe2cb Drop JVMConfigurationKeys.ANNOTATIONS_PATH_KEY and external annotations in CLI
CoreExternalAnnotationsManager is moved to the only usage left, which is in the
test
2015-10-09 11:52:00 +02:00
Alexander Udalov
b0a4e812e5 Drop ConfigurationKind.JDK_AND_ANNOTATIONS, JetTestUtils.getJdkAnnotationsJar() 2015-10-09 11:51:59 +02:00
Alexander Udalov
448b3f6195 Rename testData/codegen/boxWithStdlib/{jdkAnnotations -> jdk} 2015-10-09 11:51:58 +02:00
Alexander Udalov
13c54a2678 Drop external annotations support in build tools
External annotations will only be considered in the IDE for additional
inspections based on more precise types in Java libraries
2015-10-09 11:51:58 +02:00
Svetlana Isakova
f2efd30a5d Added 'NoInfer' and 'Exact' annotations 2015-10-09 11:05:52 +03:00
Svetlana Isakova
9b1030de2e Annotations on type projection belong to type reference 2015-10-09 11:05:52 +03:00
Svetlana Isakova
63d9e287b7 Converted JetTypeReference to Kotlin 2015-10-09 11:05:52 +03:00
Svetlana Isakova
d8e7dccc90 Rename JetTypeReference .java -> .kt 2015-10-09 11:05:51 +03:00
Dmitry Jemerov
d6ea701901 use IDEA 15 UI for "Show expression type" 2015-10-08 19:59:25 +02:00
Dmitry Jemerov
d8122e835e dead code deleted 2015-10-08 19:58:00 +02:00
Dmitry Jemerov
3c93824e16 mark JS features as experimental in the UI 2015-10-08 19:57:59 +02:00
Valentin Kipyatkov
b29267ff93 "Single instance only" for IDEA run configurations 2015-10-08 20:36:18 +03:00
Zalim Bashorov
c8f54b3ccb Fix the accessing to static field from Parent through Child 2015-10-08 19:33:29 +03:00
Zalim Bashorov
ae2831338b Load Java static members from parents 2015-10-08 19:33:29 +03:00
Yan Zhulanow
d90585624f Add 'DeprecationLevel' parameter to 'Deprecated' 2015-10-08 18:31:08 +03:00
Yan Zhulanow
fd3c28c950 Forbid Foo<T>.Bar 2015-10-08 18:31:07 +03:00
Yan Zhulanow
937d1913b8 Automatically put 'operator' modifier on appropriate Java methods 2015-10-08 18:31:07 +03:00
Yan Zhulanow
2c848b8bb0 Add JvmSynthetic annotation 2015-10-08 18:31:06 +03:00
Yan Zhulanow
9eeb89a6aa Rename sparam to setparam 2015-10-08 18:31:06 +03:00
Yan Zhulanow
e85d76f9cc Parse ;; as a single token 2015-10-08 18:31:05 +03:00
Yan Zhulanow
8d5cbeeab0 Fix "not initialized" on lateinit property (KT-9369) 2015-10-08 18:31:05 +03:00
Yan Zhulanow
aa573c2e31 Report more specific error on primitive type property (KT-9358) 2015-10-08 18:31:04 +03:00
Yan Zhulanow
e6c0d4692a Fix operator warning on 'Constr()()' 2015-10-08 18:31:04 +03:00
Mikhail Glukhikh
7e4fbfaa6d Exposed visibility: warning messages changed 2015-10-08 18:25:37 +03:00
Mikhail Glukhikh
e99a070a2e Refactoring: decomposition of checkExposed... methods 2015-10-08 18:25:31 +03:00
Dmitry Jemerov
7abc29cff6 fix 'where' clause in IDEA plugin code 2015-10-08 17:09:58 +02:00
Dmitry Jemerov
45d1129dbb quickfix to move type constraint to 'where' clause 2015-10-08 17:09:58 +02:00
Dmitry Jemerov
4c4030dfc1 disallow putting type parameter constraints both in type parameter list and in 'where' clause 2015-10-08 17:09:57 +02:00
Dmitry Petrov
51225d3556 Test for KT-9430: proper visibility of protected members of base class
in child classes
2015-10-08 18:08:52 +03:00
Ilya Gorbunov
b6caedbc82 Add operator to Comparable.rangeTo 2015-10-08 17:48:49 +03:00
Ilya Gorbunov
e09c0ae2ff Rename toMap { selector } to toMapBy.
#KT-6657
2015-10-08 17:48:47 +03:00
Ilya Gorbunov
fd7b670414 Replace deprecated package facade ref. 2015-10-08 17:48:37 +03:00
Ilya Gorbunov
db93532e7c Deprecate merge and introduce instead zip with transform.
Add zip with transform for Strings.
2015-10-08 17:48:35 +03:00
Ilya Gorbunov
12d9beb3a4 Deprecate join (use joinToString instead)
#KT-6909
2015-10-08 17:48:33 +03:00
Sergey Mashkov
f37e022b8e IDL2K: review changes 2015-10-08 14:16:48 +03:00
Sergey Mashkov
2a0c1a997e IDL2K: support for operator modifier 2015-10-08 14:16:48 +03:00
Sergey Mashkov
4d8bd683eb IDL2K code cleanup, add to build 2015-10-08 14:16:48 +03:00
Alexey Sedunov
e8e0f2d7e1 Unused Symbol: Check descriptor before creating light class to prevent InvalidMirrorException on red code 2015-10-08 13:15:20 +03:00
Alexey Sedunov
730cc7b551 Code insight: "Generate..." actions for test framework support methods
#KT-9355 Fixed
2015-10-08 13:15:18 +03:00
Alexey Sedunov
5a325aeec0 Line Marking: Implement run markers for test classes/functions 2015-10-08 13:15:16 +03:00
Alexey Sedunov
1a36c3e29a Quick Fixes: Implement quickfix for missing library 2015-10-08 13:15:15 +03:00
Alexey Sedunov
f59e56b7e9 Minor: Simplify generateMembers() function 2015-10-08 13:15:13 +03:00
Alexey Sedunov
3c14bedc04 Minor: Move around some functions 2015-10-08 13:15:07 +03:00
Valentin Kipyatkov
84008e9381 Comment 2015-10-07 23:09:57 +03:00
Valentin Kipyatkov
cb24d3df1a Fixed JetLanguage + used better api 2015-10-07 23:09:56 +03:00
Valentin Kipyatkov
9d51e8e0e6 Added test 2015-10-07 23:09:56 +03:00
Valentin Kipyatkov
016401a2b7 Fixed test data 2015-10-07 23:09:56 +03:00
Valentin Kipyatkov
af9e66da62 Checked that "KT-7441 Smart completion does not work for argument of "this(..)" or "super(..)" call in non-primary constructor declaration" has been fixed too
#KT-7441 Fixed
2015-10-07 23:09:56 +03:00
Valentin Kipyatkov
9b0292f4c0 Fixed incorrect filtering of super constructors by visibility in Parameter Info 2015-10-07 23:09:56 +03:00
Valentin Kipyatkov
6ed7ac5285 KT-7231 Support Parameter Info inside this or super constructor calls
#KT-7231 Fixed
2015-10-07 23:09:56 +03:00
Valentin Kipyatkov
4256fb9c6e Checked that KT-9006 has been fixed
#KT-9006 Obsolete
2015-10-07 23:09:55 +03:00
Valentin Kipyatkov
b5ee84075a Do not show synthesized parameter names in Parameter Info 2015-10-07 23:09:55 +03:00
Valentin Kipyatkov
6e8be8d5af Extracted common code for detecting candidates for a Call 2015-10-07 23:09:55 +03:00
Valentin Kipyatkov
b997b3b09e No named arguments completion in brackets 2015-10-07 23:09:55 +03:00
Valentin Kipyatkov
c876759ee0 Insert ']' instead of ')' 2015-10-07 23:09:55 +03:00
Valentin Kipyatkov
fa51ca5716 KT-4977 Smart completion should work for arguments in brackets
#KT-4977 Fixed
2015-10-07 23:09:54 +03:00
Valentin Kipyatkov
ab41641a19 KT-8794 Parameter Information should work in index expression
#KT-8794 Fixed
2015-10-07 23:09:54 +03:00
Valentin Kipyatkov
9bd5f8affc Also more correct 2015-10-07 23:09:54 +03:00
Valentin Kipyatkov
e2a0cfddcd More correct? 2015-10-07 23:09:54 +03:00
Valentin Kipyatkov
a923e9e9c8 Parameter info fetches default parameter values from library sources 2015-10-07 23:09:54 +03:00
Valentin Kipyatkov
778e2f6f0b More simple and correct overload to highlight detection 2015-10-07 23:09:54 +03:00
Valentin Kipyatkov
9ba2242ea9 More simple code 2015-10-07 23:09:53 +03:00
Valentin Kipyatkov
192ce59a63 Inlined function 2015-10-07 23:09:53 +03:00
Valentin Kipyatkov
064ff5d8cc Fixed bug with local function 2015-10-07 23:09:53 +03:00
Valentin Kipyatkov
9da7f39195 Added test for update on typing 2015-10-07 23:09:53 +03:00
Valentin Kipyatkov
4865139fb1 Parameter info: update substitution on typing 2015-10-07 23:09:53 +03:00
Valentin Kipyatkov
9c1084b204 Minor 2015-10-07 23:09:53 +03:00
Valentin Kipyatkov
06a0154b75 Fixed crash 2015-10-07 23:09:52 +03:00
Valentin Kipyatkov
97d566105a Parameter info whole signature is built by information from resolve (+ changed policy for currentParameterIndex == 0) 2015-10-07 23:09:52 +03:00
Valentin Kipyatkov
b33bff89a5 Highlighting current parameter also uses resolve 2015-10-07 23:09:52 +03:00
Valentin Kipyatkov
e69cfdaaa0 Parameter info: overload "grey" status is calculated via resolve 2015-10-07 23:09:52 +03:00
Valentin Kipyatkov
eb500e0fef Minor refactoring 2015-10-07 23:09:52 +03:00
Valentin Kipyatkov
d338731734 Minor 2015-10-07 23:09:52 +03:00
Valentin Kipyatkov
f27d24e640 Parameter info to use resolve candidates instead of ReferenceVariantsHelper
#KT-6164 Fixed
 #KT-8931 Fixed
2015-10-07 23:09:51 +03:00
Valentin Kipyatkov
80bb1e7430 Inlined method 2015-10-07 23:09:51 +03:00
Valentin Kipyatkov
6c1bfdb74f No need to put ResolutionFacade into parameter info items 2015-10-07 23:09:51 +03:00
Valentin Kipyatkov
488e6f7458 Refactoring code 2015-10-07 23:09:51 +03:00
Valentin Kipyatkov
058f41a28b Renamed class 2015-10-07 23:09:51 +03:00
Valentin Kipyatkov
0651ec5265 Converted JetFunctionParameterInfoHandler to Kotlin 2015-10-07 23:09:50 +03:00
Ilya Gorbunov
73b8ef7a1f Replace KotlinPackage legacy facade with corresponding package parts in DebuggerUtils.java 2015-10-07 22:36:54 +03:00
Ilya Gorbunov
a8830b5816 sortedByDescending { key } instead of sortedBy { -key } 2015-10-07 22:36:52 +03:00
Ilya Gorbunov
17fc1d9562 Do not sort twice 2015-10-07 22:36:50 +03:00
Ilya Gorbunov
352ac58ba5 Fix testData/js: replace deprecated usages: times, sortBy, reverse, splitBy. 2015-10-07 22:36:48 +03:00
Ilya Gorbunov
1c416ae5f3 Fix testData/intentions: replace deprecated reverse usages. 2015-10-07 22:36:47 +03:00
Ilya Gorbunov
782f41580e Fix testData/debugger stepping: replace deprecated withIndices and sortBy usages. 2015-10-07 22:36:45 +03:00
Ilya Gorbunov
43a74e575e Fix testData/codegen: replace deprecated sort usages. 2015-10-07 22:36:43 +03:00
Ilya Gorbunov
c54ffe39b1 Drop deprecated API: String operations. 2015-10-07 22:36:41 +03:00
Ilya Gorbunov
6565989a61 Drop deprecated API: Comparators 2015-10-07 22:36:40 +03:00
Ilya Gorbunov
0df3d37f88 Drop deprecated API. 2015-10-07 22:36:38 +03:00
Ilya Gorbunov
0b88801c66 Drop deprecated sorting and reversing methods. 2015-10-07 22:36:36 +03:00
Ilya Gorbunov
e54db8cd2a Drop deprecated sequence() and withIndices() 2015-10-07 22:36:34 +03:00
Ilya Gorbunov
1c79cf2b51 Replace KotlinPackage legacy facade with corresponding package parts. 2015-10-07 22:36:32 +03:00
Ilya Gorbunov
fa491c8f1f Replace IoPackage legacy facade with corresponding package parts. 2015-10-07 22:36:31 +03:00
Ilya Gorbunov
90e5ee8a7e Replace KotlinPackage legacy facade with corresponding package parts. 2015-10-07 22:36:29 +03:00
Ilya Gorbunov
80e4ba8712 Replace splitBy with split 2015-10-07 22:36:27 +03:00
Ilya Gorbunov
25df3aac11 Replace parent with parentFile, relativePath with relativeTo 2015-10-07 22:36:25 +03:00
Ilya Gorbunov
3106458cc4 Replace assert with lazy assert, times with repeat. 2015-10-07 22:36:23 +03:00
Ilya Gorbunov
c1ba30b4bc Replace fails with assertFails 2015-10-07 22:36:21 +03:00
Ilya Gorbunov
ec416c5210 Replace identityEqulas with === 2015-10-07 22:36:20 +03:00
Ilya Gorbunov
b50c106648 Replace reverse with reversed or asReversed. 2015-10-07 22:36:18 +03:00
Ilya Gorbunov
37a0347669 Replace sort with sorted. 2015-10-07 22:36:16 +03:00
Ilya Gorbunov
389ea1b230 Do not suppress kotlin warnings. 2015-10-07 22:36:14 +03:00
Ilya Gorbunov
73e41fb216 StdLib cleanup: remove unused imports 2015-10-07 22:36:13 +03:00
Ilya Gorbunov
c6caa67cfb StdLib cleanup: replace KeyMissingException with NoSuchElementException.
Remove KeyMissingException from testData
2015-10-07 22:36:11 +03:00
Ilya Gorbunov
ff69b97030 StdLib cleanup: deprecated usages 2015-10-07 22:36:09 +03:00
Ilya Gorbunov
70d064052b StdLib cleanup: get rid of platformName and platformStatic usages 2015-10-07 22:36:07 +03:00
Ilya Gorbunov
404b228954 StdLib cleanup: replace fails with assertFails 2015-10-07 22:36:06 +03:00
Yan Zhulanow
c39327dd74 Fix tests for 'infix' 2015-10-07 21:56:07 +03:00
Dmitry Jemerov
401b1e56c0 assorted updates to the readme 2015-10-07 20:52:55 +02:00
Ilya Chernikov
6a7c5e1576 Reducing overhead of rpc callbacks by 1) subsampling cancelled status check (had severe impact), and 2) using buffered remote message streams (had less but still noticeable impact) 2015-10-07 19:55:06 +02:00
Ilya Chernikov
e27abe2f03 Caching daemon connection in JPS, additional logging and minor perf measurements refactoring
# Conflicts:
#	jps-plugin/src/org/jetbrains/kotlin/compilerRunner/KotlinCompilerRunner.kt
2015-10-07 19:55:05 +02:00
Ilya Chernikov
50f482e50f Fixing problem of hanging wait for jps process in idea by using a native-platform lib for platform-specific daemon execution
Adding native-platform uberjar contents to kotlin jps plugin jar
2015-10-07 19:55:04 +02:00
Ilya Chernikov
6848628f4a Creating a test simulating idea-jps-daemon processes, that should now fail on windows, some refactorings in the daemon client to simplify test writing 2015-10-07 19:55:04 +02:00
Ilya Chernikov
99b638a58b Adding support for JS compilation on daemon 2015-10-07 19:55:03 +02:00
Ilya Chernikov
391c292b8d Merging callback services into single facade - phase 2 - rewriting interfaces and implementations 2015-10-07 19:55:03 +02:00
Ilya Chernikov
0f33633cc5 Merging callback services into single facade - phase 1 - rearranging interfaces and implementations into target files 2015-10-07 19:55:02 +02:00
Ilya Chernikov
be66c24467 Extracting performance measuring utils into mini-framework, implement measurements of the rpc time, adding more measurements to performance logging, minor refactorings 2015-10-07 19:55:01 +02:00
Natalia Ukhorskaya
7e356354e0 Debugger: fix breakpoints in files with JvmName annotation
Drop unnessecary logic about part classes with hashcodes
#KT-9480 Fixed
2015-10-07 20:30:00 +03:00
Natalia Ukhorskaya
11ea5f28e8 Debugger: location.sourceName could throw InternalError if codeIndex isn't valid 2015-10-07 20:29:59 +03:00
Natalia Ukhorskaya
7776aa77c8 Completion for codeFragments: do not add runtime types variants if receiver type is the same as runtime type because they are already added by regular completion 2015-10-07 20:29:58 +03:00
Natalia Ukhorskaya
6fc8a16dd5 Completion for codeFragments: do not show java getters/setters at first completion 2015-10-07 20:29:57 +03:00
Natalia Ukhorskaya
9d7585207c Completion for codeFragments: no duplicates for synthetic properties 2015-10-07 20:29:56 +03:00
Natalia Ukhorskaya
9f96de3f7b Compare descriptors by topmost override 2015-10-07 20:29:56 +03:00
Natalia Ukhorskaya
17816002cc Minor: fix warnings 2015-10-07 20:29:55 +03:00
Natalia Ukhorskaya
a2d3607b5b J2K: Generate assert with lambda
#KT-9191 Fixed
2015-10-07 20:29:54 +03:00
Mikhail Glukhikh
0cc861f00b Exposed visibility checking, a set of exposed visibility tests, some test fixes
Effective visibility mechanism introduced.
Local is considered as public, java protected as Kotlin protected, java package private as Kotlin private.
2015-10-07 20:15:16 +03:00
Michael Bogdanov
fa32aa2950 SYNTHETIC flag for internal members 2015-10-07 18:10:56 +03:00
Michael Bogdanov
a2455aab7a Pull up refactoring update 2015-10-07 18:10:55 +03:00
Michael Bogdanov
264d7da450 PACKAGE_VISIBILITY normalization chaged to PROTECTED 2015-10-07 18:10:55 +03:00
Michael Bogdanov
882f6113dc Initial internal member mangling 2015-10-07 18:10:54 +03:00
Michael Bogdanov
306ac73eb7 Actual KotlinCompilerAdapter conversion 2015-10-07 18:10:53 +03:00
Michael Bogdanov
bf18a7647a KotlinCompilerAdapter.java->KotlinCompilerAdapter.kt 2015-10-07 18:10:53 +03:00
Yan Zhulanow
1b01e7a85a Fix tests ('infix') 2015-10-07 15:50:23 +03:00
Yan Zhulanow
7e8674c6ee Fix resolve (members/extensions with 'infix' has higher priority) 2015-10-07 15:49:50 +03:00
Yan Zhulanow
d28ecc2316 Mark builtins and stdlib functions with 'infix' 2015-10-07 15:49:29 +03:00
Yan Zhulanow
1238e93b9f Diagnostics on 'infix' (declaration&use site) 2015-10-07 15:49:28 +03:00
Mikhail Glukhikh
fff434d377 data + open / inner / abstract / sealed are now forbidden 2015-10-07 15:13:14 +03:00
Mikhail Glukhikh
3725ef8cdf Open / data forbidden code fix (eval4j) 2015-10-07 15:13:11 +03:00
Mikhail Glukhikh
b79c1435a3 Open / data forbidden: SMAP fixes 2015-10-07 15:13:09 +03:00
Svetlana Isakova
efb23be367 Open / data forbidden: ConstraintPosition fix 2015-10-07 14:41:42 +03:00
Mikhail Glukhikh
7331eec817 override is forbidden inside annotations 2015-10-07 11:57:41 +03:00
Mikhail Glukhikh
c07f0e9602 private / internal / protected are forbidden in annotations 2015-10-07 11:57:39 +03:00
Mikhail Glukhikh
cba6870f52 protected & internal are now forbidden in interfaces 2015-10-07 11:57:14 +03:00
Mikhail Glukhikh
5f43628f1b Abstract data is forbidden: Idea module infos fixed 2015-10-07 11:57:02 +03:00
Mikhail Glukhikh
67755d7dca Protected / final are deprecated in interfaces: scopes and call translator 2015-10-07 11:49:45 +03:00
Mikhail Glukhikh
49a420e3f9 Build fixed (deprecated protected in interface) 2015-10-07 11:48:37 +03:00
Mikhail Glukhikh
846d7cac69 protected is deprecated inside objects and forbidden inside annotations and enum entries 2015-10-07 10:21:11 +03:00
Mikhail Glukhikh
407d46baad Protected in object deprecated: overriders search fix 2015-10-07 10:17:47 +03:00
Mikhail Glukhikh
c77d0b9cce No protected inside object: performance counter fixed 2015-10-07 10:17:44 +03:00
Mikhail Glukhikh
06cd19dd0d Open / data forbidden: AnalysisResult fix 2015-10-07 10:17:41 +03:00
Mikhail Glukhikh
5e6c9f1979 Internal is deprecated in interfaces: reflection fix 2015-10-07 10:17:38 +03:00
Mikhail Glukhikh
434a318439 Typo fixed 2015-10-07 10:17:35 +03:00
Denis Zharkov
6a1566a6dc Make JVM backend work with Collection.size as val
0. Such properties are called special because their accessor JVM name differs from usual one
1. When making call to such property, always choose special name
2. When generating Kotlin class inheriting such property generate `final bridge int size() { return this.getSize(); }`
3. If there is no `size` declaration in current class generate `bridge int getSize() { // super-call }`
2015-10-07 08:46:35 +03:00
Denis Zharkov
252c82abe3 Generate bridges for FAKE_OVERRIDE properties
The same way it's done for function, just call generateBridges for accessors

 #KT-9442 Fixed
2015-10-07 08:46:34 +03:00
Denis Zharkov
c21d827326 Adjust various testData to size transformation 2015-10-07 08:46:34 +03:00
Denis Zharkov
a0e9754edc Adjust js collections to size transformation 2015-10-07 08:46:33 +03:00
Denis Zharkov
e52e6cf869 Temporary make SmartSet less smart
SmartSet is compiled both with bootstrap and new compiler, so it can't
implement both old and new Set interfaces (with 'size' as function and as property).

This commit should be reverted after bootstraping
2015-10-07 08:46:33 +03:00
Denis Zharkov
61416b3d14 Adjust stdlib to size transformation 2015-10-07 08:46:27 +03:00
Denis Zharkov
7b432e4830 Introduce size() extensions for migrational purposes 2015-10-06 23:56:17 +03:00
Denis Zharkov
547aa2cda6 Load special java methods as properites
Currently only those that override special builtin properties (e.g. `Collection.size`)
Their modality is defined by method's modality
2015-10-06 23:56:17 +03:00
Denis Zharkov
a02b64f0e3 Setup overridability rules for properties built on Java fields
- They overrides each other
- They do not overrides Kotlin propeties and vice versa
2015-10-06 23:56:17 +03:00
Denis Zharkov
dfe93406d9 Minor. Inline parameter 2015-10-06 23:56:17 +03:00
Denis Zharkov
27b231cd7d Minor. Do not record method within resolveMethodToFunctionDescriptor 2015-10-06 23:56:17 +03:00
Denis Zharkov
9d087ce5bd Convert size() functions in builtins to properties
Just like it will work itself out :)
2015-10-06 23:56:17 +03:00
Nikolay Krasko
a4d029dab2 Rename ant tasks for continuous builds: unify suffixes with correspondent branches 2015-10-06 20:51:43 +03:00
Ilya Gorbunov
0851728454 Deprecate mapNotNull to change its behavior later.
#KT-4410
2015-10-06 18:32:06 +03:00
Ilya Gorbunov
d7da8b7bd3 J2K: Special conversion for java.lang.String methods.
#KT-7732
2015-10-06 18:24:24 +03:00
Dmitry Jemerov
4b92bd100c add space between property type parameter list and property name 2015-10-06 16:20:48 +02:00
Dmitry Jemerov
1fdf08bec5 quickfix to migrate function type parameter lists to new syntax 2015-10-06 16:20:48 +02:00
Dmitry Jemerov
7c20630272 diagnostics for deprecated syntax of function type parameter list 2015-10-06 16:20:47 +02:00
Dmitry Jemerov
c5d3673b6b change the ID of the language from "jet" to "kotlin"; rename JetLanguage to KotlinLanguage 2015-10-06 16:14:07 +02:00
Dmitry Jemerov
870b640008 "add operator modifier" fix handles fake overrides
#KT-9347 Fixed
2015-10-06 16:12:09 +02:00
Dmitry Jemerov
8fd9d181de add @suppress to the list of known KDoc tags
#KT-9415 Fixed
2015-10-06 16:12:08 +02:00
Dmitry Jemerov
2884a1c6ea handle semicolons in "introduce backing property"
#KT-9417 Fixed
2015-10-06 16:12:08 +02:00
Pavel V. Talanov
3ed04aea8a Imports from objects: Do not create new instances on getOriginal every time
Also fixes a problem where DeclarationLookupObjectImpl didn't have stable hashCode
2015-10-06 16:31:23 +03:00
Pavel V. Talanov
508b401603 Codegen: fix callable reference to member imported from object 2015-10-06 16:31:22 +03:00
Pavel V. Talanov
37d5c4b223 Allow to import members from object by name
Wrap object members so they do not require dispatch receiver
Hack jvm backend to make it work
2015-10-06 16:31:21 +03:00
Pavel V. Talanov
507293e1ff QualifiedExpressionResolver, minor: extract a couple of functions 2015-10-06 16:31:20 +03:00
Nikolay Krasko
ca2c78e629 Refactoring: remove warnings about javaClass() call 2015-10-06 14:00:23 +03:00
Nikolay Krasko
05cf67049c Allow roots before parent setup and disallow after teardown 2015-10-06 14:00:20 +03:00
Nikolay Krasko
d999000705 Minor: fix warning about annotation absence 2015-10-06 14:00:18 +03:00
Dmitry Petrov
4a3f53b322 Revert fbf2424838:
postpone "transparent semantics for spread operator"
until Java-related design issues are resolved (java.utils.Arrays#asList).
2015-10-06 13:48:59 +03:00
Dmitry Petrov
fbf2424838 Spread should always copy arrays. 2015-10-06 10:07:12 +03:00
Dmitry Petrov
9e546bda27 Support is/as/as? with Function[K]<...> types. 2015-10-06 10:06:27 +03:00
Ilya Gorbunov
e1d53a2843 kotlin-jdbc can be found in its own repository: https://github.com/kotlin-projects/kotlin-jdbc 2015-10-05 21:28:09 +03:00
Ilya Gorbunov
b081535bb6 kotlin-swing can be found in its own repository: https://github.com/kotlin-projects/kotlin-swing 2015-10-05 21:27:31 +03:00
Stanislav Erokhin
b69197962d KT-9461: Inference failed: type parameter fixed early
#KT-9461 Fixed
2015-10-05 20:32:44 +03:00
Nikolay Krasko
493108eca1 Change default visibility icon for declaration with absent modifier to public (KT-9411)
#KT-9411 Fixed
2015-10-05 16:09:46 +03:00
Nikolay Krasko
cb510a6809 Don't pack version of libraries into compiler artifact 2015-10-05 16:09:45 +03:00
Valentin Kipyatkov
45748eb169 More correct check for ResolvedCall status everywhere in the IDE + added assert into ResolvedCallImpl 2015-10-05 15:39:08 +03:00
Valentin Kipyatkov
110d53b4a6 No setter parameter type required 2015-10-05 15:35:17 +03:00
Valentin Kipyatkov
596635270e J2K: more correct comment placement 2015-10-05 15:35:17 +03:00
Valentin Kipyatkov
1fb01dcfbb Minor correction 2015-10-05 15:35:17 +03:00
Valentin Kipyatkov
ec685195bd Better tests 2015-10-05 15:33:50 +03:00
Valentin Kipyatkov
7b063d0391 Completion: lower priority for override member items
#KT-9403 Fixed
2015-10-05 15:33:50 +03:00
Valentin Kipyatkov
c5fdd649ab Overrides completion on typing member name too
#KT-9431 Fixed
2015-10-05 15:33:49 +03:00
Valentin Kipyatkov
fd6244ac51 Never take ExpectedInfo from outer expression "as is" 2015-10-05 15:33:49 +03:00
Valentin Kipyatkov
da7c62e788 Refactored 2015-10-05 15:33:48 +03:00
Valentin Kipyatkov
a75b3e6cf1 Auto-import popup does not suggest to import non-operator functions when operator required 2015-10-05 15:33:48 +03:00
Valentin Kipyatkov
b03a297ed0 KT-9326 IDE tries to resolve name in qualified this to any class in project/classpath
#KT-9326 Fixed
2015-10-05 15:33:47 +03:00
Valentin Kipyatkov
dda9476793 Additional safety check to not corrupt PSI tree (see KT-9122) 2015-10-05 15:33:47 +03:00
Valentin Kipyatkov
1bb6dae444 Auto-import fix should suggest declarations that cannot be used in this position
This also should fix KT-9122 Assertion error when psi modified from IDE

 #KT-9122 Fixed
2015-10-05 15:33:46 +03:00
Valentin Kipyatkov
ab5fe60bbe Corrected quickfix class name in tests 2015-10-05 15:33:45 +03:00
Valentin Kipyatkov
2ae13ed76b KT-9380 Handle malformed ReplaceWith annotations gracefully
#KT-9380 Fixed
2015-10-05 15:33:45 +03:00
Valentin Kipyatkov
45c3d74b42 KT-9284 Intention to convert to expression body doesn't work in particular case
#KT-9284 Fixed
2015-10-05 15:33:44 +03:00
Dmitry Jemerov
94204b7d4e Kotlin plugin updater initial implementation 2015-10-05 12:42:55 +02:00
Michael Nedzelsky
483110332c fix KT-431 Prohibit safe calls on namespaces, super etc
#KT-431 Fixed
2015-10-05 13:14:42 +03:00
Natalia Ukhorskaya
5848ea8d77 Fix usage of deprecated function in debugger testData 2015-10-05 11:44:58 +03:00
Natalia Ukhorskaya
dc7ced1581 JDIEval: fix ClassNotLoadedException 2015-10-05 11:44:50 +03:00
Alexander Udalov
d83ed11cd9 Add "add type to callable reference LHS" quickfix to Code Cleanup 2015-10-05 09:18:48 +03:00
Alexander Udalov
b47982a0a6 Write new protobuf messages for packages as well as classes
An addition to ad735cd
2015-10-05 09:08:51 +03:00
Ilya Gorbunov
ca18613049 J2K: Special conversion for java.lang.String.replaceAll.
#KT-7732
2015-10-05 01:54:21 +03:00
Ilya Gorbunov
36f854e421 Correct replacement for platformName annotation. 2015-10-05 01:54:16 +03:00
Michael Bogdanov
21b603af8f FunctionReferenceGenerationStrategy fake resolved call refactoring 2015-10-03 10:53:24 +03:00
Michael Bogdanov
cd78514b76 Code clean, small refactorings and tests
#KT-8987 Fixed
2015-10-03 10:53:22 +03:00
Michael Bogdanov
3806ad65fc Fixed error with wrong parameter size calculation 2015-10-03 10:53:21 +03:00
Michael Bogdanov
466b20b0fc Parameters refactoring 2015-10-03 10:53:20 +03:00
Michael Bogdanov
1900ddd020 Parametrs.java->Parameters.kt 2015-10-03 10:53:19 +03:00
Michael Bogdanov
2a19b06874 new tests 2015-10-03 10:53:18 +03:00
Michael Bogdanov
c83a5b8bd5 Proper param propagation in inline 2015-10-03 10:53:17 +03:00
Michael Bogdanov
79fce388b3 Actual conversion ParametersBuilder.java->ParametersBuilder.kt 2015-10-03 10:53:16 +03:00
Michael Bogdanov
345b21b3eb ParametersBuilder.java->ParametersBuilder.kt 2015-10-03 10:53:15 +03:00
Michael Bogdanov
03158ed9c3 ParameterBuilder refactoring 2015-10-03 10:53:14 +03:00
Michael Bogdanov
85f7c174cd First implementation of proper agrument order 2015-10-03 10:53:13 +03:00
Michael Bogdanov
1f2b9ce72b Addded DefaultCallMask class and extended interface for argument generation 2015-10-03 10:53:12 +03:00
Michael Bogdanov
8104c10c5a Actual ArgumentGenerator.java convertion 2015-10-03 10:53:10 +03:00
Michael Bogdanov
c9b5753ff3 ArgumentGenerator.java->ArgumentGenerator.kt 2015-10-03 10:53:09 +03:00
Valentin Kipyatkov
cbf5be5c08 No callable reference to generic callables 2015-10-03 10:40:54 +03:00
Valentin Kipyatkov
feb4492455 No true/false for if-condition too 2015-10-03 10:40:54 +03:00
Valentin Kipyatkov
7436355c17 Fix true and false in when entry with subject broken before 2015-10-03 10:40:54 +03:00
Valentin Kipyatkov
2e02f02d9b More clear code 2015-10-03 10:40:53 +03:00
Valentin Kipyatkov
184d59a645 No shadowed declaration filtering for callable references (as well as imports) 2015-10-03 10:40:53 +03:00
Valentin Kipyatkov
d547ea9b57 Overload callable references are now supported - changed code accordingly 2015-10-03 10:40:53 +03:00
Valentin Kipyatkov
b23602237a Smart completion: no "::xxx" items for members and fixed bug with constructors not appearing there 2015-10-03 10:40:53 +03:00
Valentin Kipyatkov
b0d31fc86d Property types supported in smart completion without "::" 2015-10-03 10:40:53 +03:00
Valentin Kipyatkov
aaf507121f Refactored code: the same code for detection of callable reference type 2015-10-03 10:40:52 +03:00
Valentin Kipyatkov
1bc132bc1a No members&extensions after non-qualified "::" because it will be soon unsupported by the compiler 2015-10-03 10:40:52 +03:00
Valentin Kipyatkov
f58f5dd82a Added parameters and type text (grayed) to "::xxx" items in smart completion 2015-10-03 10:40:52 +03:00
Valentin Kipyatkov
58bcb576a1 Completion: grayed parameters and type in completion of imports and callable references (arguable) 2015-10-03 10:40:52 +03:00
Valentin Kipyatkov
ee28a170d6 Auto-popup completion after "::" 2015-10-03 10:40:52 +03:00
Valentin Kipyatkov
836d116786 Checked that import popup now works for callable references 2015-10-03 10:40:52 +03:00
Valentin Kipyatkov
e562c019f9 No "{...}" in presentation for functions in completion of imports and callable references 2015-10-03 10:40:51 +03:00
Valentin Kipyatkov
08335a2ac9 Callable reference completion for non-imported callables 2015-10-03 10:40:51 +03:00
Valentin Kipyatkov
3a2bc51445 Renamed term "classifier" to "matcher" 2015-10-03 10:40:51 +03:00
Valentin Kipyatkov
c0bfca4f89 A::class and A::class.java supported in smart completion too 2015-10-03 10:40:51 +03:00
Valentin Kipyatkov
ec5d1d3a52 Support for A::class and A::class.java in basic completion (but not in smart) 2015-10-03 10:40:51 +03:00
Valentin Kipyatkov
ebf649a681 Support for callable references in smart completion 2015-10-03 10:40:50 +03:00
Valentin Kipyatkov
3f64b25df3 Renamed tests 2015-10-03 10:40:50 +03:00
Valentin Kipyatkov
5fddefbf4d Corrected and restored test 2015-10-03 10:40:50 +03:00
Valentin Kipyatkov
1e21b0201c Renamed test folder 2015-10-03 10:40:50 +03:00
Valentin Kipyatkov
ce05434a0c Fixed extension functions being grayed in import statement completion
#KT-5627 Fixed
2015-10-03 10:40:50 +03:00
Valentin Kipyatkov
e41732e572 No callable references to synthetic extensions (and ones for get/set) 2015-10-03 10:40:50 +03:00
Valentin Kipyatkov
2471647952 Minor refactoring 2015-10-03 10:40:49 +03:00
Valentin Kipyatkov
eaec9795e5 Workaround for compiler bug 2015-10-03 10:40:49 +03:00
Valentin Kipyatkov
2760b0bdb9 Refactoring to make receiver type safe 2015-10-03 10:40:49 +03:00
Valentin Kipyatkov
c12520da7f Move 2015-10-03 10:40:49 +03:00
Valentin Kipyatkov
56bb8adfd0 Refactoring to add CallType.IMPORT_DIRECTIVE and CallType.PACKAGE_DIRECTIVE 2015-10-03 10:40:49 +03:00
Valentin Kipyatkov
d38ceb50b6 Initial support for KT-7090 Completion for callable references
#KT-7090 Fixed
2015-10-03 10:40:49 +03:00
Valentin Kipyatkov
7ee65bf41a Minor 2015-10-03 10:38:31 +03:00
Valentin Kipyatkov
72a5a68769 Dropped support for backing fields (with '$') completion 2015-10-03 10:38:31 +03:00
Alexander Udalov
7c0b3e31c7 Fix usages of callable references with empty LHS in project 2015-10-03 04:37:06 +03:00
Alexander Udalov
659826d5c3 Update reservedWords JS tests after changes to callable references 2015-10-03 04:37:05 +03:00
Alexander Udalov
012a2971ff Quick-fix to add type to LHS of incorrect callable references 2015-10-03 04:37:05 +03:00
Alexander Udalov
661f4efc68 Forbid callable references to members and extensions with empty LHS
This syntax is reserved to be likely used in the future as a shorthand for
"this::foo" where the resulting expression doesn't take the receiver as a
parameter but has "this" already bound to it
2015-10-03 04:37:04 +03:00
Alexander Udalov
f310d4c10e Don't write Kotlin metadata in light classes mode
This was already happening for classes and packages, now will also for
interface DefaultImpls and any other possible classes
2015-10-03 01:03:35 +03:00
Alexander Udalov
cb6d16d224 Advance ABI version after changes to binary format 2015-10-03 00:59:52 +03:00
Alexander Udalov
bdd69d9e46 Use internal names in multifile class metadata
To reuse the strings already existing in the constant pool of the class file
2015-10-03 00:59:34 +03:00
Alexander Udalov
e1ccb92438 Write built-in extensions to new protobuf messages 2015-10-03 00:59:34 +03:00
Alexander Udalov
8c0a86617a Write JVM signatures to new protobuf messages 2015-10-03 00:59:33 +03:00
Alexander Udalov
06a7ca5571 Minor, use existing utility for getting implClassName 2015-10-03 00:59:33 +03:00
Alexander Udalov
4f21caecc4 Simplify AnnotationAndConstantLoader, use NameResolver from ProtoContainer 2015-10-03 00:59:32 +03:00
Alexander Udalov
3a7a48a079 Minor, add nameResolver to ProtoContainer 2015-10-03 00:59:32 +03:00
Alexander Udalov
14ec34e37c Refactor annotation and constant loader, simplify, drop some useless checks 2015-10-03 00:59:31 +03:00
Alexander Udalov
ad735cd788 Split ProtoBuf.Callable to three messages: constructor, function, property
Serialize both at the moment, will drop the old one after bootstrap
2015-10-03 00:59:30 +03:00
Alexander Udalov
041af28166 Deprecate and don't write KotlinClass$Kind, to be removed later 2015-10-03 00:59:30 +03:00
Alexander Udalov
056bb3f833 Deprecate and don't write KotlinSyntheticClass$Kind, to be removed later 2015-10-03 00:59:28 +03:00
Alexander Udalov
5bb47c8365 Write KotlinInterfaceDefaultImpls annotation to DefaultImpls classes
Instead of KotlinSyntheticClass with kind = TRAIT_IMPL
2015-10-03 00:58:52 +03:00
Alexander Udalov
e4090d3f30 Cleanup descriptors.proto, regenerate
- move enums and messages nested in Callable to top level, since they're likely
  to be reused in other messages soon
- delete obsolete comments: some did not any value, some became obsolete with
  custom options ("id in StringTable" -> name_id_in_table)
2015-10-02 20:30:55 +03:00
Dmitry Petrov
b09e727462 Update ideaVersion to 142.5239.7. 2015-10-02 19:07:30 +03:00
Nikolay Krasko
e4ac217e46 Update idea-continuous branches
- abandon 142 branch
 - introduce 143 and 144 branches
2015-10-02 18:23:42 +03:00
Nikolay Krasko
6b6a6d98b7 Add additional line which shouldn't be modified after commenting in other branches to make git auto-merge possible 2015-10-02 18:23:41 +03:00
Dmitry Petrov
1f69ae254d KT-9377 Support is-checks for read-only collections
Additional tests.
2015-10-02 15:17:00 +03:00
Dmitry Petrov
06d9ff6a71 KT-9377 Support is-checks for read-only collections
Generate better code for 'as?' with mutable collection types:
use CHECKCAST, do not introduce special intrinsics for safe-as.
2015-10-02 15:17:00 +03:00
Dmitry Petrov
e033d093d4 KT-9377 Support is-checks for read-only collections
Reorganize marker interfaces and is/as/as? intrinsics.
2015-10-02 15:17:00 +03:00
Dmitry Petrov
6cb0e5151c KT-9377 Support is-checks for read-only collections
Intrinsics for is/as/as? with mutable Kotlin collections and related types.
2015-10-02 15:17:00 +03:00
Dmitry Petrov
35881198c3 KT-9377 Support is-checks for read-only collections
Marker interfaces for mutable Kotlin collections and related classes.
2015-10-02 15:17:00 +03:00
Michael Bogdanov
e91c556d06 Fix for wrong local variable table at inlining lambda with finallies 2015-10-02 13:41:41 +03:00
Mikhail Glukhikh
8ab746d6a3 J2K: visibility modifiers are no more applicable to local classes 2015-10-02 12:52:57 +03:00
Dmitry Jemerov
4ee1b4da84 fix compilation 2015-10-01 20:04:07 +02:00
Dmitry Jemerov
7bc3161e2f "Rename" quickfix for underscore identifiers 2015-10-01 19:19:23 +02:00
Dmitry Jemerov
983de529ed add missing read actions to overriders search
#KT-9147 Fixed
2015-10-01 19:17:24 +02:00
Dmitry Jemerov
4070ba13cd when getting a descriptor for a PsiMethod, also check that it has a valid name (KT-9174)
#KT-9174 Fixed
2015-10-01 19:17:24 +02:00
Dmitry Jemerov
e70f88c67f don't create editor in air if we can't find an editor for the element (EA-72968 - TDDE: TraceableDisposable.throwDisposalError) 2015-10-01 19:17:23 +02:00
Dmitry Jemerov
4f56821101 Java sometimes asks us to find usages of a method with no containing class; don't crash on this (EA-73362 - assert: JavaMemberImpl.getContainingClass) 2015-10-01 19:17:23 +02:00
Dmitry Jemerov
49eace61c9 don't report exception if trying to update jar to the same file (this can happen if the version of the plugin is different from the version of the runtime it bundles; in that case, we've already messed up and there is no value in spamming EA with exceptions) (EA-73451 - IAE: KotlinRuntimeLibraryUtil.replaceFile) 2015-10-01 19:17:22 +02:00
Dmitry Jemerov
5c93e25e67 remove dead code 2015-10-01 19:17:21 +02:00
Dmitry Jemerov
9c6f206606 don't try to get the parent of an empty FQ name (EA-73459 - ISE: FqName.parent)
#KT-9162 Fixed
2015-10-01 19:17:21 +02:00
Sergey Mashkov
c9843f6387 Downgrade maven-bundle-plugin to build against Java 6 2015-10-01 18:22:28 +03:00
Pavel V. Talanov
caefb2cf50 Adjust test data for converter test
Due to type inference change
2015-10-01 17:53:20 +03:00
Pavel V. Talanov
c19b8353d0 Minor, tests: remove some static accesses to builtIns 2015-10-01 17:53:20 +03:00
Pavel V. Talanov
a3fbf2fabc Test that primitives, arrays, enums are implicitly serializable on jvm and not js
Specifically test calling java function that accepts java.io.Serializable
2015-10-01 17:53:19 +03:00
Pavel V. Talanov
7b49baf8c3 Test data adjustment: JetDiagnosticsTest 2015-10-01 17:53:19 +03:00
Pavel V. Talanov
bc8449a70c Test data adjustment: Resolved calls and constraint system test 2015-10-01 17:53:18 +03:00
Pavel V. Talanov
41c0895abb JetExtractionTest: adjust test data
after making some of builtin types serializable
2015-10-01 17:53:17 +03:00
Pavel V. Talanov
e263c85142 JetTypeChecker: adjust test data
after making some of builtin types serializable
2015-10-01 17:53:17 +03:00
Pavel V. Talanov
1f36b7fbea Extract FunctionPlaceholders from ErrorUtils to a separate component since they are not really an error 2015-10-01 17:53:16 +03:00
Pavel V. Talanov
d5624708fb Add "java.io.Serializable" as supertype to java builtIns mapped to classes that are serializable on jvm
Implementation is hacky, relies on adding fictional supertype to corresponding classes
2015-10-01 17:53:16 +03:00
Pavel V. Talanov
427c853e27 ErrorUtils return DefaultBuiltIns
This should be changed in the future by making ErrorUtils not-static
2015-10-01 17:53:15 +03:00
Pavel V. Talanov
76029ee9b2 Introduce JvmBuiltIns and DefaultBuiltIns, different instances of KotlinBuiltIns
Make KotlinBuiltIns an abstract class
JsPlatform has DefaultBuiltIns
2015-10-01 17:53:14 +03:00
Pavel V. Talanov
4b9e167fd2 Minor: move builtIns initialization into constructor 2015-10-01 17:53:14 +03:00
Pavel V. Talanov
0ae842a05d 'descriptors' module exports 'deserialization', not the other way around
Also remove some of redundantly specified dependencies
2015-10-01 17:53:13 +03:00
Pavel V. Talanov
22e3e192ee ModuleDescriptorImpl: remove KBI as default parameter 2015-10-01 17:53:12 +03:00
Pavel V. Talanov
7d1b6f4bbb GenerateOperationsMap uses builtIns from default platform 2015-10-01 17:53:12 +03:00
Pavel V. Talanov
767950fea3 Tests: Replace some usages of KotlinBuiltIns.getInstance()
In cases where platform is either unimportant or predefined in test code
2015-10-01 17:53:11 +03:00
Pavel V. Talanov
af3bb80a54 JetChangeSignatureTest: Drop usages of KotlinBuiltIns.getInstance() 2015-10-01 17:53:11 +03:00
Pavel V. Talanov
b79881848f jvm-backend, cli: Replace some usages of KotlinBuiltIns.getInstance() by JvmPlatform.builtIns 2015-10-01 17:53:10 +03:00
Pavel V. Talanov
5dd4843b5a reflection.jvm: Drop usages of KotlinBuiltIns.getInstance() 2015-10-01 17:53:09 +03:00
Pavel V. Talanov
537134613a js.translator: Drop usages of KotlinBuiltIns.getInstance() 2015-10-01 17:53:09 +03:00
Pavel V. Talanov
643cb0a5d4 js.frontend: Drop usages of KotlinBuiltIns.getInstance() 2015-10-01 17:53:08 +03:00
Pavel V. Talanov
0a2bd257a5 frontend.java: Drop usages of KotlinBuiltIns.getInstance() 2015-10-01 17:53:08 +03:00
Pavel V. Talanov
64d8baee1d DeserializerForDecompilerBase depends on TargetPlatform 2015-10-01 17:53:07 +03:00
Pavel V. Talanov
bb3028b6c9 JetSourceNavigationHelper: drop usage of KotlinBuiltIns.getInstance() 2015-10-01 17:53:07 +03:00
Pavel V. Talanov
f28a8a60c1 AllClassesCompletion: drop usage of KotlinBuiltIns.getInstance() 2015-10-01 17:53:06 +03:00
Pavel V. Talanov
3963c8b833 MemberMatching: drop usage of KotlinBuiltIns.getInstance() 2015-10-01 17:53:06 +03:00
Pavel V. Talanov
36fee381c3 BuiltInsReferenceResolver: drop usage of KotlinBuiltIns.getInstance() 2015-10-01 17:53:05 +03:00
Pavel V. Talanov
e4c0d93224 idea: Use platform extension to eliminate other usages of KotlinBuiltIns 2015-10-01 17:53:04 +03:00
Pavel V. Talanov
315809a34b Add builtIns property to TargetPlatform
Add utility to get TargetPlatform by JetElement
2015-10-01 17:53:03 +03:00
Pavel V. Talanov
51113c10b4 Drop some usages of KotlinBuiltIns.getInstance() in idea module 2015-10-01 17:53:02 +03:00
Pavel V. Talanov
f1c76f0467 extractableAnalysisUtil: Drop some usages of KotlinBuiltIns.getInstance() 2015-10-01 17:52:04 +03:00
Pavel V. Talanov
e42057c71c Drop some usages of KotlinBuiltIns.getInstance() in ide-common module 2015-10-01 17:52:04 +03:00
Pavel V. Talanov
0610dd36fa ConstantExpressionEvaluator: avoid calling KotlinBuiltIns.getInstance() 2015-10-01 17:52:03 +03:00
Pavel V. Talanov
b9da08d11c TypeIntersector: refactor it to being a static utility
Deal with intersecting empty set of types on the call site
2015-10-01 17:52:03 +03:00
Pavel V. Talanov
b85fe40275 ScriptReceiver: Remove usage of KotlinBuiltIns.getInstance() 2015-10-01 17:52:02 +03:00
Pavel V. Talanov
e35e6f7f52 JetTypeCodeFragment: Remove usage of KotlinBuiltIns.getInstance() 2015-10-01 17:52:01 +03:00
Pavel V. Talanov
b5712033a8 Make DataFlowValue.NULL not static 2015-10-01 17:52:01 +03:00
Pavel V. Talanov
a72b050d91 Pass builtIns into CompileTimeConstantChecker constructor 2015-10-01 17:52:00 +03:00
Pavel V. Talanov
9b0970e1a9 Avoid calling KotlinBuiltIns.getInstance() in DescriptorRendererImpl 2015-10-01 17:52:00 +03:00
Pavel V. Talanov
9f858cbc56 ControlStructureTypingUtils: use real module descriptor instead of error module 2015-10-01 17:51:59 +03:00
Pavel V. Talanov
7429b65c73 Try to implement some of error utils without using KotlinBuiltIns 2015-10-01 17:51:59 +03:00
Pavel V. Talanov
6780a1fe90 Make DynamicCallableDescriptors non static and remove static object DynamicType 2015-10-01 17:51:58 +03:00
Pavel V. Talanov
424d71e964 Remove reference to KotlinBuiltIns from CompanionObjectMapping
Make it a class
2015-10-01 17:51:57 +03:00
Pavel V. Talanov
d2a4235dd8 Pass KotlinBuiltIns into getExpectedTypePredicate utility 2015-10-01 17:51:56 +03:00
Pavel V. Talanov
0fc23fc426 Use new method instead of some usages of KotlinBuiltIns.getInstance() 2015-10-01 17:51:56 +03:00
Pavel V. Talanov
22c250778e Introduce TypeConstructor#getBuiltIns 2015-10-01 17:51:55 +03:00
Alexey Sedunov
896e1d8bc9 Rename: Drop 'override' keyword when renaming function/property without bases
#KT-4790 Fixed
2015-10-01 17:35:27 +03:00
Alexey Sedunov
2f251b9216 Rename: Drop 'operator' keyword if new name doesn't correspond to any convention
#KT-9357 Fixed
2015-10-01 17:35:26 +03:00
Alexey Sedunov
1f6f617546 Create from Usage: Suggest synthetic function classes as extension receivers 2015-10-01 17:35:25 +03:00
Alexey Sedunov
1d83d75a82 Create from Usage: Use function form when rendering FunctionN types
#KT-7522 Fixed
2015-10-01 17:35:24 +03:00
Alexey Sedunov
605802847a Move Declarations: Fix processing of self-references
#KT-5847 Fixed
2015-10-01 17:35:23 +03:00
Alexey Sedunov
e3d8d819da Inline Variable: Var support
#KT-5169 Fixed
2015-10-01 17:35:22 +03:00
Alexey Sedunov
007c7c17f0 Create parameter: Forbid inplace refactoring if occurrences contain out-of-parentheses lambda arguments. Fix lambda argument replacement
#KT-9307 Fixed
2015-10-01 17:35:21 +03:00
Alexey Sedunov
b805645489 Change Signature: Support receiver <-> parameter conversion for function expressions
#KT-9309 Fixed
2015-10-01 17:35:20 +03:00
Alexey Sedunov
2b354cd4db Create parameter: Look for containing function if no class is found. Support secondary constructors
#KT-9322 Fixed
2015-10-01 17:35:19 +03:00
Alexey Sedunov
78f7e6b459 Extraction Engine: Support type parameter references
#KT-7260 Fixed
2015-10-01 17:35:18 +03:00
Alexey Sedunov
aa080bf201 Create from Usage: Forbid for parameters/local variables when reference is not an identifier
#KT-9305 Fixed
2015-10-01 17:35:16 +03:00
Alexey Sedunov
0ef8281823 Parameter -> Receiver Conversion: Don't show change signature dialog
#KT-9302 Fixed
2015-10-01 17:35:15 +03:00
Alexey Sedunov
9ec87c01ab Property <-> Function Conversion: Add/remove 'get'/'is' prefixes automatically
#KT-8812 Fixed
2015-10-01 17:35:12 +03:00
Alexey Sedunov
1b9bbf0bb6 Move Declaration to Separate File: Process internal references since imports may be necessary in the new file 2015-10-01 17:35:11 +03:00
Nikolay Krasko
c2b4647aa8 Avoid storing same files in kotlin-compiler.jar for maven
#KT-9202 Fixed
2015-10-01 16:42:56 +03:00
Sergey Mashkov
a8e3ee9190 KT-6264 Introduce kotlin-osgi-bundle
The bundle is a mix of kotlin-runtime, kotlin-stdlib and kotlin-reflect. The main reason to do so intead of adding corresponding modules is that there is so called "split package" issue that couldn't be easily resolved
2015-10-01 15:37:35 +03:00
Michael Nedzelsky
0de9e8295a add tests for incremental compilation: package members 2015-10-01 15:16:30 +03:00
Michael Nedzelsky
8557e540fc incremental compilation: do not recompile on changes in private static final values. 2015-10-01 15:16:26 +03:00
Michael Nedzelsky
bc6746b9e6 add tests for comparison of package members 2015-10-01 15:16:22 +03:00
Michael Nedzelsky
c7b52bfdc1 fix KT-8977 Ignore non-public API changes for packages in incremental compilation
#KT-8977 Fixed
2015-10-01 15:16:18 +03:00
Zalim Bashorov
fca9b51548 Revert "extend test for code cleanup with changing visibility from private to internal for declarations, which are used outside of their file."
This reverts commit 9fd968d59e.
2015-10-01 14:57:26 +03:00
Zalim Bashorov
073b10072a Minor: fix testdata 2015-10-01 14:57:26 +03:00
Zalim Bashorov
9256682cc5 Fix quickfix and tests 2015-10-01 14:57:26 +03:00
Zalim Bashorov
a36e4abf4d Move visibility check for toplevel private declarations to Visibilities.PRIVATE and fix it. 2015-10-01 14:57:26 +03:00
Zalim Bashorov
94b110936e Add the ability to get containing source file from SourceElement 2015-10-01 14:37:25 +03:00
Michael Nedzelsky
c7e5eb9ab8 fix AbstractBytecodeTextTest: read expected file with UTF-8 encoding 2015-10-01 12:16:48 +03:00
Alexander Udalov
1e6f230d69 Fix "ant compiler-quick", add conditional-preprocessor 2015-10-01 02:14:25 +03:00
Alexander Udalov
34d14939f9 Fix build after change in property accessor names 2015-10-01 02:14:25 +03:00
Valentin Kipyatkov
5afa91d4ec Restored back temporarily renamed properties 2015-09-30 22:50:27 +03:00
Michael Nedzelsky
6466facffa force UTF-8 encoding in CodegenTestCase.loadFileByFullPath 2015-09-30 22:35:38 +03:00
Mikhail Glukhikh
361448de8b Rename: private / final property in trait --> in interface 2015-09-30 19:38:19 +03:00
Mikhail Glukhikh
7256a546df Visibility modifiers are no longer allowed on local classes 2015-09-30 19:38:16 +03:00
Mikhail Glukhikh
6f7d9459fa Completion for sealed class inheritors and a pair of tests 2015-09-30 19:38:14 +03:00
Mikhail Glukhikh
7a99b3872b Forbid private functions with no body and private properties in traits which are abstract by default 2015-09-30 19:38:02 +03:00
Mikhail Glukhikh
930402d910 Incorrect 'inner' usage is diagnosed by parent, not by target 2015-09-30 17:54:47 +03:00
Dmitry Jemerov
2109a6b760 advance until-build to branch 144 2015-09-30 15:40:19 +02:00
Dmitry Petrov
91214c50a6 Unify containing classes mapping for deserialized callable members. 2015-09-30 09:56:06 +03:00
Dmitry Petrov
c17326841a Inlining package members should use facade class for SMAP. 2015-09-30 09:56:05 +03:00
Dmitry Petrov
9a41ee41d7 Migrate to new storage API.
Remove IncrementalPackageFragment::getMultifileFacade.
2015-09-30 09:56:05 +03:00
Dmitry Petrov
3dfe9951ef Incremental compilation support for multifile classes. 2015-09-30 09:56:05 +03:00
Denis Zharkov
ea8ada4664 Fix accessor naming test: count only method declarations 2015-09-30 08:19:52 +03:00
Denis Zharkov
22d58239e3 Support DefaultImpls in light-classes and indices
#KT-4647 Fixed
2015-09-30 08:19:52 +03:00
Denis Zharkov
8b8fa40348 Drop tests with obsolete assumption
DefaultImpls classes are not visible in IDE no more because they are inner.
2015-09-30 08:19:52 +03:00
Denis Zharkov
fd0c92e307 Record inner class info for interface and DefaultImpls 2015-09-30 08:19:51 +03:00
Denis Zharkov
c1bed7efc7 Move generation of non-local interface DefaultImpls
`DefaultImpls` should be inner class of it's interface,
so for proper light classes building it should be built
before original interface has been done, i.e. `done` method called.

Everything is complicated with local interfaces, so they are just left untouched
2015-09-30 08:19:51 +03:00
Denis Zharkov
a101fffd9a Change INTERFACE_IMPL_CLASS_NAME: $TImpl -> DefaultImpls 2015-09-30 08:19:51 +03:00
Denis Zharkov
cabf0df5d1 Minor. Rename mapTraitImpl -> mapDefaultImpls 2015-09-30 08:19:51 +03:00
Denis Zharkov
b2d4bdc802 Minor. Rename isTrait -> isInterface 2015-09-30 08:19:51 +03:00
Denis Zharkov
6061528f7f Minor. Rename isInterface -> isJvmInterface 2015-09-30 08:19:51 +03:00
Denis Zharkov
cb1bdfde52 Minor. TraitImplBodyCodegen -> InterfaceImplBodyCodegen 2015-09-30 08:19:51 +03:00
Denis Zharkov
27bc62bd8e Minor. Rename constants: TRAIT_IMPL* -> DEFAULT_IMPLS* 2015-09-30 08:19:50 +03:00
Yan Zhulanow
32e2a550b4 'infix' modifier 2015-09-30 04:03:27 +03:00
Alexander Udalov
1fbfff97fa Delete NoInternalVisibilityInStdLibTest
'internal' is not a default visibility anymore and thus makes sense in stdlib
2015-09-29 21:42:58 +03:00
Zalim Bashorov
90915f2432 Backup project's system dir when create backup for debugging Kotlin incremental compilation 2015-09-29 19:42:30 +03:00
Zalim Bashorov
0eac238f9b KotlinBuilder: improve logging 2015-09-29 19:42:29 +03:00
Valentin Kipyatkov
2d0c1cd77d Advanced ABI version after accessor naming change 2015-09-29 18:38:42 +03:00
Valentin Kipyatkov
94d8e3f4b6 "is" getter naming allowed for non-booleans too 2015-09-29 18:32:25 +03:00
Valentin Kipyatkov
20bddce18d No synthetic property for false get-method like "issue()" 2015-09-29 18:32:25 +03:00
Valentin Kipyatkov
8f1a3043de Synthetic properties made locale-independant too 2015-09-29 18:32:25 +03:00
Valentin Kipyatkov
069ce12604 Accessor naming should be locale-independant 2015-09-29 18:32:24 +03:00
Valentin Kipyatkov
219fc46a36 Renamed property to avoid name clash 2015-09-29 18:32:24 +03:00
Valentin Kipyatkov
420c6856be Changed naming algorithm of accessor name generation: "isXXX" and "kClass" cases affected 2015-09-29 18:32:24 +03:00
Valentin Kipyatkov
98da621ab3 Temporary rename of properties starting with "is" and used from java code (will revert back after changing accessor naming policy) 2015-09-29 18:32:23 +03:00
Mikhail Glukhikh
1941827780 Typo fixed 2015-09-29 17:14:06 +03:00
Alexander Udalov
3b018e9eb0 Minor, move serialization-related stuff in codegen to separate package 2015-09-29 16:31:21 +03:00
Alexander Udalov
ba80a2404f Minor, improve signature of AsmUtil#writeAnnotationData 2015-09-29 16:26:29 +03:00
Alexander Udalov
3b9d90429b Simplify local class name serialization, don't go through extension
Also fix it for the case of a class in a non-default package
2015-09-29 16:26:28 +03:00
Alexander Udalov
1036506b25 Introduce new string table optimized for JVM class files
This format of the string table allows to reduce the size of the Kotlin
metadata in JVM class files by reusing constants already present in the
constant pool. Currently the string table produced by JvmStringTable is not
fully optimized in serialization (in particular, the 'substring' operation
which will be used to extract type names out of generic signature, is not used
at all), but the format and its complete support in the deserialization
(JvmNameResolver) allows future improvement without changing the binary version
2015-09-29 16:26:28 +03:00
Alexander Udalov
542bfab96f Don't write unnecessary information to ValueParameter proto
Flags can have a default value and the index can be trivially computed almost
all the time
2015-09-29 16:26:28 +03:00
Alexander Udalov
ccf72668e0 Don't write default upper bound for type parameters in protobuf 2015-09-29 16:26:27 +03:00
Alexander Udalov
6a8d0fbd75 Introduce infrastructure to separate string table from metadata on JVM
Nothing especially helpful happens here, this is only a big refactoring
introducing a separate string array for the string table, which is currently
always empty, but will contain actual strings soon
2015-09-29 16:26:27 +03:00
Alexander Udalov
5fe958f034 Add target TYPE to JVM metadata annotations 2015-09-29 16:26:26 +03:00
Alexander Udalov
89fe54c951 Remove NameResolver#getFqName, replace with getClassId 2015-09-29 16:26:26 +03:00
Alexander Udalov
7d5bd3cf50 Simplify storage of JVM signatures in binary metadata
Store the whole method & field descriptor strings. Moving these strings to
separate annotation arguments later will allow to reuse them with the ones in
the constant pool, presumably allowing to save lots of space (up to 10%)
2015-09-29 16:26:25 +03:00
Alexander Udalov
68051fa3bb Minor, refine parameter type of StringTable#getFqNameIndex 2015-09-29 16:26:25 +03:00
Alexander Udalov
5477570066 Extract interface out of NameResolver 2015-09-29 16:26:24 +03:00
Alexander Udalov
da68c4d9ee Extract interface out of StringTable
Rework SerializerExtension interface: don't pass StringTable to each method
every time, create it in each extension's constructor instead and expose to
DescriptorSerializer with an interface method
2015-09-29 16:26:24 +03:00
Alexander Udalov
e749bc262d Delete deprecated Type.Constructor message, advance ABI version 2015-09-29 16:26:24 +03:00
Nikolay Krasko
42eb413066 Update since to 142.5047.6 2015-09-29 15:43:02 +03:00
Stanislav Erokhin
5a61871d4b Minor. Fix testdata. 2015-09-29 13:33:57 +03:00
Stanislav Erokhin
5adec83907 Minor. Fix util function getResolutionScope. 2015-09-29 13:33:56 +03:00
Stanislav Erokhin
eb5a129253 Created util function recordScope and record scope for file and value parameters. 2015-09-29 13:33:56 +03:00
Stanislav Erokhin
fd503d0367 Minor. Replaced TYPE_RESOLUTION_SCOPE to LEXICAL_SCOPE 2015-09-29 13:33:55 +03:00
Mikhail Glukhikh
3d6d527d93 Synthetic 'field' variable is no more created in extension property accessors #KT-9303 Fixed 2015-09-29 13:05:19 +03:00
Mikhail Glukhikh
7b4f18035f L-value of assignment expression can now be annotated with expression-targeted annotation #KT-9154 Fixed 2015-09-29 13:05:16 +03:00
Mikhail Glukhikh
f4ccb16c2e Function expressions can be now annotated with expression-targeted annotation #KT-9323 Fixed 2015-09-29 13:05:13 +03:00
Mikhail Glukhikh
4e91f2ffb7 'open' + 'private' and 'abstract' + 'private' are now incompatible for functions and properties #KT-9324 Fixed 2015-09-29 13:05:11 +03:00
Mikhail Glukhikh
7cf2840fe5 'final' is deprecated in interfaces 2015-09-29 13:05:08 +03:00
Ilya Gorbunov
a55f9feacb Mark CharSequence.iterator() with operator. 2015-09-28 21:50:54 +03:00
Nikolay Krasko
e92a95eebb Fix typo in extension 2015-09-28 15:58:54 +03:00
Dmitry Kovanikov
6aa300e2d3 Minor: rename Kotlin console... action name to Kotlin REPL 2015-09-28 15:54:58 +03:00
Dmitry Kovanikov
45911cff90 Add icon to Kotlin console... action 2015-09-28 15:54:57 +03:00
Dmitry Kovanikov
84c1ac8885 KT-9262: don't show warning about non-existent location after typing ':quit' 2015-09-28 15:54:56 +03:00
Dmitry Kovanikov
2020351e2e KT-9263: don't show error message when user tries to execute command in non-existed REPL console 2015-09-28 15:54:54 +03:00
Dmitry Kovanikov
5cac0da2ba KT-9249: show text representation of first shortcut inside repl placeholder 2015-09-28 15:54:53 +03:00
Dmitry Jemerov
93e2827c1a dependency on java-i18n plugin 2015-09-28 14:49:06 +02:00
Mikhail Glukhikh
3ad628522a ReplaceWith now functions correctly in built-ins #KT-9351 Fixed 2015-09-28 15:38:05 +03:00
Dmitry Jemerov
ee1175d5e5 fix 'operator' modifier inspection
#KT-9349 Fixed
2015-09-28 14:35:41 +02:00
Natalia Ukhorskaya
58796da453 Extract function: render local class with debug name only in debug mode 2015-09-28 13:51:09 +03:00
Nikolay Krasko
881f1fd75e Suppress warning in proguard about jna classes 2015-09-28 11:38:08 +03:00
Nikolay Krasko
da22e40fad Update to IDEA 142.5047.6 2015-09-28 11:38:08 +03:00
Natalia Ukhorskaya
aa2ca1a7d5 Add missing readAction 2015-09-28 11:38:07 +03:00
Natalia Ukhorskaya
9ab4aafa01 jna-util.jar was renamed to jna-platform.jar 2015-09-28 11:38:07 +03:00
Natalia Ukhorskaya
606cf41e2a Fix compilation errors 2015-09-28 11:38:06 +03:00
Natalia Ukhorskaya
7582f1f454 Rewrite DebuggerTests (do not use FrameTree) 2015-09-28 11:38:06 +03:00
Natalia Ukhorskaya
5c04959871 Debugger: fix evaluation for local classes
#KT-5104 Fixed
2015-09-28 09:34:54 +03:00
Natalia Ukhorskaya
4fb4e0c21f Debugger: fix exception when process is resumed during stepping 2015-09-28 09:34:53 +03:00
Michael Nedzelsky
7234bf3572 get rid of internal JvmVersion annotation in kotlin-jdbc 2015-09-27 20:37:47 +03:00
Michael Nedzelsky
0035bbba7c fix check for internal from another module in imports and file level annotations 2015-09-27 20:37:41 +03:00
Yan Zhulanow
080dcf882e Minor: fix broken tests 2015-09-26 03:29:09 +03:00
Yan Zhulanow
3be050640c Fix Method.invoke() signature 2015-09-26 03:29:03 +03:00
Ilya Gorbunov
a1c3b26280 Temporary revert for M14 excluding kotlin-jdbc and kotlin-swing from maven deployment 2015-09-26 00:47:49 +03:00
Ilya Gorbunov
3f34bdf483 Make JvmVersion annotation internal for now. 2015-09-26 00:46:21 +03:00
Ilya Gorbunov
ee44717a41 private -> internal where it's necessary: synchronize OperationsMapGenerated and GenerateOperationsMap. 2015-09-26 00:26:59 +03:00
Ilya Gorbunov
0a24ba77b5 Add extension operators plus and minus for FileCollection to make them resolve into gradle api, rather than collection api. 2015-09-26 00:12:31 +03:00
Ilya Gorbunov
3915cfcea6 Merge Lazy's declarations in one file. 2015-09-25 23:50:55 +03:00
Zalim Bashorov
03fe293ace Minor: fix testdata 2015-09-25 22:36:01 +03:00
Ilya Gorbunov
1145cc0d1b Lazy: changes and clarifications after code-review.
LazyThreadSafety.NONE is actually *NONE* now.
2015-09-25 21:49:49 +03:00
Ilya Gorbunov
74f39c2375 Provide LazyThreadSafetyMode.PUBLICATION: concurrent non-blocking initializations, single publication. 2015-09-25 21:49:46 +03:00
Ilya Gorbunov
4a062698f2 Introduce final field in SynchronizedLazyImpl to enable safe publication. 2015-09-25 21:49:42 +03:00
Michael Nedzelsky
1986d8d7f8 add test for private in file 2015-09-25 21:16:04 +03:00
Michael Nedzelsky
c62b9dc416 remove test for KT-2257: cannot access private namespace var in multi-file namespace 2015-09-25 21:16:04 +03:00
Michael Nedzelsky
2f9151ec18 remove incremental test: accessPrivateMembers 2015-09-25 21:16:03 +03:00
Zalim Bashorov
c7c7382b8e Minor: fix testdata 2015-09-25 21:16:02 +03:00
Michael Nedzelsky
759c325e8b NoInternalVisibilityInStdLibTest: skip explicit internal modifiers 2015-09-25 21:16:02 +03:00
Michael Nedzelsky
2ad1459948 NoInternalVisibilityInStdLibTest: get rid of warnings 2015-09-25 21:16:01 +03:00
Zalim Bashorov
8cb87b3e49 private -> internal where it's necessary 2015-09-25 21:16:00 +03:00
Michael Nedzelsky
0d2196e226 ACCESS_TO_PRIVATE_TOP_LEVEL_FROM_ANOTHER_FILE: warning -> error 2015-09-25 21:13:18 +03:00
Ilya Gorbunov
1598660870 Deprecate extension property String.reader in favor of existing extension method reader() in kotlin.io package. 2015-09-25 21:10:20 +03:00
Ilya Gorbunov
379c39a2ef Move ByteArray.inputStream() method from kotlin package to kotlin.io 2015-09-25 21:10:17 +03:00
Ilya Gorbunov
8de40c01b9 Fix changed stdlib source file names in stepping tests. 2015-09-25 21:10:15 +03:00
Ilya Gorbunov
1622cf9506 Fix stdlib facade names in bytecode generation and decompilation tests. 2015-09-25 21:10:13 +03:00
Ilya Gorbunov
ed2b118fc8 Update java examples 2015-09-25 21:10:11 +03:00
Ilya Gorbunov
60c2f0fe0b Redistribute generated code between files. 2015-09-25 21:10:08 +03:00
Ilya Gorbunov
3e018f3a9f Annotate hand-written code with desired package part names. 2015-09-25 21:10:06 +03:00
Ilya Gorbunov
63f90eacdd Move flatten and unzip to parts corresponding to the receiver type of operation. 2015-09-25 21:10:03 +03:00
Ilya Gorbunov
3d7ff5c573 Move IO utility methods to corresponding parts. 2015-09-25 21:10:01 +03:00
Ilya Gorbunov
bf8df0f764 Move toRegex extension in kotlin package 2015-09-25 21:09:59 +03:00
Ilya Gorbunov
9ba50bcdff Move map- and set-related methods to corresponding parts. 2015-09-25 21:09:56 +03:00
Ilya Gorbunov
f6e0ef83e5 Move constants out of Console.kt 2015-09-25 21:09:54 +03:00
Ilya Gorbunov
058f2a8bd2 Move File-related extensions out of ReadWrite.kt 2015-09-25 21:09:52 +03:00
Ilya Gorbunov
13132e7483 Move synchronized method out of JLangJVM 2015-09-25 21:09:50 +03:00
Ilya Gorbunov
27ab643d3f Move to method to Tuples 2015-09-25 21:09:47 +03:00
Ilya Gorbunov
6bb88df693 Turn off Xmultifile-package-facades option for stdlib. 2015-09-25 21:09:45 +03:00
Ilya Gorbunov
0c777b87ed Add JvmMultifileClass to js as internal annotation. 2015-09-25 21:09:43 +03:00
Ilya Gorbunov
d40bbf6acb Allow to annotate generated code as jvm-only. 2015-09-25 21:09:40 +03:00
Ilya Gorbunov
1deb8b9dda Rename conflicting parts: add "Kt" 2015-09-25 21:09:38 +03:00
Ilya Gorbunov
473698a7e8 Generate JvmMultifileClass annotation on parts. 2015-09-25 21:09:36 +03:00
Ilya Gorbunov
2bc1fbab3f Allow stdlib generator to distribute concrete functions between different target files. 2015-09-25 21:09:33 +03:00
Ilya Gorbunov
947b8ac428 ant build: Do not preprocess stdlib source for JVM, only for JS. 2015-09-25 21:09:31 +03:00
Ilya Gorbunov
12d218632c logging: debug enabled for CLI 2015-09-25 21:09:29 +03:00
Ilya Gorbunov
9970c34961 Preprocessor: improved logging. 2015-09-25 21:09:27 +03:00
Ilya Gorbunov
7f5c3e15e4 Annotate stdlib jvm-only files without JVM suffix. 2015-09-25 21:09:24 +03:00
Ilya Gorbunov
1df4ab847d Remove task for ant, include preprocessor into the compiler, call preprocessor in ant build. 2015-09-25 21:09:22 +03:00
Ilya Gorbunov
e8c93abdb5 Developing preprocessor task for ant 2015-09-25 21:09:20 +03:00
Ilya Gorbunov
7b206fdaf4 Refactor a bit 2015-09-25 21:09:18 +03:00
Ilya Gorbunov
d76e177834 Each platform is processed separately but in parallel. 2015-09-25 21:09:15 +03:00
Ilya Gorbunov
706771829e Processing sources for multiple platforms in one pass. 2015-09-25 21:09:13 +03:00
Ilya Gorbunov
ae51f2eb2a Annotation for preprocessor to mark declaration as jvm-only 2015-09-25 21:09:11 +03:00
Ilya Gorbunov
de778d9865 Prototyping preprocessor: stripping declarations and replacing name. 2015-09-25 21:09:08 +03:00
Dmitry Jemerov
3d0e91065a quickfix for usages of operators that don't have the proper annotation 2015-09-25 20:00:29 +02:00
Dmitry Jemerov
8b0ccce4f1 code review; add 'operator' also to next() and hasNext(); check toplevel functions 2015-09-25 20:00:28 +02:00
Dmitry Jemerov
e0f8d68a5f add 'operator' modifier when creating next() and hasNext() from usage 2015-09-25 20:00:28 +02:00
Dmitry Jemerov
1e2d4c0471 use setOf() instead of Guava sets 2015-09-25 20:00:27 +02:00
Dmitry Jemerov
41d1cf6083 check return type of contains() and compareTo() 2015-09-25 20:00:26 +02:00
Dmitry Jemerov
3dbb74bf0c teach 'create from usage' to add 'operator' modifier when necessary 2015-09-25 20:00:26 +02:00
Dmitry Jemerov
bda0bd1de1 quickfix to add 'operator' keyword to operator-like functions 2015-09-25 20:00:19 +02:00
Yan Zhulanow
3a519ccc0a Add extension for Method.invoke() 2015-09-25 20:47:55 +03:00
Yan Zhulanow
b73f91d16b Fix "unresolved widget fqname" bug in Gradle 2015-09-25 20:47:54 +03:00
Yan Zhulanow
07b77432de Fix NPE in AndroidPsiTreeChangePreprocessor 2015-09-25 20:47:54 +03:00
Dmitry Jemerov
61d78e0880 tests for "Add 'const' modifier" 2015-09-25 19:14:54 +02:00
Dmitry Jemerov
48bcc93ec2 revert incorrect testdata changes 2015-09-25 19:14:53 +02:00
Dmitry Jemerov
86a01a9a0d update Java usages when adding 'const' modifier; make the action available as intention 2015-09-25 19:14:53 +02:00
Dmitry Jemerov
250456ab4b add quickfix for NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION 2015-09-25 19:14:52 +02:00
Alexey Tsvetkov
743c59331d Remove tests on turning incremental on/off temporary 2015-09-25 20:11:58 +03:00
Alexey Tsvetkov
1002d233cb Update cache version 2015-09-25 20:11:58 +03:00
Alexey Tsvetkov
ba33020140 Clean only kotlin caches when incremental compilation is off 2015-09-25 20:11:58 +03:00
Alexey Tsvetkov
1298d115bd Minor: rename test cases 2015-09-25 20:11:57 +03:00
Alexey Tsvetkov
c7f66a1585 Fix recompilation of dependent modules on cache/abi version change
New cache version was written to dependent targets,
when they have not been compiled yet

 #KT-9190 Fixed
2015-09-25 20:11:57 +03:00
Alexey Tsvetkov
7ef23da289 Clean all storages if incremental compilation is off 2015-09-25 20:11:57 +03:00
Alexey Tsvetkov
2bed8d0557 Test caches creation with turning incremental on/off 2015-09-25 20:11:57 +03:00
Alexey Tsvetkov
68437175f6 Enable disabling incremental compilation for tests 2015-09-25 20:11:57 +03:00
Alexey Tsvetkov
b6bbc4015b Write cache version only if incremental compilation is enabled 2015-09-25 20:11:57 +03:00
Alexey Tsvetkov
a3f2ccf72d Test that Kotlin incremental caches are created lazily 2015-09-25 20:11:57 +03:00
Alexey Tsvetkov
4b880f324a Access cache version file in tests using CacheVersionFormat 2015-09-25 20:11:56 +03:00
Alexey Tsvetkov
92d5b93cc7 Move incremental compilation enabled check from CacheFormatVersion to KotlinBuilder 2015-09-25 20:11:56 +03:00
Alexey Tsvetkov
0904b4bae8 Move CacheFormatVersion to separate file 2015-09-25 20:11:56 +03:00
Alexey Tsvetkov
5c9b962567 Create map so it will always be added to maps 2015-09-25 20:11:56 +03:00
Alexey Tsvetkov
a611dd9d25 Minor: remove unused function 2015-09-25 20:11:56 +03:00
Alexey Tsvetkov
b8388ae7ed Minor: remove unused ClassToSources map 2015-09-25 20:11:56 +03:00
Alexey Tsvetkov
fe390a04c5 Create Kotlin incremental caches only on write 2015-09-25 20:11:56 +03:00
Alexey Tsvetkov
c0b208275e Revert removing testDoNotCreateUselessKotlinIncrementalCaches
Removed by mistake in b25dfabbcc
2015-09-25 20:11:56 +03:00
Alexey Tsvetkov
8c7053552b Flush dataManager in KotlinJpsBuildTest 2015-09-25 20:11:55 +03:00
Mikhail Glukhikh
4b9d136ced identityEquals is deprecated 2015-09-25 20:00:54 +03:00
Yan Zhulanow
aada13c91f Deprecate @publicField 2015-09-25 19:51:07 +03:00
Yan Zhulanow
cc2d005984 Make lateinit diagnostics more clear 2015-09-25 19:51:06 +03:00
Dmitry Jemerov
32e6a6e3a1 inspection and quickfix to replace usages of deprecated package facades 2015-09-25 18:29:06 +02:00
Dmitry Jemerov
9de74921ca code review 2015-09-25 18:25:38 +02:00
Dmitry Jemerov
4e7236529c "move assignment to initializer" quickfix for assigning to properties in constructors/init blocks 2015-09-25 18:25:37 +02:00
Dmitry Jemerov
e1acc8744d "introduce backing property" intention 2015-09-25 18:25:37 +02:00
Dmitry Jemerov
dadef12723 backing field migration fixes 2015-09-25 18:25:36 +02:00
Yan Zhulanow
3d65b6fec2 Add extension function for BindingContext 2015-09-25 19:20:21 +03:00
Yan Zhulanow
6db9344659 Fix compiler tests 2015-09-25 19:20:20 +03:00
Yan Zhulanow
35362a0f3b Check 'operator' on next() and hasNext() 2015-09-25 19:20:19 +03:00
Yan Zhulanow
2c7f68ff71 Member and extension functions with 'operator' have now higher priority 2015-09-25 19:20:18 +03:00
Yan Zhulanow
1139a8dd0e Mark builtins and stblib functions with 'operator' 2015-09-25 19:20:18 +03:00
Yan Zhulanow
ce4bcbba6d Simple diagnostic on 'operator' keyword 2015-09-25 19:20:17 +03:00
Yan Zhulanow
43bf87e82d Add diagnostics on convention operator calls without an "operator" modifier on declaration site 2015-09-25 19:19:02 +03:00
Yan Zhulanow
fe744abc3c Mark componentN() in data classes with 'operator' 2015-09-25 19:17:25 +03:00
Stanislav Erokhin
d3b81cf376 Mute assert in ReferenceVariantsHelper for scopes.
Now there are several places, where we can get JetScope and write wrapper by LexicalScope key.
Assertions is minor here, because in worse case we just added some wrong descriptors to completion.
2015-09-25 19:10:04 +03:00
Stanislav Erokhin
37af3d994b Created util function addImportScope and use it in ShadowedDeclarationsFilter 2015-09-25 19:10:04 +03:00
Stanislav Erokhin
8ab4114291 Minor. Fix testdata. 2015-09-25 19:10:03 +03:00
Natalia Ukhorskaya
40554996f8 Minor. Fix file path for windows 2015-09-25 19:10:02 +03:00
Mikhail Glukhikh
0a0bfdacb1 Names containing only '_' are deprecated (declarations, parameters, import aliases, labels, but not backquoted names) 2015-09-25 18:57:58 +03:00
Mikhail Glukhikh
ebfb6c8468 private and override are no more compatible 2015-09-25 18:57:55 +03:00
Mikhail Glukhikh
9ccf1a1729 Partial rollback: 'private' is no more deprecated in interfaces, some tests rolled back accordingly 2015-09-25 18:57:52 +03:00
Denis Zharkov
505cb37052 Generate deprecated flag on getter of const val's 2015-09-25 18:12:45 +03:00
Valentin Kipyatkov
1c6ca9d036 Initial implementation of KT-5955 Completion for override methods
#KT-5955 Fixed
2015-09-25 18:12:18 +03:00
Michael Nedzelsky
15edbbb60c move service declaration to cli 2015-09-25 18:10:58 +03:00
Nikolay Krasko
ec411444d5 Do not substitute version in bootstrap build 2015-09-25 18:07:59 +03:00
Nikolay Krasko
2cf640463c Enable override version filter only for specific branch - allow auto-merge to other branches 2015-09-25 18:07:58 +03:00
Nikolay Krasko
35caa79019 Auto-increment version from script
This allows to have own version system on particular branch. It's planned to be enabled in release branches.
2015-09-25 18:07:58 +03:00
Mikhail Glukhikh
103bb320c8 Do not generate non-function/getter/setter (expression) annotations on anonymous functions 2015-09-25 17:46:38 +03:00
Mikhail Glukhikh
74ba21b40c Extra annotation target test for prefix expression 2015-09-25 17:46:36 +03:00
Mikhail Glukhikh
f06a79d534 KNPE fixed in data class checker together with some ID warnings #KT-9296 Fixed #EA-73584 Fixed 2015-09-25 17:46:33 +03:00
Mikhail Glukhikh
bd7ccc0138 Annotation on a function literal cannot be written to binary if it has FUNCTION target and the literal is inlined 2015-09-25 17:46:30 +03:00
Alexey Sedunov
6b9e2b0bbb Resource Bundles: Enable property key completion in string literals
#KT-6946 Fixed
2015-09-25 17:18:02 +03:00
Alexey Sedunov
594e4e5c31 Resource Bundles: Inspections on invalid property key/resource bundle references
#KT-6946 In Progress
2015-09-25 17:18:01 +03:00
Alexey Sedunov
44fd9d17ed Resource Bundles: Add Rename tests for bundle files and properties
#KT-6946 In Progress
2015-09-25 17:18:00 +03:00
Alexey Sedunov
5af4101f7d Resource Bundles: Implement references on Kotlin string literals
#KT-6946 In Progress
2015-09-25 17:17:59 +03:00
Ilya Chernikov
9c7d6c1649 Fixing KT-9196 (broken kotlin-compiler-embeddable.jar in M13) by excluding org.fusesource.jansi.internal.CLibrary from relocation, adding smoke test for embeddable jar 2015-09-25 16:13:03 +02:00
Natalia Ukhorskaya
3dd076efa8 Minor: extract function 2015-09-25 16:01:37 +03:00
Natalia Ukhorskaya
c872f301ff Fix steping for inline functions with reified parameters 2015-09-25 16:01:36 +03:00
Natalia Ukhorskaya
33b5e6b255 Fix stepping for inline functions inside when, if, try 2015-09-25 16:01:35 +03:00
Michael Nedzelsky
e92f14e49c increment version in KotlinJavaScriptMetaFileIndex in order to force rebuild indexes 2015-09-25 15:14:20 +03:00
Michael Nedzelsky
6013d3a527 code cleanup: fileIndexes 2015-09-25 15:14:15 +03:00
Michael Nedzelsky
b8ab8bcfca check for access to internal elements from another module in jps-plugin
hack for access from tests to internal declarations in production code

fix AbstractCompileKotlinAgainstKotinTest: add information about output directory in order to correct check for internal visibility.
2015-09-25 14:02:29 +03:00
Michael Nedzelsky
0b49195a03 add tests in KotlinJpsTest for check access to internal elements from another module 2015-09-25 14:02:26 +03:00
Michael Nedzelsky
ad274c5137 add tests for incremental compilation with changed internal class 2015-09-25 14:02:21 +03:00
Valentin Kipyatkov
c8a244cc40 Minor corrections on code review 2015-09-25 13:02:47 +03:00
Valentin Kipyatkov
db0578c187 Refactored code 2015-09-25 13:02:46 +03:00
Valentin Kipyatkov
22797114c7 J2K: correct handling of properties with "is" notation 2015-09-25 13:02:46 +03:00
Valentin Kipyatkov
c8b6db4e57 Renamed test data folder 2015-09-25 13:02:46 +03:00
Valentin Kipyatkov
ade9cbcafb Refactoring (+ slightly more correct logic) 2015-09-25 13:02:46 +03:00
Valentin Kipyatkov
c05232bbb7 J2K: generate accessor bodies in expression form if possible 2015-09-25 13:02:46 +03:00
Valentin Kipyatkov
ee5a853faa Generate accessor with delegation to super when it's necessary 2015-09-25 13:02:45 +03:00
Valentin Kipyatkov
b1b5af8e1e More correct detection of super property 2015-09-25 13:02:45 +03:00
Valentin Kipyatkov
8a0cd92aff Minor 2015-09-25 13:02:45 +03:00
Valentin Kipyatkov
e885657894 Minor api refactoring "isVal" -> "isVar" 2015-09-25 13:02:45 +03:00
Valentin Kipyatkov
320102bbdb J2K: get/set-methods converted to properties (but lot of TODOs left) 2015-09-25 13:02:45 +03:00
Denis Zharkov
3f6cadf9b7 Change FUNCTION_EXPRESSION_WITH_NAME severity to ERROR
Also drop deprecation related parts and get rid of usages of this `feature` within testData
2015-09-25 08:29:26 +03:00
Denis Zharkov
1d90b2e1fe Get rid of obsolete syntax in quickfixes changing lambda's signature
- Do not wrap parameters with '()'
- Do not set return type for them
- Fix existing testData
2015-09-25 08:29:26 +03:00
Denis Zharkov
31d2aa23f5 Remove ChangeType quickfix for lamdas with deprecated syntax 2015-09-25 08:29:26 +03:00
Denis Zharkov
60ebc689ad Drop diagnostic reported on lambda's return type
Because it's not allowed syntactically anymore.
Also adjust related methods within JetFunctionNotStubbed
2015-09-25 08:29:26 +03:00
Denis Zharkov
c6377a0664 Drop everything related to lambda syntax deprecation 2015-09-25 08:29:26 +03:00
Denis Zharkov
73799e2c3c Replace deprecated lambda syntax in testData
It's done with similar constructions where possible trying to preserve
intended behavior.
Some usages are removed because they test exactly the feature that
we are going to drop soon.
2015-09-25 08:29:25 +03:00
Denis Zharkov
5f69789636 Stop parsing lambdas with deprecated syntax 2015-09-25 08:29:25 +03:00
Zalim Bashorov
79ac436b9f Add tests for cases when add and remove custom accessors for val with smartcasted usage 2015-09-24 22:50:48 +03:00
Michael Nedzelsky
c6409138d8 Merge pull request #752 from JetBrains/rr/compile-service-3
compile service 3
2015-09-24 16:50:09 +03:00
Valentin Kipyatkov
f27c18b4a2 KT-8979 Completion of non-imported extension with "!" character corrupts code
#KT-8979 Fixed
2015-09-24 16:44:41 +03:00
Stanislav Erokhin
c2b1a5ee6d Removed unnecessary long checks. 2015-09-24 14:32:54 +03:00
Stanislav Erokhin
e4e6a600e1 Add performance hack for unInvalidate Files from stdlib in tests. 2015-09-24 14:32:54 +03:00
Stanislav Erokhin
9cc6d1cf58 Added check to ImportInsertHelperImpl that inserted import successfully imports descriptor 2015-09-24 14:07:51 +03:00
Stanislav Erokhin
88815c40cc Minor. Fix testdata. 2015-09-24 14:07:51 +03:00
Stanislav Erokhin
cdcf9f30b7 Minor. Fix compilation. 2015-09-24 14:07:51 +03:00
Stanislav Erokhin
fc9aa87a05 Report diagnostic on import with explicit import class if class was imported earlier. 2015-09-24 14:07:43 +03:00
Stanislav Erokhin
6c1738e11a Minor. Small refactoring of AllUnderImportsScope 2015-09-24 13:53:56 +03:00
Stanislav Erokhin
85895bec62 Improved error reporting, when we trying import invisible descriptor. 2015-09-24 13:53:56 +03:00
Stanislav Erokhin
d7a14075f1 Removed ImportPackage UI settings 2015-09-24 13:53:56 +03:00
Stanislav Erokhin
1360f3cd43 Fix visibility checker for import. 2015-09-24 13:53:55 +03:00
Michael Bogdanov
e5334ed9b8 Compare arrays via equals (not Arrays.equals) in data classes 2015-09-24 12:00:19 +03:00
Michael Bogdanov
cf57d56ab3 Don't generate private members in interface 2015-09-24 12:00:18 +03:00
Ilya Chernikov
4b1601974f Refactoring parts related to passing services to compiler in daemon, adding uniform support for cancellation check and lookup tracking 2015-09-24 10:44:44 +02:00
Ilya Chernikov
3c16b2de87 Converting KotlinCompilerRunner.java to kotlin - phase 3 - refactoring to more kotlin style 2015-09-24 10:42:54 +02:00
Ilya Chernikov
0047fb1272 Converting KotlinCompilerRunner.java to kotlin - phase 2 - converter + manual fixes 2015-09-24 09:56:26 +02:00
Ilya Chernikov
fffe6dd837 Converting KotlinCompilerRunner.java to kotlin - phase 1 - renaming to .kt to preserve history 2015-09-24 09:56:26 +02:00
Ilya Chernikov
886dc4b438 Refactoring daemon tests for more reusable code, adding instances test, minor fixes and improvements 2015-09-24 09:56:25 +02:00
Ilya Chernikov
c294a682de Utils for checking presense of certain lines in a sequence, using this tool for checking log after daemon builds in tests, fixing explicit daemon shutdown used in the test, some minor fixes 2015-09-24 09:56:24 +02:00
Michael Bogdanov
2e6b56691c Fix for: KT-8089 NoSuchFieldError
#KT-8089 Fixed
2015-09-24 09:36:46 +03:00
Yan Zhulanow
bc727a170b Add 'operator' keyword 2015-09-23 21:25:51 +03:00
Pavel V. Talanov
4a32993cc3 Ant build: apply -Xmultifile-package-facades while building stdlib and reflection jars only 2015-09-23 18:29:13 +03:00
Zalim Bashorov
967c8eae2e Minor: fix testdata files which were accidentally reformatted 2015-09-23 18:18:08 +03:00
Michael Nedzelsky
2c952dcc22 Revert "add isKotlinSourceElement method to Source interface in order to recognize kotlin source elements during compilation"
This reverts commit c342f6870a.
2015-09-23 17:45:47 +03:00
Michael Nedzelsky
031a42ccf4 Revert "add isIncremental method to PackageFragmentDescriptorImpl in order to recognize descriptors from incremental package fragments during compilation"
This reverts commit ddaebd2b27.
2015-09-23 17:45:45 +03:00
Michael Nedzelsky
ef8e7ea0bb Revert "add strict check for internal visibility during compilation"
This reverts commit d1ee58186f.
2015-09-23 17:45:42 +03:00
Michael Nedzelsky
01ece0faa4 Revert "fix tests (internal -> public)"
This reverts commit e86bf03e76.
2015-09-23 17:45:40 +03:00
Michael Nedzelsky
db602df146 Revert "add test for check access to internal elements from another module"
This reverts commit 4d9eaf19c3.
2015-09-23 17:45:38 +03:00
Dmitry Petrov
8595315ba5 - Package facade classes should have ACC_DEPRECATED
- Light classes for package facades should be deprecated
2015-09-23 17:41:13 +03:00
Dmitry Petrov
3cd1c222f0 Generate delegates to multifile class members in package facade classes
(unless using -Xmultifile-package-facades option)
2015-09-23 17:41:13 +03:00
Dmitry Petrov
5cdbdfc2cc - Annotate package facades with java.lang.Deprecated.
- Provide KotlinDelegatedMethod annotation on package facade members.
2015-09-23 17:41:12 +03:00
Mikhail Glukhikh
c4fb6d48c5 Object literals are now classes and expressions simultaneously for the purposes of annotation target checking 2015-09-23 16:47:07 +03:00
Mikhail Glukhikh
dd4601fd08 Function literal is now expression and function simultaneously for purposes of annotation target checking 2015-09-23 16:47:04 +03:00
Mikhail Glukhikh
997e9a7dd7 Multi declaration is now a separate target in KotlinTarget 2015-09-23 16:46:44 +03:00
Mikhail Glukhikh
789f351f6f data modifier is now inapplicable to enum classes, annotations, objects and interfaces #KT-8302 Fixed 2015-09-23 16:33:11 +03:00
Mikhail Glukhikh
315a304c8e New modifier checking strategy: only one error but any number of warnings, a warning can never shadow an error 2015-09-23 16:33:08 +03:00
Mikhail Glukhikh
55c7df8b8d Deprecations: data class should now have at least one primary constructor parameter, parameters should be val / var and not vararg. 2015-09-23 16:33:05 +03:00
Mikhail Glukhikh
3d6253c27f abstract + data and sealed + data are also deprecated 2015-09-23 16:33:02 +03:00
Mikhail Glukhikh
038d955c23 Data classes cannot have class supertypes, a new test, relevant test fixes 2015-09-23 16:33:00 +03:00
Mikhail Glukhikh
58110cd0d1 open + data and inner + data are deprecated, a new test, relevant test fixes 2015-09-23 16:32:57 +03:00
Mikhail Glukhikh
731fdecf06 private / protected / internal modifiers are deprecated in interfaces, relevant tests changed 2015-09-23 16:32:54 +03:00
Denis Zharkov
dcb84a7d0a Make annotations-modifiers private and fix some lost usages
It's needed to prevent usages of them as real annotation/type.
But we can't remove them, because currently some modifiers
are artificially resolved as annotations of those classes.
2015-09-23 12:18:12 +03:00
Denis Zharkov
4a993f517e Drop tailRecursive and it's usage 2015-09-23 12:18:12 +03:00
Denis Zharkov
098f5462eb Drop inlineOptions and fix forgotten usages 2015-09-23 12:18:12 +03:00
Denis Zharkov
67486b867b Get rid of inlineOptions usages in IDE tests 2015-09-23 12:18:12 +03:00
Denis Zharkov
e1e3a6c9ad Introduce const into decompiler and stub builder 2015-09-23 08:20:57 +03:00
Denis Zharkov
c13f0812e3 Temporary workaround for strange JvmName behavior 2015-09-23 08:20:57 +03:00
Denis Zharkov
d937a7cefc Generate field for const-val with same visibility as desciptor
Also add test checking that constant static final fields generated for them
2015-09-23 08:20:57 +03:00
Denis Zharkov
ba6671edb4 Minor. Drop unused constant JetTokens.ANNOTATION_MODIFIERS_KEYWORDS 2015-09-23 08:20:57 +03:00
Denis Zharkov
afd4e644a3 Report warning on usages of non-const vals in places where constants expected 2015-09-23 08:20:57 +03:00
Denis Zharkov
8d13f08271 Load static final fields of appropriate types from Java as const 2015-09-23 08:20:57 +03:00
Denis Zharkov
98dd08109d Serialize/Deserialize const modifier 2015-09-23 08:20:56 +03:00
Denis Zharkov
b2b76d16d0 Add checks for const modifier applicability
1. Must be initialized in-place
2. Can not be open/abstract
3. Can not be an override
4. Can not be delegated
5. Initializer must be a compile-time constant
6. No getters
7. `const` is not applicable to vars or locals
8. `const val` should be whether top-level property or object member
2015-09-23 08:20:56 +03:00
Denis Zharkov
bde58d6eb8 Introduce interface method: VariableDescriptor.isConst
And several default implementations
Also take it into account in renderer
2015-09-23 08:20:56 +03:00
Denis Zharkov
02b64ce1ed Parse const as soft modifier keyword 2015-09-23 08:20:56 +03:00
Denis Zharkov
4a3ac474ca Minor. Rename resolveValueArguments -> resolveAnnotationValueArguments 2015-09-23 08:20:56 +03:00
Denis Zharkov
bafb6cc2f7 Minor. Extract common code in ModifierChecker 2015-09-23 08:20:56 +03:00
Michael Nedzelsky
4d9eaf19c3 add test for check access to internal elements from another module
#KT-9178 Fixed
2015-09-23 07:49:33 +03:00
Michael Nedzelsky
e86bf03e76 fix tests (internal -> public) 2015-09-23 07:49:29 +03:00
Michael Nedzelsky
d1ee58186f add strict check for internal visibility during compilation 2015-09-23 07:49:27 +03:00
Michael Nedzelsky
ddaebd2b27 add isIncremental method to PackageFragmentDescriptorImpl in order to recognize descriptors from incremental package fragments during compilation 2015-09-23 07:49:23 +03:00
Michael Nedzelsky
c342f6870a add isKotlinSourceElement method to Source interface in order to recognize kotlin source elements during compilation 2015-09-23 07:49:21 +03:00
Michael Nedzelsky
bcd85aa30d changes some internal modifiers to public for elements which are used outside their modules 2015-09-23 07:49:17 +03:00
Valentin Kipyatkov
1afdb8d996 No nested classes auto-import 2015-09-23 01:42:19 +03:00
Valentin Kipyatkov
3d129522db Auto-import fix to use dependency rules (as in Java) 2015-09-23 01:42:19 +03:00
Valentin Kipyatkov
8f78b27462 Minor refactoring 2015-09-23 01:42:18 +03:00
Valentin Kipyatkov
232ab33c3a Minor 2015-09-23 01:42:18 +03:00
Valentin Kipyatkov
56b088233a KT-8179 Settings / "Add unambiguous imports on the fly" could work in Kotlin files too
#KT-8179 Fixed
2015-09-23 01:42:18 +03:00
Dmitry Kovanikov
e26fe0b080 Disable completion in repl 2015-09-22 21:11:56 +03:00
Dmitry Kovanikov
87969f1660 Minor: change repl.ideMode property name to kotlin.repl.ideMode 2015-09-22 21:11:55 +03:00
Dmitry Kovanikov
ab06dbfc70 Repl: add test to check multiline support 2015-09-22 21:11:54 +03:00
Dmitry Kovanikov
bfe01cccea Repl: fix bug in handling multiline commands 2015-09-22 21:11:54 +03:00
Alexander Udalov
4ca8a51234 Move Interner from deserialization to util
This class is not used in core and should not end up in kotlin-reflect.jar
2015-09-22 18:22:59 +03:00
Alexander Udalov
1878f892c1 Minor, fix annoying nullability warning 2015-09-22 18:22:58 +03:00
Alexander Udalov
e52a9b9fb8 Rename ClassDataProvider -> ClassDataWithSource 2015-09-22 18:22:58 +03:00
Alexander Udalov
0ef705f073 Minor, convert ClassData and PackageData to Kotlin data classes 2015-09-22 18:22:57 +03:00
Alexander Udalov
78e920f797 Minor, fix trove4j source paths 2015-09-22 18:22:57 +03:00
Alexander Udalov
e7b041456f Add missing module to Kotlin JPS plugin
Since binary version stopped being a simple int and became an instance of the
class BinaryVersion, and since incremental cache loads versions of classes, the
JPS plugin now needs to have the 'deserialization' module which has that class
to avoid ClassNotFoundException.

This fixes CNFE from the bare plugin
2015-09-22 18:22:56 +03:00
Alexander Udalov
f9ba7f6880 Minor, inline ClassData#read & PackageData#read to single usage 2015-09-22 18:22:56 +03:00
Alexander Udalov
4a8d2b73d3 Remove deprecated stuff unused after M13 2015-09-22 18:22:55 +03:00
Alexander Udalov
93b5065cf5 Get rid of SerializationUtil, move methods to DescriptorSerializer 2015-09-22 18:22:55 +03:00
Alexander Udalov
04b8991bdd Minor, move BuiltInsSerializerExtension to module builtins-serializer 2015-09-22 18:22:54 +03:00
Alexander Udalov
7cc416ed12 Minor, rename TRAIT -> INTERFACE, CLASS_OBJECT -> COMPANION_OBJECT 2015-09-22 18:22:54 +03:00
Alexander Udalov
a0fb1a18e3 Minor, delete useless methods from NameResolver 2015-09-22 18:22:54 +03:00
Michael Nedzelsky
34d4d2e7d9 ProtoCompareGenerated: get rid ofusage of internal details of NameResolver 2015-09-22 18:22:53 +03:00
Dmitry Jemerov
9b33721a98 don't try to add auto-import if user closed the project while the popup was displayed (EA-67037 - assert: ComponentManagerImpl.getComponent) 2015-09-22 16:11:38 +02:00
Dmitry Jemerov
7ae5506d99 don't create reports for empty elements (EA-67307 - assert: ProblemDescriptorBase.<init>) 2015-09-22 16:11:37 +02:00
Dmitry Jemerov
c669a06c97 return null instead of asserting on declarations with null name (EA-69471 - assert: JetSourceNavigationHelper.convertPropertyOrFunction) 2015-09-22 16:11:36 +02:00
Dmitry Jemerov
0febe3322b don't register template listener if we don't have an editor (EA-70683 - KNPE: OverrideImplementMethodsHandler.invoke) 2015-09-22 16:11:36 +02:00
Dmitry Jemerov
e7a0f077f0 according to Peter, getting a PCE from indexes is a valid situation, don't log this as an error (EA-73265 - assert: KotlinCopyPasteReferenceProcessor.collectTransferableData) 2015-09-22 16:11:35 +02:00
Dmitry Jemerov
55b422ab9b remove 'public' modifier from default file templates 2015-09-22 16:07:48 +02:00
Dmitry Jemerov
c5309d7955 to avoid deadlock, don't refresh VFS during service initialization, instead refresh asynchronously during plugin initialization 2015-09-22 15:11:42 +02:00
Dmitry Jemerov
51ee1b3e5a do not cache binary contents when trying to check if a .class file is compiled with Kotlin 2015-09-22 15:08:28 +02:00
Zalim Bashorov
98867addc9 Regenerate tests for JS reserved words 2015-09-22 15:00:38 +02:00
Zalim Bashorov
a1979b6eb4 Regenerate tests for JS reserved words when cases changed 2015-09-22 15:00:37 +02:00
Dmitry Jemerov
4ca434da54 remove support for 'trait' keyword 2015-09-22 15:00:24 +02:00
Mikhail Glukhikh
86833c1a74 Migration to new backing field syntax 2015-09-22 10:15:52 +03:00
Alexey Sedunov
b4efe33efa IDEA 142.4859.6: Update LineNumberTestGenerated test data (due to IDEA's ASM upgrade to 5.0.4 which supports multiline labels) 2015-09-21 18:07:46 +03:00
Alexey Sedunov
8603a36404 IDEA 142.4859.6: Invalidate library cache in setUp() to prevent access to
ClsFiles invalidated by the previous test
2015-09-21 18:07:44 +03:00
Alexey Sedunov
a892d3f995 IDEA 142.4859.6: Update dependencies and fix compilation 2015-09-21 18:07:43 +03:00
Dmitry Petrov
39e0b3ab92 fix testData related to JvmName retention 2015-09-21 17:33:06 +03:00
Mikhail Glukhikh
d337283b52 "field": more accurate creation of synthetic field 2015-09-21 15:48:14 +03:00
Mikhail Glukhikh
831df27cac "field": refactoring, isBackingFieldReference, referencedProperty 2015-09-21 15:48:11 +03:00
Mikhail Glukhikh
ad302fcfba "field": control of accessor parameter name shadowing, test 2015-09-21 15:48:08 +03:00
Mikhail Glukhikh
4f3e3610a0 NPE fixed inside three implementations of LexicalScope.printStructure 2015-09-21 15:48:06 +03:00
Mikhail Glukhikh
c24156ae84 "field": backing field usage deprecated warning, relevant diagnostics tests changed 2015-09-21 15:48:03 +03:00
Mikhail Glukhikh
a1e3471d92 "field": deprecated warnings introduced, compiler tests migrated to the new syntax 2015-09-21 15:48:00 +03:00
Mikhail Glukhikh
028e0ec59a "field": JS translation 2015-09-21 15:47:57 +03:00
Mikhail Glukhikh
094c6cebc3 "field": highlighting fix, including color schemes and example 2015-09-21 15:47:55 +03:00
Mikhail Glukhikh
9939f96c09 "field" reassignment: fix and test 2015-09-21 15:47:52 +03:00
Mikhail Glukhikh
9f640b00d9 "field": synthetic variable creation in accessors, codegen changed accordingly, a set of tests, relevant code fix (j2k) 2015-09-21 15:47:49 +03:00
Pavel V. Talanov
6282a16013 Minor: remove duplicate registering of module name 2015-09-21 14:41:38 +03:00
Dmitry Kovanikov
e4f44d7754 [cli-repl] Small refactoring
Add `flushHistory` to ReplCommandReader
Pass `WhatNextAfterOneLine` to `readLine`
2015-09-21 14:41:37 +03:00
Dmitry Kovanikov
8aa701ec2d [ide-console] Minor: highlight error if its range offsets are equal 2015-09-21 14:41:37 +03:00
Dmitry Kovanikov
cc2e320228 [cli-repl] More accurate line breaks handling 2015-09-21 14:41:36 +03:00
Dmitry Kovanikov
18304c7d7b [cli-repl] Create wrapper for console reader 2015-09-21 14:41:35 +03:00
Dmitry Kovanikov
4aa5a90370 [cli-repl] Minor: change API to support ABI reporting 2015-09-21 14:41:35 +03:00
Dmitry Kovanikov
ad49272b3b [ide-console] Minor: change pathSeparator variable 2015-09-21 14:41:34 +03:00
Pavel V. Talanov
30d675d49f Repl: fix paths on windows 2015-09-21 14:41:34 +03:00
Pavel V. Talanov
8a944e099e Minor: use proper utility in ReplErrorLogger 2015-09-21 14:41:33 +03:00
Dmitry Kovanikov
3f44fe5955 [cli-repl] Optimize System.in to send "change indicator" message only when readLine is called 2015-09-21 14:41:32 +03:00
Dmitry Kovanikov
1f4fab0047 [ide-console] Add all paths of compiled module (production, test) 2015-09-21 14:41:32 +03:00
Dmitry Kovanikov
ac6a9d95af [test] Fix testData for AbstractReplInterpreterTest 2015-09-21 14:41:31 +03:00
Dmitry Kovanikov
9bf0c8453d [cli-repl][ide-console] Add logging of internal errors
Rename `jvmStatic` to `@JvmStatic`
2015-09-21 14:41:30 +03:00
Dmitry Kovanikov
38285496cb [ide-console] Different refactoring
No more redundant trims and adding of line breaks
Remove concurrent map from editors
Rename IconPack to IconWithTooltip
Some minor changes
2015-09-21 14:41:30 +03:00
Dmitry Kovanikov
bd52462420 [ide-console] Add tooltips to all icons 2015-09-21 14:41:29 +03:00
Dmitry Kovanikov
b4224bf9f3 [ide-console][cli-repl] Add more icons for readLine commands 2015-09-21 14:41:29 +03:00
Dmitry Kovanikov
724b208a5d [test] Add readLine() tests 2015-09-21 14:41:28 +03:00
Dmitry Kovanikov
42c0396308 [cli-repl] Support readLine() during repl session 2015-09-21 14:41:27 +03:00
Dmitry Kovanikov
00a117f089 [test] Add tests on simple commands 2015-09-21 14:41:27 +03:00
Dmitry Kovanikov
6d8c6857b8 [ide-console] Add folding to history commands 2015-09-21 14:41:26 +03:00
Dmitry Kovanikov
48866fbeeb [ide-console] Remove INCOMPLETE support from ide console 2015-09-21 14:41:25 +03:00
Dmitry Kovanikov
fcc5fa13f3 [ide-console] Move warning messages about compilation inside consoleView 2015-09-21 14:41:25 +03:00
Dmitry Kovanikov
058b539004 [ide-console][cli-repl] Decorations for smooth console view
Icons on history commands
Linebreaks between `command-result` blocks
Exceptions stacktrace and icons
Bold invitation
2015-09-21 14:41:24 +03:00
Dmitry Kovanikov
3271fae7ac [ide-console] Show warning notification after Build and Restart action in case of failed compilation 2015-09-21 14:41:24 +03:00
Dmitry Kovanikov
43f3c9d603 [ide-console] Disable setting of moduleInfo to console editor JetFile 2015-09-21 14:41:23 +03:00
Dmitry Kovanikov
740f311af6 [test] Fix testOnRunPossibility 2015-09-21 14:41:22 +03:00
Dmitry Kovanikov
3152792860 [ide-console][bug-fixes] Disable process on closed dialog window
Fix history bugs (lost completion focus, occasional flush)
Faster incomplete icon change
Correct console window title
Other small gui decorations
2015-09-21 14:41:22 +03:00
Dmitry Kovanikov
b19010184a [ide-console] String constants small refactoring 2015-09-21 14:41:21 +03:00
Dmitry Kovanikov
27e015c406 [ide-console] Add 'Build and restart' button on console toolbar; 'build and restart' warning notification for outdated classes with action link 2015-09-21 14:41:20 +03:00
Dmitry Kovanikov
5548647fd3 [ide-console] Choose module popup dialog 2015-09-21 14:41:20 +03:00
Dmitry Kovanikov
a17363459a [cli-repl][ide-console] Show runtime errors in IDE console 2015-09-21 14:41:19 +03:00
Dmitry Kovanikov
e23441907c [cli-repl][ide-console] Correct escaping 2015-09-21 14:41:19 +03:00
Dmitry Kovanikov
e4ffe8b145 [ide-console] Load repl with module and its dependencies classpath 2015-09-21 14:41:18 +03:00
Dmitry Kovanikov
cb5ff094bf [ide-console] Highlight repl process output
Add icons on gutter
Send messages to process in xml
2015-09-21 14:41:17 +03:00
Dmitry Kovanikov
cb1756f5fa [cli-repl] Error render and XML-interop with IDE console 2015-09-21 14:41:17 +03:00
Dmitry Kovanikov
a11f411f7d Add kotlin console repl 2015-09-21 14:41:16 +03:00
Dmitry Petrov
80cbee83ee JvmName should have @Retention(AnnotationRetention.BINARY)
(TODO: fix JVM BE)
2015-09-21 14:24:09 +03:00
Dmitry Petrov
da026f1480 Report errors for annotations with BINARY or RUNTIME retention on file classes. 2015-09-21 12:11:53 +03:00
Dmitry Petrov
eba9f0f0ad Change JvmName retention to SOURCE 2015-09-21 12:10:46 +03:00
Dmitry Petrov
7f4ae52517 Generate annotations for single-file classes. 2015-09-21 12:10:40 +03:00
Ilya Gorbunov
b179b861a6 Drop old array constructor function names from compile time constant recognizable expressions. 2015-09-19 05:05:04 +03:00
Ilya Gorbunov
ab88d49567 Drop deprecated stuff 2015-09-19 05:04:53 +03:00
Ilya Gorbunov
439d1026bf Fix deprecations in js and java tests. 2015-09-19 05:04:41 +03:00
Ilya Gorbunov
7f7cc02256 Fix deprecations in testData: partial body resolve tests. 2015-09-19 05:04:28 +03:00
Ilya Gorbunov
0e3e33e5c1 Fix deprecations in testData: js semantics. 2015-09-19 05:04:05 +03:00
Ilya Gorbunov
92e66b0d81 Fix deprecations in testData: smart completion and find usages 2015-09-19 04:33:31 +03:00
Ilya Gorbunov
9c974b6c5c Fix deprecations in testData: BlackBoxWithStdLibCodegenTest 2015-09-19 04:33:20 +03:00
Ilya Gorbunov
74e1dbff76 Fix deprecations in testData: stepping and evaluate expression tests. 2015-09-19 04:33:08 +03:00
Ilya Gorbunov
e40a5457e3 Fix deprecations in testData: arrayOf usages. 2015-09-19 04:32:56 +03:00
Michael Nedzelsky
ae7cc8e430 tests for comparison of changes in classes 2015-09-19 00:14:07 +03:00
Michael Nedzelsky
df283c8f02 add protoDifferenceUtils and implementation for calculation difference between proto data for classes. 2015-09-19 00:14:04 +03:00
Michael Nedzelsky
4a67cde283 HashSetUtil: add symmetricDifference 2015-09-19 00:14:01 +03:00
Michael Nedzelsky
4c9ec56bc8 GenerateProtoBufCompare: optimization and generate difference and hashCode methods 2015-09-19 00:13:58 +03:00
Michael Nedzelsky
a8e1c1f7d3 move Interner.java to deserialization module 2015-09-19 00:13:55 +03:00
Michael Nedzelsky
be875d797f descriptors.proto: add skip_in_comparison option for (prepared to retire) constructor field in Class message 2015-09-19 00:13:51 +03:00
Michael Nedzelsky
20bae99166 GenerateProtoBufCompare: do not generate unnecessary empty lines 2015-09-19 00:13:48 +03:00
Ilya Gorbunov
4d8977ea32 Provide required imports for deprecation replacement of Delegates.mapVal and mapVar. 2015-09-18 22:00:03 +03:00
Stanislav Erokhin
68389d34e4 Optimized task creation for local functions and variables 2015-09-18 21:01:22 +03:00
Stanislav Erokhin
d3df04036e Minor. Removed parameter bindingTrace from CallableDescriptorCollector 2015-09-18 21:01:22 +03:00
Stanislav Erokhin
0d12499039 Minor. Changed JetScope to LexicalScope in TaskPrioritizerContext 2015-09-18 21:01:21 +03:00
Stanislav Erokhin
8a0f175135 Minor. Suppressed test for KT-9204. 2015-09-18 21:00:23 +03:00
Stanislav Erokhin
40c7c14aa7 Minor. Use util function getResolutionScope() 2015-09-18 21:00:23 +03:00
Stanislav Erokhin
2373cc3ede Minor. Small refactoring in QualifiedExpressionResolver 2015-09-18 21:00:22 +03:00
Stanislav Erokhin
b51edf9004 Fixed completion for package, import directive and user type. 2015-09-18 21:00:22 +03:00
Stanislav Erokhin
81934b75c2 Suppressed inserting of package import from ImportInsertHelperImpl 2015-09-18 21:00:22 +03:00
Stanislav Erokhin
1614de86d2 Support package directive for types 2015-09-18 21:00:21 +03:00
Stanislav Erokhin
ea991de21a Minor. Renamed NewQualifiedExpressionResolver to QualifiedExpressionResolver 2015-09-18 21:00:21 +03:00
Stanislav Erokhin
b1b556c0c9 Removed unused old QualifiedExpressionResolver 2015-09-18 21:00:20 +03:00
Stanislav Erokhin
69cb3f818d Use NewQualifiedExpressionResolver for resolve types 2015-09-18 21:00:20 +03:00
Stanislav Erokhin
8efbf4fc32 Fixed testdata -- removed package import 2015-09-18 21:00:20 +03:00
Stanislav Erokhin
387d16d1d5 Regenerate RangesCodegenTest 2015-09-18 21:00:19 +03:00
Stanislav Erokhin
3f2e2deea1 Minor. Improver import resolve, when some error happened 2015-09-18 21:00:19 +03:00
Stanislav Erokhin
e3d088755a Moved package directive resolve to NewQualifiedExpressionResolver 2015-09-18 21:00:18 +03:00
Stanislav Erokhin
f8a018ae27 Introduced NewQualifiedExpressionResolver 2015-09-18 21:00:18 +03:00
Stanislav Erokhin
9b0182eb71 Fixed method getParent() for JetExpressionImplStub 2015-09-18 21:00:17 +03:00
Stanislav Erokhin
2af5b24db2 Fix maven build compilation 2015-09-18 21:00:17 +03:00
Stanislav Erokhin
286d39b866 Import names from singleton but show CANNOT_IMPORT_ON_DEMAND_FROM_SINGLETON error 2015-09-18 21:00:17 +03:00
Stanislav Erokhin
5786e620e8 Minor. remove import package usages from sources 2015-09-18 21:00:16 +03:00
Stanislav Erokhin
9dee696847 Minor. remove import package usage from jdiEval.kt, jdiValues.kt and jdiTest.kt 2015-09-18 21:00:16 +03:00
Stanislav Erokhin
fb14979051 Created object java.util.Collections as workaround for js-stdlib. 2015-09-18 21:00:15 +03:00
Stanislav Erokhin
377f752837 Minor. Moved deserialized util functions from top-level to object 2015-09-18 21:00:15 +03:00
Dmitry Jemerov
bcb88d78dd remove unnecessary injection of ConfigurableEP (causes problems in Android Studio) 2015-09-18 19:57:19 +02:00
Yan Zhulanow
c458e33cd1 Fix .java files compilation in android-compiler-plugin 2015-09-18 20:47:16 +03:00
Zalim Bashorov
27a196b25b Track lookups for conventions 2015-09-18 18:31:19 +03:00
Zalim Bashorov
f7e2c127b7 Switch to use FakeCallResolver in DelegatedPropertyResolver 2015-09-18 18:31:18 +03:00
Zalim Bashorov
760571c2a3 Minor: fix warnings in JetObjectDeclaration.kt 2015-09-18 18:31:18 +03:00
Zalim Bashorov
c82e8f45ea Minor: make JetClass::createPrimaryConstructorIfAbsent & JetClass::createPrimaryConstructorParameterListIfAbsent extension function and move to idea module 2015-09-18 18:31:16 +03:00
Valentin Kipyatkov
08a267adaa Removed attempt to import kotlin.jvm.JvmStatic which is not needed anyway 2015-09-18 15:44:19 +03:00
Valentin Kipyatkov
0cc2158ec1 J2K: do not produce redundant "internal" words for members in an internal class 2015-09-18 15:44:19 +03:00
Valentin Kipyatkov
367b32c309 Adapted IDE to no explicit return type required for public declarations 2015-09-18 15:44:19 +03:00
Valentin Kipyatkov
1708ac8da3 Reused code 2015-09-18 15:44:19 +03:00
Valentin Kipyatkov
de3eeb3a4f More correct + reused code 2015-09-18 15:44:19 +03:00
Valentin Kipyatkov
7caccd7578 J2K: all annotations should be with "@" 2015-09-18 15:44:18 +03:00
Valentin Kipyatkov
cc4aa6ed21 J2K: preserving of visibility modifier for override members when access level was higher 2015-09-18 15:44:18 +03:00
Valentin Kipyatkov
6f12db9cde J2K: no explicit type required for public declarations 2015-09-18 15:44:18 +03:00
Valentin Kipyatkov
c3ddd5d32b J2K: adapted for default visibility modifier 'public' 2015-09-18 15:44:18 +03:00
Valentin Kipyatkov
1ccbda6af4 Do not insert explicit visibility modifier if it's default 2015-09-18 15:44:17 +03:00
Valentin Kipyatkov
8ba7f2c238 KT-9128 ReplaceWith incorrectly converts javaClass<X>() to X::class.java for type with arguments
#KT-9128 Fixed
2015-09-18 15:44:17 +03:00
Valentin Kipyatkov
f2b67966ce EA-72489
#EA-72489 Fixed
2015-09-18 15:44:17 +03:00
Valentin Kipyatkov
2f09b38504 Additional diagnostic for EA-72697 2015-09-18 15:44:17 +03:00
Valentin Kipyatkov
e1f242c346 Fixed EA-72699
#EA-72699 Fixed
2015-09-18 15:44:17 +03:00
Valentin Kipyatkov
1ee79c1b3e Added RemoveExplicitSuperQualifier inspection to code cleanup 2015-09-18 15:44:16 +03:00
Valentin Kipyatkov
fb72786392 No ReplaceWith for locals 2015-09-18 15:44:16 +03:00
Valentin Kipyatkov
452cd49c5e Disallowed @Deprecated for local variables and parameters 2015-09-18 15:44:16 +03:00
Valentin Kipyatkov
5d09edb3e6 Adapted code cleanup feature implementation to the recent changes in IDEA 2015-09-18 15:44:16 +03:00
Dmitry Jemerov
93f2e4b22c set parameter nullability according to how the method is actually called (EA-73047 - IAE: KotlinQuickDocumentationProvider.getQuickNavigateInfo) 2015-09-18 14:02:49 +02:00
Dmitry Jemerov
5f6ac10cb7 another missing read action (EA-72578 - assert: SharedImplUtil.getParent) 2015-09-18 14:02:48 +02:00
Dmitry Jemerov
a7df8863f7 don't try to insert parentheses if live template has been cancelled (EA-61976 - assert: DocumentImpl.insertString); don't store Editor instances in a static map to avoid memory leaks 2015-09-18 14:00:08 +02:00
Dmitry Jemerov
33d70b1a57 MakeOveriddenMembersOpen: J2K, cleanup, de-i18n 2015-09-18 13:56:50 +02:00
Dmitry Jemerov
1fee5c23e0 MakeOverriddenMemberOpen: rename to .kt 2015-09-18 13:56:48 +02:00
Denis Zharkov
9dada595b6 Replace deprecated annotations with modifiers in testData 2015-09-18 10:14:41 +03:00
Denis Zharkov
4850fd10f0 Regenerate test data containing rendered descriptors
Introduced '@' after each annotation
2015-09-18 10:14:39 +03:00
Denis Zharkov
7ea7e3cc7c Render '@' before each annotation 2015-09-18 10:14:38 +03:00
Denis Zharkov
f518348565 Revert "Support decapitilized obsolete annotations in resolve"
This reverts commit 4159c83282.
2015-09-18 10:14:37 +03:00
Denis Zharkov
53bccec50d Capitalize copies of JVM annotations for js stdlib 2015-09-18 10:14:35 +03:00
Denis Zharkov
e401a98a2b Replace native with @native in js testData 2015-09-18 10:14:34 +03:00
Denis Zharkov
9adde77c47 Replace inlineOption(ONLY_LOCAL_RETURN) with crossinline in testData 2015-09-18 10:14:33 +03:00
Denis Zharkov
bae3320d52 Get rid of deprecated annotations in testData 2015-09-18 10:14:32 +03:00
Denis Zharkov
eebe66e041 Minor. Fix test with obsolete enum syntax 2015-09-18 10:14:31 +03:00
Denis Zharkov
05eaf37123 Get rid of deprecated annotations and modifiers in js-stdlib 2015-09-18 10:14:30 +03:00
Denis Zharkov
5cecaa6f87 Get rid of deprecated annotations and modifiers in stdlib (besides JS) 2015-09-18 10:14:28 +03:00
Denis Zharkov
9c4564a5a6 Get rid of deprecated annotations and modifiers in project code 2015-09-18 09:34:27 +03:00
Denis Zharkov
02aafe4262 Report syntax error on unescaped annotation
Also adjust parser testData
2015-09-18 09:34:26 +03:00
Denis Zharkov
3adeb966b5 Minor. Drop dead branch in parser 2015-09-18 09:34:26 +03:00
Denis Zharkov
daa2c8372d Do not parse '@' as a part of modifier 2015-09-18 09:34:25 +03:00
Denis Zharkov
23ddf42981 Use JvmStatic in reflection instead of decapitalized 2015-09-18 09:34:25 +03:00
Denis Zharkov
38bafaa35c Drop annotations deprecation related things: diagnostics, quickfixes 2015-09-18 09:34:25 +03:00
Alexander Udalov
787d392df0 Update .idea/encodings.xml due to latest changes in IDEA EAP 2015-09-17 21:15:22 +03:00
Alexander Udalov
57c81e9cbe Disallow arrays as upper bounds of type parameters
#KT-9189 Fixed
2015-09-17 21:15:20 +03:00
Ilya Gorbunov
e95be9096e Revert unification of operations on Array<T> and Array<out T> (copyOf, copyOfRange) which return the same type as the receiver.
Leave sortedArray, reversedArray and sliceArray only for covariant projection of array as the receiver.
2015-09-17 21:15:11 +03:00
Valentin Kipyatkov
c12f44fa22 Use TypeResolver instead of analyzing artificial type cast expression 2015-09-17 18:54:12 +03:00
Zalim Bashorov
63947904b5 Minor: don't crash when action event doesn't contain project CreateIncrementalCompilationBackup
#EA-68453 Fixed
2015-09-17 15:45:16 +03:00
Zalim Bashorov
1b00eb3a17 Minor: report error instead of crash with exceptions when collect JetFiles to compile and remove obsolete (wrong now) code
#EA-61681 Obsolete
2015-09-17 15:45:16 +03:00
Ilya Gorbunov
909cbc6817 Eliminate deprecated language constructions from the generated code. 2015-09-17 02:41:01 +03:00
Alexey Sedunov
0a32e5a96d Extraction Engine: Support references to synthetic properties 2015-09-17 01:33:25 +03:00
Alexey Sedunov
0fbcf0b958 Extraction Engine: Report conflict on all diagnostics from UNRESOLVED_REFERENCE group
#KT-9117 Fixed
2015-09-17 01:33:23 +03:00
Alexey Sedunov
767897dccf Extraction Engine: Replace receiver occurrences with 'this' when necessary 2015-09-17 01:33:22 +03:00
Alexey Sedunov
b80720209e Extraction Engine: Skip containers enclosing object declaration (aside of other object declarations and containing file) 2015-09-17 01:33:21 +03:00
Alexey Sedunov
34b279a7a8 Extraction Engine: Do not add variance to type parameters in generated declaration 2015-09-17 01:33:19 +03:00
Alexey Sedunov
4f7b978bbc Pull Up: Disable "Refactor" button if no members are selected 2015-09-17 01:33:18 +03:00
Alexey Sedunov
ac35f747d1 Pull Up: Fix UI for J2K case 2015-09-17 01:33:16 +03:00
Mikhail Glukhikh
7dbd5b75cc Expected return type is in use now during function literal analysis #KT-9134 Fixed 2015-09-16 17:12:41 +03:00
Mikhail Glukhikh
65b77558a1 Data flow value converted to Kotlin 2015-09-16 16:56:45 +03:00
Mikhail Glukhikh
71f09a89d4 Preliminary loop visitor converted to Kotlin 2015-09-16 15:55:44 +03:00
Mikhail Glukhikh
15e46ebc2b Refactoring: DataFlowValue.Kind introduced 2015-09-16 15:38:32 +03:00
Mikhail Glukhikh
8348f204cd Refactoring: base class extracted from PreliminaryLoopVisitor 2015-09-16 15:04:58 +03:00
Mikhail Glukhikh
aa3a7c2838 Data flow info for arguments: nullability refactoring 2015-09-16 15:04:56 +03:00
Mikhail Glukhikh
1667f18d7c Receiver of a safe call is not null inside the call also for extension functions + a pair of tests #KT-9033 Fixed 2015-09-16 15:04:41 +03:00
Mikhail Glukhikh
22229af930 Annotation / modifier checking for setter parameters / for variables / multi declarations, tests, relevant test changes #KT-9145 Fixed 2015-09-16 09:51:37 +03:00
Mikhail Glukhikh
f1fcb14f44 Suppress warning intention fix: now multi declaration is not a possible intention target but its initializer is, relevant test fixes 2015-09-16 09:51:31 +03:00
Alexander Udalov
9feb82c268 Do not decompile old incompatible package parts
Fix the test by reverting 282727b
2015-09-16 03:27:11 +03:00
Alexander Udalov
2b269b2652 Improve ABI version error reporting in the compiler
- only report ABI errors if there's at least one other error
- append additional helpful information to the "unresolved reference" error
2015-09-16 01:44:27 +03:00
Alexander Udalov
d98b3433eb Fix ABI version diagnostic for old package facades
Restore the test data that was erroneously replaced in 84649e4
2015-09-16 01:44:27 +03:00
Alexander Udalov
4bc257bd73 Minor refactoring in LazyJavaPackageScope 2015-09-16 01:44:27 +03:00
Alexander Udalov
8e83e1c17a Fix testIncompleteHierarchyInKotlin on Windows 2015-09-15 19:58:25 +03:00
Dmitry Jemerov
6f902823d5 Merge branch 'rr/yole/verify-ignore-perf' 2015-09-15 17:18:48 +02:00
Dmitry Jemerov
81d0b6c109 verify.groovy: ignore PERF output 2015-09-15 16:24:18 +02:00
Michael Nedzelsky
d5f9382d56 fix for EA-68992 (JS) IPBE: UninitializedMessageException.asInvalidProtocolBufferException. 2015-09-15 16:08:13 +03:00
Michael Nedzelsky
bd67a2a9ff Minor: get rid of warnings: KotlinJavaScriptLibraryManager, KotlinJavaScriptMetaFileSystem 2015-09-15 16:08:10 +03:00
Michael Nedzelsky
ff73388cf3 tests for EA-68992 (JS) IPBE: UninitializedMessageException.asInvalidProtocolBufferException. 2015-09-15 16:08:07 +03:00
Alexander Udalov
296212eab1 Merge two JetTypeMapper#mapToCallableMethod methods 2015-09-15 15:55:20 +03:00
Alexander Udalov
7c0780455a Remove unused parameter of JetTypeMapper#mapOwner, simplify lots of code 2015-09-15 15:55:20 +03:00
Alexander Udalov
90cef6553c Delete all references to removed package 'kotlin.modules' 2015-09-15 15:55:19 +03:00
Alexander Udalov
c7c9ec35cf Improve LoadBuiltinsTest, load built-ins from dist/kotlin-runtime.jar 2015-09-15 15:55:19 +03:00
Dmitry Jemerov
35d9880266 don't initialize Kotlin caches if there is no Kotlin code to compile 2015-09-15 14:21:01 +02:00
Alexander Udalov
296512ffc4 Minor, remove useless code and fix warnings 2015-09-15 13:11:17 +03:00
Alexander Udalov
949144e0c0 Report incomplete hierarchy error for deserialized types
#KT-5129 Fixed

Delete a JPS test that was specifically testing that we would not fail in this
situation; now there's a compilation error
2015-09-15 13:11:17 +03:00
Alexander Udalov
b1d9e5c961 Minor, improve exception message for reflection on built-ins 2015-09-15 13:11:16 +03:00
Alexander Udalov
b4470de713 Improve inline diagnostics, report "nothing to inline" on the modifier 2015-09-15 13:11:16 +03:00
Alexander Udalov
a946f787bc Fix exception from data class codegen for light classes
EA-66827
2015-09-15 13:11:16 +03:00
Dmitry Petrov
47b8853051 Generate light classes for single-file facades using PackageCodegen. 2015-09-15 10:25:40 +03:00
Dmitry Jemerov
d499103468 fix JetSafeDeleteTest 2015-09-14 21:46:23 +02:00
Dmitry Petrov
b63eed44fe Advance ABI version (due to stdlib binary layout changes) 2015-09-14 21:58:01 +03:00
Dmitry Petrov
ef6da03db2 Do not generate facade for single-file light classes 2015-09-14 21:26:33 +03:00
Pavel V. Talanov
d6a9551392 Do not generate parts of multifile facade when building light classes
Building facade class is enough for this purpose
2015-09-14 19:40:11 +03:00
Pavel V. Talanov
54bcbc7a02 Introduce ClsJavaStubByVirtualFileCache
Avoid caching in user data of virtual file because it leads to project leaking
2015-09-14 19:40:10 +03:00
Alexey Sedunov
708f7fc51f Change Signature: Fix processing of top-level declarations usages in Java (old/new package facades are supported) 2015-09-14 18:05:06 +02:00
Dmitry Jemerov
9e6c0e7ee2 code review 2015-09-14 18:05:00 +02:00
Dmitry Jemerov
3cf6395750 move supports new facades 2015-09-14 18:04:58 +02:00
Dmitry Jemerov
d67fb670b7 safe delete supports new facades 2015-09-14 18:04:58 +02:00
Dmitry Jemerov
c81f1d314c call hierarchy supports new facades 2015-09-14 18:03:57 +02:00
Dmitry Jemerov
35de13a6b2 update Java references to file class when a file is renamed 2015-09-14 18:03:55 +02:00
Dmitry Jemerov
ab58dc3586 allow returning multiple PsiMethod wrappers for a JetFunction or JetPropertyAccessor; use that for handling Java usages through old-style and new-style facades
#KT-9102 Fixed
2015-09-14 18:03:55 +02:00
Dmitry Jemerov
4d09280aa8 LightClassUtil: J2K 2015-09-14 18:03:54 +02:00
Dmitry Jemerov
043c961b57 LightClassUtil: rename to .kt 2015-09-14 18:03:53 +02:00
Dmitry Petrov
f4e9d9a7a0 Fix navigation to decompiled multifile class members. 2015-09-14 17:59:17 +03:00
Dmitry Petrov
50ff2a3ad2 Multifile facade should contain reflection data,
otherwise callable references to stdlib functions will not work in the migration scheme.
2015-09-14 17:47:49 +03:00
Dmitry Petrov
5d0243d46f Fix incremental compilation tests 2015-09-14 17:47:49 +03:00
Valentin Kipyatkov
08e7a9d826 Made methods generated from declarations marked with @HiddenDeclaration synthetic in JVM 2015-09-14 17:42:40 +03:00
Valentin Kipyatkov
aec661aeff Fixed assertion in j2k on updating external usages 2015-09-14 17:26:52 +03:00
Mikhail Glukhikh
67f714434f Error message on JVM repeated annotation changed 2015-09-14 16:20:07 +03:00
Alexander Udalov
dcd7464ae1 Fix NPE from REPL initialization 2015-09-14 13:23:17 +03:00
Mikhail Glukhikh
b4399b8b8b AnnotationTarget.CLASSIFIER and KotlinTarget.CLASSIFIER both dropped (second step) 2015-09-14 12:51:11 +03:00
Dmitry Petrov
1586a2df8e Make stdlib work with -Xmultifile-package-facades.
Fixed wrong owner mapping in presence of -Xmultifile-package-facades.
Fixed backing field mapping issue.
Added more tests.
2015-09-14 11:26:29 +03:00
Dmitry Petrov
838433ba8a - call multifile class members (compiling against binaries)
- inline multifile class members
HACK? scope-based part/facade resolution
2015-09-14 11:25:42 +03:00
Dmitry Petrov
50f83da6da - call multifile class members (compiling against binaries)
- inline multifile class members
2015-09-14 11:25:42 +03:00
Dmitry Petrov
5f9a59d655 - bytecodeTextMultifile - framework for bytecode text tests
with multiple Kotlin source files
- bytecodeTextMultifile/partMembersCall, initial import
2015-09-14 11:25:42 +03:00
Dmitry Petrov
2931e474e1 - InnerClasses & EnclosingMethod attributes for local classes
in multifile part members
- invocation of multifile part/facade members
(TODO: deserialized descriptor case)
- inlining of multifile part/facade members
(TODO: inline against binaries case)
2015-09-14 11:25:41 +03:00
23316 changed files with 514514 additions and 343935 deletions

4
.idea/ant.xml generated
View File

@@ -3,7 +3,7 @@
<component name="AntConfiguration">
<buildFile url="file://$PROJECT_DIR$/compiler/frontend/buildLexer.xml" />
<buildFile url="file://$PROJECT_DIR$/build.xml">
<antCommandLine value="-J-XX:MaxPermSize=100m" />
<antCommandLine value="-J-XX:MaxPermSize=100m -J-ea" />
<maximumHeapSize value="1024" />
</buildFile>
<buildFile url="file://$PROJECT_DIR$/update_dependencies.xml" />
@@ -11,12 +11,12 @@
<maximumHeapSize value="512" />
</buildFile>
<buildFile url="file://$PROJECT_DIR$/idea-runner/runner.xml" />
<buildFile url="file://$PROJECT_DIR$/replicate_versions.xml" />
<buildFile url="file://$PROJECT_DIR$/libraries/build-docs.xml">
<maximumHeapSize value="1024" />
<properties>
<property name="dokka.path" value="../../dokka" />
</properties>
</buildFile>
<buildFile url="file://$PROJECT_DIR$/TeamCityRelay.xml" />
</component>
</project>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="ArtifactManager">
<artifact name="KotlinAndroidExtensions">
<output-path>$PROJECT_DIR$/out/artifacts/KotlinAndroidExtensions</output-path>
<root id="root">
<element id="directory" name="lib">
<element id="archive" name="kotlin-android-extensions.jar">
<element id="module-output" name="android-idea-plugin" />
</element>
<element id="directory" name="jps">
<element id="archive" name="kotlin-android-extensions-jps.jar">
<element id="module-output" name="android-jps-plugin" />
</element>
</element>
<element id="archive" name="android-compiler-plugin.jar">
<element id="module-output" name="android-compiler-plugin" />
</element>
<element id="file-copy" path="$PROJECT_DIR$/dist/kotlinc/lib/kotlin-runtime.jar" />
</element>
</root>
</artifact>
</component>

View File

@@ -19,8 +19,12 @@
<element id="module-output" name="util" />
<element id="module-output" name="util.runtime" />
<element id="file-copy" path="$PROJECT_DIR$/resources/kotlinManifest.properties" />
<element id="module-output" name="kotlinr" />
<element id="module-output" name="rmi-interface" />
<element id="module-output" name="daemon-client" />
<element id="module-output" name="daemon-common" />
<element id="module-output" name="deserialization" />
<element id="extracted-dir" path="$PROJECT_DIR$/dependencies/native-platform-uberjar.jar" path-in-jar="/" />
<element id="module-output" name="android-extensions-jps" />
<element id="module-output" name="build-common" />
</root>
</artifact>
</component>

View File

@@ -37,21 +37,28 @@
<element id="module-output" name="idea-analysis" />
<element id="module-output" name="ide-common" />
<element id="file-copy" path="$PROJECT_DIR$/resources/kotlinManifest.properties" />
<element id="module-output" name="kotlin-android-plugin" />
<element id="module-output" name="idea-android" />
<element id="module-output" name="js.serializer" />
<element id="module-output" name="serialization" />
<element id="module-output" name="idea-completion" />
<element id="module-output" name="idea-core" />
<element id="module-output" name="idea-js" />
<element id="module-output" name="container" />
<element id="module-output" name="rmi-interface" />
<element id="module-output" name="kotlinr" />
<element id="module-output" name="daemon-common" />
<element id="module-output" name="idea-repl" />
<element id="module-output" name="idea-live-templates" />
<element id="module-output" name="resolution" />
</element>
<element id="library" level="project" name="javax.inject" />
<element id="directory" name="jps">
<element id="artifact" artifact-name="KotlinJpsPlugin" />
</element>
<element id="library" level="project" name="markdown" />
<element id="archive" name="kotlin-android-extensions-plugin.jar">
<element id="module-output" name="android-extensions-idea" />
</element>
<element id="archive" name="kotlin-android-extensions-compiler-plugin.jar">
<element id="module-output" name="android-extensions-compiler" />
</element>
</element>
<element id="directory" name="kotlinc">
<element id="dir-copy" path="$PROJECT_DIR$/dist/kotlinc" />

8
.idea/codeInsightSettings.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaProjectCodeInsightSettings">
<excluded-names>
<name>kotlin.reflect.jvm.internal.impl</name>
</excluded-names>
</component>
</project>

View File

@@ -274,7 +274,7 @@
<option name="TAB_SIZE" value="8" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="jet">
<codeStyleSettings language="kotlin">
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />

3
.idea/compiler.xml generated
View File

@@ -5,6 +5,7 @@
<option name="BUILD_PROCESS_HEAP_SIZE" value="2000" />
<excludeFromCompile>
<directory url="file://$PROJECT_DIR$/core/reflection.jvm" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/core/runtime.jvm" includeSubdirectories="true" />
</excludeFromCompile>
<resourceExtensions />
<wildcardResourcePatterns>
@@ -26,4 +27,4 @@
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_STRING" value="-target 1.6" />
</component>
</project>
</project>

View File

@@ -2,6 +2,7 @@
<dictionary name="Nikolay.Krasko">
<words>
<w>accessors</w>
<w>fqname</w>
<w>goto</w>
<w>gradle</w>
<w>intrinsics</w>
@@ -17,6 +18,7 @@
<w>redeclarations</w>
<w>subclassed</w>
<w>subgraph</w>
<w>substep</w>
</words>
</dictionary>
</component>

View File

@@ -2,7 +2,9 @@
<dictionary name="bashor">
<words>
<w>ctor</w>
<w>interner</w>
<w>lookups</w>
<w>unescape</w>
</words>
</dictionary>
</component>
</component>

8
.idea/dictionaries/dzharkov.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<component name="ProjectDictionaryState">
<dictionary name="dzharkov">
<words>
<w>checkcast</w>
<w>insn</w>
</words>
</dictionary>
</component>

View File

@@ -9,6 +9,7 @@
<w>inserter</w>
<w>negatable</w>
<w>pparent</w>
<w>precheck</w>
<w>prioritizer</w>
<w>processings</w>
<w>rbrace</w>
@@ -16,7 +17,9 @@
<w>renderers</w>
<w>rparenth</w>
<w>selectioner</w>
<w>summand</w>
<w>unpluralize</w>
<w>weighers</w>
</words>
</dictionary>
</component>

BIN
.idea/icon.png generated Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -273,6 +273,9 @@
<inspection_tool class="ObsoleteCollection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreRequiredObsoleteCollectionTypes" value="false" />
</inspection_tool>
<inspection_tool class="PackageDirectoryMismatch" enabled="true" level="WARNING" enabled_by_default="false">
<scope name="all except testData" level="WARNING" enabled="true" />
</inspection_tool>
<inspection_tool class="ProtectedMemberInFinalClass" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="PublicFieldAccessedInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="ERROR" enabled_by_default="true">
@@ -408,7 +411,6 @@
<inspection_tool class="UnnecessaryUnboxing" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UseOfPropertiesAsHashtable" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="UtilityClassWithPublicConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="VolatileLongOrDoubleField" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="WaitNotInLoop" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="WaitNotInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="WaitWhileHoldingTwoLocks" enabled="true" level="WARNING" enabled_by_default="true" />

7
.idea/kotlinc.xml generated
View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinCommonCompilerArguments">
<option name="suppressWarnings" value="true" />
<component name="KotlinCompilerSettings">
<option name="additionalArguments" value="-version -Xallow-kotlin-package -Xskip-metadata-version-check" />
</component>
</project>
</project>

View File

@@ -10,7 +10,18 @@
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/protobuf-java-2.5.0-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/antLayout/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/jps-builders/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/jps-builders/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/jps-launcher/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-serialization/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-serialization/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/plugin-system/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/standalone-builder/src" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/jps" recursive="false" />
</library>
</component>
</component>

View File

@@ -5,6 +5,7 @@
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/junit/lib/idea-junit.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/junit/lib/resources_en.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>

9
.idea/libraries/kotlin_reflect.xml generated Normal file
View File

@@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="kotlin-reflect">
<CLASSES>
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@@ -2,11 +2,12 @@
<library name="kotlin-runtime">
<CLASSES>
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-runtime.jar!/" />
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/libraries/stdlib/src" />
<root url="file://$PROJECT_DIR$/core/builtins/native" />
<root url="file://$PROJECT_DIR$/core/builtins/src" />
</SOURCES>
</library>
</component>

13
.idea/libraries/kotlin_test.xml generated Normal file
View File

@@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="kotlin-test">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-test.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/libraries/kotlin.test/shared/src/main/kotlin" />
<root url="file://$PROJECT_DIR$/libraries/kotlin.test/shared/src/main/kotlin.jvm" />
<root url="file://$PROJECT_DIR$/libraries/kotlin.test/junit/src/main/kotlin" />
</SOURCES>
</library>
</component>

View File

@@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="native-platform-uberjar">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/native-platform-uberjar.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@@ -6,6 +6,8 @@
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/testng/lib/testng-plugin.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/testng/lib/testng.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/testng/lib/jcommander.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/testng/lib/resources_en.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>

View File

@@ -8,10 +8,10 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/trove4j_src.jar!/core/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/trove4j_src.jar!/test/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/trove4j_src.jar!/util/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/trove4j_src.jar!/generated/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/src/trove4j_src.jar!/core/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/src/trove4j_src.jar!/generated/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/src/trove4j_src.jar!/test/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/src/trove4j_src.jar!/util/src" />
</SOURCES>
</library>
</component>

21
.idea/modules.xml generated
View File

@@ -3,9 +3,9 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Kotlin.iml" filepath="$PROJECT_DIR$/Kotlin.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-compiler-plugin/android-compiler-plugin.iml" filepath="$PROJECT_DIR$/plugins/android-compiler-plugin/android-compiler-plugin.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-idea-plugin/android-idea-plugin.iml" filepath="$PROJECT_DIR$/plugins/android-idea-plugin/android-idea-plugin.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-jps-plugin/android-jps-plugin.iml" filepath="$PROJECT_DIR$/plugins/android-jps-plugin/android-jps-plugin.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-extensions/android-extensions-compiler/android-extensions-compiler.iml" filepath="$PROJECT_DIR$/plugins/android-extensions/android-extensions-compiler/android-extensions-compiler.iml" group="plugins/android-extensions" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-extensions/android-extensions-idea/android-extensions-idea.iml" filepath="$PROJECT_DIR$/plugins/android-extensions/android-extensions-idea/android-extensions-idea.iml" group="plugins/android-extensions" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-extensions/android-extensions-jps/android-extensions-jps.iml" filepath="$PROJECT_DIR$/plugins/android-extensions/android-extensions-jps/android-extensions-jps.iml" group="plugins/android-extensions" />
<module fileurl="file://$PROJECT_DIR$/android-studio/android-studio.iml" filepath="$PROJECT_DIR$/android-studio/android-studio.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/compiler/android-tests/android-tests.iml" filepath="$PROJECT_DIR$/compiler/android-tests/android-tests.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/plugins/annotation-collector/annotation-collector.iml" filepath="$PROJECT_DIR$/plugins/annotation-collector/annotation-collector.iml" group="plugins" />
@@ -13,13 +13,18 @@
<module fileurl="file://$PROJECT_DIR$/compiler/backend/backend.iml" filepath="$PROJECT_DIR$/compiler/backend/backend.iml" group="compiler/java" />
<module fileurl="file://$PROJECT_DIR$/compiler/backend-common/backend-common.iml" filepath="$PROJECT_DIR$/compiler/backend-common/backend-common.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/jps-plugin/bare-plugin/bare-plugin.iml" filepath="$PROJECT_DIR$/jps-plugin/bare-plugin/bare-plugin.iml" group="ide/jps" />
<module fileurl="file://$PROJECT_DIR$/build-common/build-common.iml" filepath="$PROJECT_DIR$/build-common/build-common.iml" />
<module fileurl="file://$PROJECT_DIR$/core/builtins/builtins.iml" filepath="$PROJECT_DIR$/core/builtins/builtins.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/compiler/builtins-serializer/builtins-serializer.iml" filepath="$PROJECT_DIR$/compiler/builtins-serializer/builtins-serializer.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/cli/cli.iml" filepath="$PROJECT_DIR$/compiler/cli/cli.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/cli/cli-common/cli-common.iml" filepath="$PROJECT_DIR$/compiler/cli/cli-common/cli-common.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/cli/cli-runner/cli-runner.iml" filepath="$PROJECT_DIR$/compiler/cli/cli-runner/cli-runner.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/tests/compiler-tests.iml" filepath="$PROJECT_DIR$/compiler/tests/compiler-tests.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/conditional-preprocessor/conditional-preprocessor.iml" filepath="$PROJECT_DIR$/compiler/conditional-preprocessor/conditional-preprocessor.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/container/container.iml" filepath="$PROJECT_DIR$/compiler/container/container.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/daemon/daemon.iml" filepath="$PROJECT_DIR$/compiler/daemon/daemon.iml" group="compiler/daemon" />
<module fileurl="file://$PROJECT_DIR$/compiler/daemon/daemon-client/daemon-client.iml" filepath="$PROJECT_DIR$/compiler/daemon/daemon-client/daemon-client.iml" group="compiler/daemon" />
<module fileurl="file://$PROJECT_DIR$/compiler/daemon/daemon-common/daemon-common.iml" filepath="$PROJECT_DIR$/compiler/daemon/daemon-common/daemon-common.iml" group="compiler/daemon" />
<module fileurl="file://$PROJECT_DIR$/core/descriptor.loader.java/descriptor.loader.java.iml" filepath="$PROJECT_DIR$/core/descriptor.loader.java/descriptor.loader.java.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/core/descriptors/descriptors.iml" filepath="$PROJECT_DIR$/core/descriptors/descriptors.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/core/descriptors.runtime/descriptors.runtime.iml" filepath="$PROJECT_DIR$/core/descriptors.runtime/descriptors.runtime.iml" group="core" />
@@ -32,10 +37,12 @@
<module fileurl="file://$PROJECT_DIR$/idea/ide-common/ide-common.iml" filepath="$PROJECT_DIR$/idea/ide-common/ide-common.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea.iml" filepath="$PROJECT_DIR$/idea/idea.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-analysis/idea-analysis.iml" filepath="$PROJECT_DIR$/idea/idea-analysis/idea-analysis.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-android/idea-android.iml" filepath="$PROJECT_DIR$/idea/idea-android/idea-android.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-completion/idea-completion.iml" filepath="$PROJECT_DIR$/idea/idea-completion/idea-completion.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-core/idea-core.iml" filepath="$PROJECT_DIR$/idea/idea-core/idea-core.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-jps-common/idea-jps-common.iml" filepath="$PROJECT_DIR$/idea/idea-jps-common/idea-jps-common.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-js/idea-js.iml" filepath="$PROJECT_DIR$/idea/idea-js/idea-js.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-live-templates/idea-live-templates.iml" filepath="$PROJECT_DIR$/idea/idea-live-templates/idea-live-templates.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-repl/idea-repl.iml" filepath="$PROJECT_DIR$/idea/idea-repl/idea-repl.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea-runner/idea-runner.iml" filepath="$PROJECT_DIR$/idea-runner/idea-runner.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-test-framework/idea-test-framework.iml" filepath="$PROJECT_DIR$/idea/idea-test-framework/idea-test-framework.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/compiler/preloader/instrumentation/instrumentation.iml" filepath="$PROJECT_DIR$/compiler/preloader/instrumentation/instrumentation.iml" group="compiler/cli" />
@@ -50,16 +57,14 @@
<module fileurl="file://$PROJECT_DIR$/js/js.tests/js.tests.iml" filepath="$PROJECT_DIR$/js/js.tests/js.tests.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.translator/js.translator.iml" filepath="$PROJECT_DIR$/js/js.translator/js.translator.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/jps-plugin/kannotator-jps-plugin-test/kannotator-jps-plugin-test.iml" filepath="$PROJECT_DIR$/jps-plugin/kannotator-jps-plugin-test/kannotator-jps-plugin-test.iml" group="ide/jps" />
<module fileurl="file://$PROJECT_DIR$/idea/kotlin-android-plugin/kotlin-android-plugin.iml" filepath="$PROJECT_DIR$/idea/kotlin-android-plugin/kotlin-android-plugin.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/compiler/rmi/kotlinr/kotlinr.iml" filepath="$PROJECT_DIR$/compiler/rmi/kotlinr/kotlinr.iml" group="rmi" />
<module fileurl="file://$PROJECT_DIR$/compiler/light-classes/light-classes.iml" filepath="$PROJECT_DIR$/compiler/light-classes/light-classes.iml" group="compiler/java" />
<module fileurl="file://$PROJECT_DIR$/compiler/plugin-api/plugin-api.iml" filepath="$PROJECT_DIR$/compiler/plugin-api/plugin-api.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/preloader/preloader.iml" filepath="$PROJECT_DIR$/compiler/preloader/preloader.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/core/reflection.jvm/reflection.jvm.iml" filepath="$PROJECT_DIR$/core/reflection.jvm/reflection.jvm.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/compiler/rmi/rmi-interface/rmi-interface.iml" filepath="$PROJECT_DIR$/compiler/rmi/rmi-interface/rmi-interface.iml" group="rmi" />
<module fileurl="file://$PROJECT_DIR$/compiler/rmi/rmi-server/rmi-server.iml" filepath="$PROJECT_DIR$/compiler/rmi/rmi-server/rmi-server.iml" group="rmi" />
<module fileurl="file://$PROJECT_DIR$/compiler/resolution/resolution.iml" filepath="$PROJECT_DIR$/compiler/resolution/resolution.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/core/runtime.jvm/runtime.jvm.iml" filepath="$PROJECT_DIR$/core/runtime.jvm/runtime.jvm.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/compiler/serialization/serialization.iml" filepath="$PROJECT_DIR$/compiler/serialization/serialization.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/temp-jdk8/temp-jdk8.iml" filepath="$PROJECT_DIR$/temp-jdk8/temp-jdk8.iml" />
<module fileurl="file://$PROJECT_DIR$/compiler/util/util.iml" filepath="$PROJECT_DIR$/compiler/util/util.iml" />
<module fileurl="file://$PROJECT_DIR$/core/util.runtime/util.runtime.iml" filepath="$PROJECT_DIR$/core/util.runtime/util.runtime.iml" group="core" />
</modules>

View File

@@ -24,9 +24,7 @@
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
</option>
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinAndroidExtensions" />
</option>
<option name="BuildArtifacts" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -6,7 +6,7 @@
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.generators.tests.TestsPackage" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.generators.tests.GenerateTestsKt" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />

View File

@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="IDEA" type="Application" factoryName="Application">
<configuration default="false" name="IDEA" type="Application" factoryName="Application" singleton="true">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=450m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
@@ -44,9 +43,7 @@
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
</option>
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinAndroidExtensions" />
</option>
<option name="BuildArtifacts" enabled="true" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/idea-runner/runner.xml" target="force-enable-kotlin-plugin" />
</method>
</configuration>

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="IDEA (No ProcessCanceledException)" type="Application" factoryName="Application">
<configuration default="false" name="IDEA (No ProcessCanceledException)" type="Application" factoryName="Application" singleton="true">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=250m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Didea.ProcessCanceledException=disabled -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
@@ -25,9 +24,7 @@
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
</option>
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinAndroidExtensions" />
</option>
<option name="BuildArtifacts" enabled="true" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/idea-runner/runner.xml" target="force-enable-kotlin-plugin" />
</method>
</configuration>

View File

@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="IDEA (win)" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
@@ -6,7 +5,7 @@
<option name="VM_PARAMETERS" value="-Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=450m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=${JAVA_HOME}\lib\tools.jar,../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="1.7" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
@@ -17,9 +16,7 @@
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
</option>
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinAndroidExtensions" />
</option>
<option name="BuildArtifacts" enabled="true" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/idea-runner/runner.xml" target="force-enable-kotlin-plugin" />
</method>
</configuration>

View File

@@ -12,17 +12,20 @@
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="TEST_OBJECT" value="pattern" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx350m -XX:MaxPermSize=320m" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<patterns>
<pattern testClass="org.jetbrains.kotlin.idea.conversion.copy.*" />
<pattern testClass="org.jetbrains.kotlin.j2k.*" />
</patterns>
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />

View File

@@ -6,7 +6,7 @@
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
@@ -22,9 +22,7 @@
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
</option>
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinAndroidExtensions" />
</option>
<option name="BuildArtifacts" enabled="true" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/idea_runner/runner.xml" target="force_enable_kotlin_plugin" />
</method>
</configuration>

2
.idea/scopes/IDE.xml generated
View File

@@ -1,3 +1,3 @@
<component name="DependencyValidationManager">
<scope name="IDE" pattern="file[idea]:*/||file[idea-analysis]:*/||file[ide-lazy-resolve]:*/" />
<scope name="IDE" pattern="src[idea]:*||file[idea]:testData/*/||src[ide-common]:*||src[idea-analysis]:*||src[idea-android]:*||src[idea-completion]:*||file[idea-completion]:testData/*/||src[idea-core]:*||src[idea-jps-common]:*||src[idea-live-templates]:*||file[idea-live-templates]:testData/*/||src[idea-repl]:*" />
</component>

23
Changelog.md Normal file
View File

@@ -0,0 +1,23 @@
# CHANGELOG
## 1.1
## 1.0.2
- Show only changed files in notification "Kotlin not configured"
- Configure Kotlin: restore all changed files in undo action
### JVM
- Remove the compiler option "Xmultifile-facades-open"
### JS
- Safe calls (`x?.let { it }`) are now inlined
### Tools. J2K
- Protected members used outside of inheritors are converted as public
- Support conversion for annotation constructor calls
- Place comments from the middle of the call to the end
- Drop line breaks between operator arguments (except '+', "-", "&&" and "||")
- Add non-null assertions on call site for non-null parameters
### IDE
- Debugger can distinguish nested inline arguments

View File

@@ -47,4 +47,4 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
</module>

View File

@@ -1,3 +1,4 @@
<a href="http://kotlinslackin.herokuapp.com"><img src="https://kotlinslackin.herokuapp.com/badge.svg" height="20"></a>
[![TeamCity (simple build status)](https://img.shields.io/teamcity/http/teamcity.jetbrains.com/s/bt345.svg)](https://teamcity.jetbrains.com/viewType.html?buildTypeId=bt345&branch_Kotlin=%3Cdefault%3E&tab=buildTypeStatusDiv)
[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlin/kotlin-maven-plugin.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.jetbrains.kotlin%22)
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)
@@ -9,17 +10,19 @@ Welcome to [Kotlin](http://kotlinlang.org/)! Some handy links:
* [Kotlin Site](http://kotlinlang.org/)
* [Getting Started Guide](http://kotlinlang.org/docs/tutorials/getting-started.html)
* [Try Kotlin](http://try.kotlinlang.org/)
* [API](http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/index.html)
* [Kotlin Standard Library](http://kotlinlang.org/api/latest/jvm/stdlib/index.html)
* [Issue Tracker](http://youtrack.jetbrains.com/issues/KT)
* [Forum](http://devnet.jetbrains.net/community/kotlin?view=discussions)
* [Kotlin Blog](http://blog.jetbrains.com/kotlin/)
* [Follow Kotlin on Twitter](https://twitter.com/kotlin)
* [Public Slack channel](http://kotlinslackin.herokuapp.com/)
* [TeamCity CI build](https://teamcity.jetbrains.com/project.html?tab=projectOverview&projectId=Kotlin)
## Editing Kotlin
* [Kotlin IntelliJ IDEA Plugin](http://hadihariri.com/2012/02/17/the-kotlin-journey-part-i-getting-things-set-up/)
* [Kotlin TextMate Bundle](https://github.com/k33g/kotlin-textmate-bundle#readme)
* [Kotlin IntelliJ IDEA Plugin](https://kotlinlang.org/docs/tutorials/getting-started.html)
* [Kotlin Eclipse Plugin](http://kotlinlang.org/docs/tutorials/getting-started-eclipse.html)
* [Kotlin TextMate Bundle](https://github.com/vkostyukov/kotlin-sublime-package)
## Building
@@ -60,7 +63,7 @@ To keep the plugin version in sync with the rest of the team and our [Continuous
you should install the according to the [instructions below](#plugin-for-contributors).
If you want to have an IntelliJ IDEA installation without the Kotlin plugin which is separate to your default IntelliJ IDEA installation which has the Kotlin
plugin [see this document](http://devnet.jetbrains.net/docs/DOC-181) which describes how to have mutliple IntelliJ IDEA installations using different configurations and plugin directories.
plugin [see this document](http://devnet.jetbrains.net/docs/DOC-181) which describes how to have multiple IntelliJ IDEA installations using different configurations and plugin directories.
From this root project there are Run/Debug Configurations for running IDEA or the Compiler Tests for example; so if you want to try out the latest and greatest IDEA plugin
@@ -99,15 +102,22 @@ Then update the list of plugins in "Browse Repositories", you'll see two version
# Contributing
We love contributions! There's [lots to do on Kotlin](http://youtrack.jetbrains.com/issues/KT) and on the [standard library](https://youtrack.jetbrains.com/issues/KT?q=Subtask+of%3A+KT-2554+%23Unresolved) so why not chat with us on the [forum](http://devnet.jetbrains.net/community/kotlin?view=discussions) about what you're interested in doing?
We love contributions! There's [lots to do on Kotlin](http://youtrack.jetbrains.com/issues/KT) and on the
[standard library](https://youtrack.jetbrains.com/issues/KT?q=Subtask+of%3A+KT-2554+%23Unresolved) so why not chat with us
about what you're interested in doing? Please join the #kontributors channel in [our Slack chat](http://kotlinslackin.herokuapp.com/)
and let us know about your plans.
If you want to find some issues to start off with, try [this query](https://youtrack.jetbrains.com/issues?q=tag%3A+%7BUp+For+Grabs%7D+%23Unresolved) which should find all issues that marked as "up-for-grabs".
Currently only committers can assign issues to themselves so just add a comment if you're starting work on it.
A nice gentle way to contribute would be to review the [API docs](http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/index.html) and find classes or functions which are not documented very well and submit a patch.
A nice gentle way to contribute would be to review the [standard library docs](http://kotlinlang.org/api/latest/jvm/stdlib/index.html)
and find classes or functions which are not documented very well and submit a patch.
In particular it'd be great if all functions included a nice example of how to use it such as for the <a href="http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/kotlin/java/util/Collection-extensions.html#filter(kotlin.Function1)">filter()</a> function on Collection. This is implemented using the <a href="https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/IterablesLazy.kt#L17">@includeFunctionBody</a> macro to include code from a test function. This serves as a double win; the API gets better documented with nice examples to help new users and the code gets more test coverage.
In particular it'd be great if all functions included a nice example of how to use it such as for the
<a href="http://kotlinlang.org/api/latest/jvm/stdlib/kotlin/hash-map-of.html">hashMapOf()</a> function.
This is implemented using the <a href=https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/collections/Maps.kt#L53">@sample</a>
macro to include code from a test function. This serves as a double win; the API gets better documented with nice examples to help new users and the code gets more test coverage.
Also the [JavaScript translation](https://github.com/JetBrains/kotlin/blob/master/js/ReadMe.md) could really use your help. See the [JavaScript contribution section](https://github.com/JetBrains/kotlin/blob/master/js/ReadMe.md) for more details.

View File

@@ -1,6 +1,5 @@
<project name="Kotlin CI Steps" default="none">
<import file="build.xml" optional="false"/>
<import file="replicate_versions.xml" optional="false"/>
<property name="build.number" value="snapshot"/>
<property name="jdk16.home" value="${java.home}"/>
@@ -13,17 +12,15 @@
<property name="plugin.xml.bk" value="${version_substitute_dir}/plugin.xml.bk"/>
<property name="plugin.xml.versioned" value="${plugin.xml}.versioned"/>
<property name="android-extensions.plugin.xml" value="plugins/android-idea-plugin/src/META-INF/plugin.xml"/>
<property name="android-extensions.plugin.xml.bk" value="${version_substitute_dir}/kotlin-android-extensions.plugin.xml.bk"/>
<property name="android-extensions.plugin.xml.versioned" value="${android-extensions.plugin.xml}.versioned"/>
<property name="compiler.version.java" value="compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/KotlinVersion.java"/>
<property name="compiler.version.java.bk" value="${version_substitute_dir}/KotlinVersion.java.bk"/>
<property name="compiler.version.java.versioned" value="${compiler.version.java}.versioned"/>
<property name="plugin.zip" value="${artifact.output.path}/kotlin-plugin-${build.number}.zip"/>
<property name="bare.plugin.zip" value="${artifact.output.path}/kotlin-bare-plugin-${build.number}.zip"/>
<property name="android-extensions.zip" value="${artifact.output.path}/kotlin-android-extensions-plugin-${build.number}.zip"/>
<property name="kotlin.bare.plugin.xml" value="jps-plugin/bare-plugin/src/META-INF/plugin.xml"/>
<property name="kotlin.bare.plugin.xml.bk" value="${version_substitute_dir}/kotlin.bare.plugin.xml.bk"/>
<macrodef name="echoprop">
<attribute name="prop"/>
@@ -87,25 +84,23 @@
target.file.versioned="${plugin.xml.versioned}"
test.string="&lt;version&gt;@snapshot@&lt;/version&gt;"/>
<substituteVersionInFile
target.file="${android-extensions.plugin.xml}"
target.file.bk="${android-extensions.plugin.xml.bk}"
target.file.versioned="${android-extensions.plugin.xml.versioned}"
test.string="&lt;version&gt;@snapshot@&lt;/version&gt;"/>
<substituteVersionInFile
target.file="${compiler.version.java}"
target.file.bk="${compiler.version.java.bk}"
target.file.versioned="${compiler.version.java.versioned}"
test.string="public static final String VERSION = &quot;@snapshot@&quot;;"/>
<replicateIdeaVersion target.file="${android-extensions.plugin.xml}"/>
</target>
<substituteVersionInFile
target.file="${kotlin.bare.plugin.xml}"
target.file.bk="${kotlin.bare.plugin.xml.bk}"
test.string="&lt;version&gt;@snapshot@&lt;/version&gt;"/>
</target>
<target name="revertTemplateFiles">
<copy file="${plugin.xml.bk}" tofile="${plugin.xml}" overwrite="true"/>
<copy file="${android-extensions.plugin.xml.bk}" tofile="${android-extensions.plugin.xml}" overwrite="true"/>
<copy file="${compiler.version.java.bk}" tofile="${compiler.version.java}" overwrite="true"/>
<copy file="${kotlin.bare.plugin.xml.bk}" tofile="${kotlin.bare.plugin.xml}" overwrite="true"/>
<delete dir="${version_substitute_dir}" quiet="true"/>
</target>
@@ -131,11 +126,6 @@
<zipPlugin filename="${plugin.zip}" dir="Kotlin"/>
<zipPlugin filename="${bare.plugin.zip}" dir="BareKotlin"/>
<zip destfile="${android-extensions.zip}">
<zipfileset prefix="KotlinAndroidExtensions" dir="${artifact.output.path}/KotlinAndroidExtensions"/>
</zip>
<delete dir="${artifact.output.path}/KotlinAndroidExtensions" quiet="true"/>
</target>
<macrodef name="print-statistic">
@@ -163,11 +153,11 @@
<print-file-size-statistic path="${kotlin-home}/lib" file-name="kotlin-reflect.jar"/>
<print-file-size-statistic path="${kotlin-home}/lib" file-name="kotlin-jslib.jar"/>
<print-file-size-statistic path="${output}" file-name="kotlin.js"/>
<print-file-size-statistic path="${output}" file-name="builtins.js"/>
<print-file-size-statistic path="${output}" file-name="builtins.meta.js"/>
<print-file-size-statistic path="${output}" file-name="stdlib.js"/>
<print-file-size-statistic path="${output}" file-name="stdlib.meta.js"/>
<print-file-size-statistic path="${js.stdlib.output.dir}" file-name="kotlin.js"/>
<print-file-size-statistic path="${js.stdlib.output.dir}" file-name="builtins.js"/>
<print-file-size-statistic path="${js.stdlib.output.dir}" file-name="builtins.meta.js"/>
<print-file-size-statistic path="${js.stdlib.output.dir}" file-name="stdlib.js"/>
<print-file-size-statistic path="${js.stdlib.output.dir}" file-name="stdlib.meta.js"/>
</target>
<target name="post_build" depends="zipArtifacts, revertTemplateFiles, printStatistics, remove_internal_artifacts, dont_remove_internal_artifacts"/>

99
TeamCityRelay.xml Normal file
View File

@@ -0,0 +1,99 @@
<project name="Change plugins version" default="change-version">
<property name="relay.origin.version" value="1.0.0-beta-2423"/>
<property name="relay.substitute.version" value="1.0.0-beta-2423-IJ-141-3"/>
<property name="relay.plugins.dir" value="artifacts"/>
<property name="relay.unpack.directory" value="relay-dir"/>
<macrodef name="substituteRegexpInFile">
<attribute name="src.file"/>
<attribute name="output.dir"/>
<attribute name="origin.version"/>
<attribute name="substituted.version"/>
<sequential>
<copy todir="@{output.dir}">
<fileset file="@{src.file}"/>
<filterchain>
<replaceregex pattern="@{origin.version}" replace="@{substituted.version}" />
</filterchain>
</copy>
</sequential>
</macrodef>
<macrodef name="substitudeVersionInPlugin">
<attribute name="plugin.path"/>
<attribute name="plugin.jar.name"/>
<attribute name="origin.version"/>
<attribute name="substituted.version"/>
<attribute name="plugin.subdir"/>
<attribute name="output-dir" default="@{substituted.version}"/>
<attribute name="output.plugin.file.name" default="@{plugin.jar.name}-@{substituted.version}.zip"/>
<attribute name="temp.origin.dir" default="${relay.unpack.directory}/@{plugin.jar.name}/plugin-origin"/>
<attribute name="temp.substitute.dir" default="${relay.unpack.directory}/@{plugin.jar.name}/substitute"/>
<sequential>
<delete dir="${relay.unpack.directory}/@{plugin.jar.name}"/>
<mkdir dir="${relay.unpack.directory}/@{plugin.jar.name}"/>
<unzip src="@{plugin.path}" dest="@{temp.origin.dir}">
<patternset>
<include name="**/lib/@{plugin.jar.name}.jar" />
</patternset>
<flattenmapper/>
</unzip>
<unzip src="@{temp.origin.dir}/@{plugin.jar.name}.jar" dest="@{temp.origin.dir}">
<patternset>
<include name="**/META-INF/plugin.xml" />
</patternset>
<flattenmapper/>
</unzip>
<substituteRegexpInFile
src.file="@{temp.origin.dir}/plugin.xml" output.dir="@{temp.substitute.dir}"
origin.version="@{origin.version}" substituted.version="@{substituted.version}"/>
<!-- Copy updated file back into jar -->
<copy file="@{temp.origin.dir}/@{plugin.jar.name}.jar" todir="@{temp.substitute.dir}"/>
<jar destfile="@{temp.substitute.dir}/@{plugin.jar.name}.jar" update="true">
<zipfileset file="@{temp.substitute.dir}/plugin.xml" prefix="META-INF"/>
</jar>
<!-- Pack updated plugin.jar back to zip file -->
<copy file="@{plugin.path}" tofile="@{substituted.version}/@{output.plugin.file.name}"/>
<zip destfile="@{substituted.version}/@{output.plugin.file.name}" update="true">
<zipfileset file="@{temp.substitute.dir}/@{plugin.jar.name}.jar" prefix="@{plugin.subdir}/lib"/>
</zip>
</sequential>
</macrodef>
<target name="change-version" description="Repack plugin with other version">
<delete dir="${relay.unpack.directory}"/>
<delete dir="${relay.substitute.version}"/>
<mkdir dir="${relay.unpack.directory}"/>
<mkdir dir="${relay.substitute.version}"/>
<substitudeVersionInPlugin
plugin.jar.name="kotlin-plugin"
plugin.path="${relay.plugins.dir}/kotlin-plugin-${relay.origin.version}.zip"
origin.version="${relay.origin.version}"
plugin.subdir="Kotlin"
substituted.version="${relay.substitute.version}"/>
<substitudeVersionInPlugin
plugin.jar.name="kotlin-bare-plugin"
plugin.path="${relay.plugins.dir}/kotlin-bare-plugin-${relay.origin.version}.zip"
origin.version="${relay.origin.version}"
plugin.subdir="BareKotlin"
substituted.version="${relay.substitute.version}"/>
<substitudeVersionInPlugin
plugin.jar.name="kotlin-android-extensions"
plugin.path="${relay.plugins.dir}/kotlin-android-extensions-plugin-${relay.origin.version}.zip"
origin.version="${relay.origin.version}"
plugin.subdir="KotlinAndroidExtensions"
substituted.version="${relay.substitute.version}"/>
</target>
</project>

View File

@@ -1,9 +0,0 @@
<root>
<item
name='com.android.tools.idea.gradle.output.parser.PatternAwareOutputParser boolean parse(java.lang.String, com.android.tools.idea.gradle.output.parser.OutputLineReader, java.util.List&lt;com.android.tools.idea.gradle.output.GradleMessage&gt;)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value"
val="&quot;fun parse(line: String, reader: OutputLineReader, messages: MutableList&lt;GradleMessage&gt;): Boolean&quot;"/>
</annotation>
</item>
</root>

View File

@@ -19,13 +19,6 @@
name='com.intellij.codeInsight.editorActions.CopyPastePostProcessor T extractTransferableData(java.awt.datatransfer.Transferable) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.CopyPastePostProcessor java.util.List&lt;T&gt; collectTransferableData(com.intellij.psi.PsiFile, com.intellij.openapi.editor.Editor, int[], int[])'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value"
val="&quot;fun collectTransferableData(file: PsiFile, editor: Editor, startOffsets: IntArray, endOffsets: IntArray): List&lt;T&gt;&quot;"/>
</annotation>
</item>
<item
name='com.intellij.codeInsight.editorActions.CopyPastePostProcessor java.util.List&lt;T&gt; collectTransferableData(com.intellij.psi.PsiFile, com.intellij.openapi.editor.Editor, int[], int[]) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
@@ -42,12 +35,6 @@
name='com.intellij.codeInsight.editorActions.CopyPastePostProcessor java.util.List&lt;T&gt; collectTransferableData(com.intellij.psi.PsiFile, com.intellij.openapi.editor.Editor, int[], int[]) 3'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.CopyPastePostProcessor java.util.List&lt;T&gt; extractTransferableData(java.awt.datatransfer.Transferable)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value" val="&quot;fun extractTransferableData(content: Transferable): List&lt;T&gt;&quot;"/>
</annotation>
</item>
<item
name='com.intellij.codeInsight.editorActions.CopyPastePostProcessor java.util.List&lt;T&gt; extractTransferableData(java.awt.datatransfer.Transferable) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
@@ -171,13 +158,6 @@
<item name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandler boolean canSelect(com.intellij.psi.PsiElement) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandler java.util.List&lt;com.intellij.openapi.util.TextRange&gt; select(com.intellij.psi.PsiElement, java.lang.CharSequence, int, com.intellij.openapi.editor.Editor)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value"
val="&quot;fun select(e: PsiElement, editorText: CharSequence, cursorOffset: Int, editor: Editor): List&lt;TextRange&gt;?&quot;"/>
</annotation>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandler java.util.List&lt;com.intellij.openapi.util.TextRange&gt; select(com.intellij.psi.PsiElement, java.lang.CharSequence, int, com.intellij.openapi.editor.Editor) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
@@ -210,13 +190,6 @@
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandlerBase java.util.List&lt;com.intellij.openapi.util.TextRange&gt; expandToWholeLine(java.lang.CharSequence, com.intellij.openapi.util.TextRange, boolean) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandlerBase java.util.List&lt;com.intellij.openapi.util.TextRange&gt; select(com.intellij.psi.PsiElement, java.lang.CharSequence, int, com.intellij.openapi.editor.Editor)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value"
val="&quot;fun select(e: PsiElement, editorText: CharSequence, cursorOffset: Int, editor: Editor): List&lt;TextRange&gt;?&quot;"/>
</annotation>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandlerBase java.util.List&lt;com.intellij.openapi.util.TextRange&gt; select(com.intellij.psi.PsiElement, java.lang.CharSequence, int, com.intellij.openapi.editor.Editor) 3'>
<annotation name='org.jetbrains.annotations.NotNull'/>

View File

@@ -1,10 +1,4 @@
<root>
<item
name='com.intellij.codeInsight.intention.IntentionAction boolean isAvailable(com.intellij.openapi.project.Project, com.intellij.openapi.editor.Editor, com.intellij.psi.PsiFile)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun isAvailable(project: Project, editor: Editor, file: PsiFile): Boolean&quot;"/>
</annotation>
</item>
<item
name='com.intellij.codeInsight.intention.PsiElementBaseIntentionAction boolean isAvailable(com.intellij.openapi.project.Project, com.intellij.openapi.editor.Editor, com.intellij.psi.PsiElement) 1'>
<annotation name='org.jetbrains.annotations.NotNull'/>

View File

@@ -93,12 +93,6 @@
name='com.intellij.codeInsight.lookup.LookupElementDecorator void renderElement(com.intellij.codeInsight.lookup.LookupElementPresentation) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.lookup.LookupElementRenderer void renderElement(T, com.intellij.codeInsight.lookup.LookupElementPresentation)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun renderElement(element: T?, presentation: LookupElementPresentation): Unit&quot;"/>
</annotation>
</item>
<item
name='com.intellij.codeInsight.lookup.LookupElementRenderer void renderElement(T, com.intellij.codeInsight.lookup.LookupElementPresentation) 1'>
<annotation name='org.jetbrains.annotations.NotNull'/>

View File

@@ -3,12 +3,6 @@
name='com.intellij.codeInsight.unwrap.RangeSplitter java.util.List&lt;com.intellij.openapi.util.TextRange&gt; split(com.intellij.openapi.util.TextRange, java.util.List&lt;com.intellij.openapi.util.TextRange&gt;)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.unwrap.ScopeHighlighter ScopeHighlighter(com.intellij.openapi.editor.Editor, com.intellij.util.NotNullFunction&lt;com.intellij.psi.PsiElement,com.intellij.openapi.util.TextRange&gt;)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value" val="&quot;fun ScopeHighlighter(editor: Editor, ranger: NotNullFunction&lt;PsiElement, TextRange&gt;?)&quot;"/>
</annotation>
</item>
<item
name='com.intellij.codeInsight.unwrap.ScopeHighlighter void highlight(com.intellij.psi.PsiElement, java.util.List&lt;com.intellij.psi.PsiElement&gt;) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>

View File

@@ -1,9 +1,4 @@
<root>
<item name='com.intellij.codeInspection.InspectionToolProvider java.lang.Class[] getInspectionClasses()'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun getInspectionClasses(): Array&lt;Class&lt;out Any?&gt;&gt;&quot;"/>
</annotation>
</item>
<item name='com.intellij.codeInspection.SuppressIntentionAction EMPTY_ARRAY'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -1,10 +1,4 @@
<root>
<item
name='com.intellij.debugger.actions.JvmSmartStepIntoHandler java.util.List&lt;com.intellij.debugger.actions.SmartStepTarget&gt; findSmartStepTargets(com.intellij.debugger.SourcePosition)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value" val="&quot;fun findSmartStepTargets(position: SourcePosition): List&lt;SmartStepTarget&gt;&quot;"/>
</annotation>
</item>
<item
name='com.intellij.debugger.actions.JvmSmartStepIntoHandler java.util.List&lt;com.intellij.debugger.actions.SmartStepTarget&gt; findSmartStepTargets(com.intellij.debugger.SourcePosition) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>

View File

@@ -2,13 +2,6 @@
<item name='com.intellij.debugger.engine.DebugProcessImpl com.intellij.debugger.jdi.VirtualMachineProxyImpl getVirtualMachineProxy()'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.debugger.engine.FrameExtraVariablesProvider java.util.Set&lt;com.intellij.debugger.engine.evaluation.TextWithImports&gt; collectVariables(com.intellij.debugger.SourcePosition, com.intellij.debugger.engine.evaluation.EvaluationContext, java.util.Set&lt;java.lang.String&gt;)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value"
val="&quot;fun collectVariables(sourcePosition: SourcePosition?, evalContext: EvaluationContext?, alreadyCollected: Set&lt;String&gt;?): Set&lt;TextWithImports&gt;?&quot;"/>
</annotation>
</item>
<item
name='com.intellij.debugger.engine.MethodFilter boolean locationMatches(com.intellij.debugger.engine.DebugProcessImpl, com.sun.jdi.Location) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>

View File

@@ -8,23 +8,7 @@
<item name='com.intellij.ide.hierarchy.HierarchyBrowserBaseEx myBuilders'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.ide.hierarchy.HierarchyBrowserBaseEx void createTrees(java.util.Map&lt;java.lang.String,javax.swing.JTree&gt;)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun createTrees(trees: MutableMap&lt;String, JTree&gt;): Unit&quot;"/>
</annotation>
</item>
<item name='com.intellij.ide.hierarchy.HierarchyBrowserBaseEx void prependActions(com.intellij.openapi.actionSystem.DefaultActionGroup)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun prependActions(actionGroup: DefaultActionGroup): Unit&quot;"/>
</annotation>
</item>
<item name='com.intellij.ide.hierarchy.HierarchyNodeDescriptor myHighlightedText'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.ide.hierarchy.HierarchyProvider com.intellij.ide.hierarchy.HierarchyBrowser createHierarchyBrowser(com.intellij.psi.PsiElement)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun createHierarchyBrowser(target: PsiElement): HierarchyBrowser&quot;"/>
</annotation>
</item>
</root>

View File

@@ -1,8 +0,0 @@
<root>
<item
name='com.intellij.ide.hierarchy.type.TypeHierarchyBrowser void prependActions(com.intellij.openapi.actionSystem.DefaultActionGroup)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun prependActions(actionGroup: DefaultActionGroup): Unit&quot;"/>
</annotation>
</item>
</root>

View File

@@ -1,8 +0,0 @@
<root>
<item
name='com.intellij.ide.util.treeView.smartTree.NodeProvider java.util.Collection&lt;T&gt; provideNodes(com.intellij.ide.util.treeView.smartTree.TreeElement)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value" val="&quot;fun provideNodes(node: TreeElement): Collection&lt;T&gt;&quot;"/>
</annotation>
</item>
</root>

View File

@@ -3,22 +3,7 @@
name='com.intellij.openapi.util.Conditions com.intellij.openapi.util.Condition&lt;T&gt; or(com.intellij.openapi.util.Condition&lt;T&gt;, com.intellij.openapi.util.Condition&lt;T&gt;)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.openapi.util.Key T get(com.intellij.openapi.util.UserDataHolder, T)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value" val="&quot;fun get(holder: UserDataHolder?, defaultValue: T): T&quot;"/>
</annotation>
</item>
<item name='com.intellij.openapi.util.Key com.intellij.openapi.util.Key&lt;T&gt; create(java.lang.String)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.openapi.util.Pair A getFirst()'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value" val="&quot;fun getFirst(): A&quot;"/>
</annotation>
</item>
<item name='com.intellij.openapi.util.Pair B getSecond()'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value" val="&quot;fun getSecond(): B&quot;"/>
</annotation>
</item>
</root>

View File

@@ -1,10 +1,4 @@
<root>
<item
name='com.intellij.platform.ProjectTemplatesFactory com.intellij.platform.ProjectTemplate[] createTemplates(java.lang.String, com.intellij.ide.util.projectWizard.WizardContext)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value" val="&quot;fun createTemplates(group: String, context: WizardContext?): Array&lt;out ProjectTemplate&gt;&quot;"/>
</annotation>
</item>
<item
name='com.intellij.platform.ProjectTemplatesFactory com.intellij.platform.ProjectTemplate[] createTemplates(java.lang.String, com.intellij.ide.util.projectWizard.WizardContext) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>

View File

@@ -19,26 +19,13 @@
name='com.intellij.psi.search.searches.OverridingMethodsSearch com.intellij.util.Query&lt;com.intellij.psi.PsiMethod&gt; search(com.intellij.psi.PsiMethod, com.intellij.psi.search.SearchScope, boolean)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.psi.search.searches.ReferencesSearch com.intellij.util.Query&lt;com.intellij.psi.PsiReference&gt; search(com.intellij.psi.PsiElement)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun search(element: PsiElement): Query&lt;PsiReference&gt;&quot;"/>
</annotation>
</item>
<item
name='com.intellij.psi.search.searches.ReferencesSearch com.intellij.util.Query&lt;com.intellij.psi.PsiReference&gt; search(com.intellij.psi.PsiElement, com.intellij.psi.search.SearchScope)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun search(element: PsiElement, searchScope: SearchScope): Query&lt;PsiReference&gt;&quot;"/>
</annotation>
</item>
<item
name='com.intellij.psi.search.searches.ReferencesSearch com.intellij.util.Query&lt;com.intellij.psi.PsiReference&gt; search(com.intellij.psi.PsiElement, com.intellij.psi.search.SearchScope, boolean)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value"
val="&quot;fun search(element: PsiElement, searchScope: SearchScope, ignoreAccessScope: Boolean): Query&lt;PsiReference&gt;&quot;"/>
</annotation>
</item>
<item
name='com.intellij.psi.search.searches.ReferencesSearch com.intellij.util.Query&lt;com.intellij.psi.PsiReference&gt; search(com.intellij.psi.search.searches.ReferencesSearch.SearchParameters)'>

View File

@@ -1,10 +1,4 @@
<root>
<item
name='com.intellij.refactoring.BaseRefactoringProcessor boolean preprocessUsages(com.intellij.openapi.util.Ref&lt;com.intellij.usageView.UsageInfo[]&gt;)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value" val="&quot;fun preprocessUsages(refUsages: Ref&lt;Array&lt;UsageInfo&gt;&gt;): Boolean&quot;"/>
</annotation>
</item>
<item name='com.intellij.refactoring.BaseRefactoringProcessor myProject'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -7,13 +7,6 @@
name='com.intellij.refactoring.move.MoveHandlerDelegate boolean isValidTarget(com.intellij.psi.PsiElement, com.intellij.psi.PsiElement[]) 1'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.refactoring.move.MoveHandlerDelegate boolean tryToMove(com.intellij.psi.PsiElement, com.intellij.openapi.project.Project, com.intellij.openapi.actionSystem.DataContext, com.intellij.psi.PsiReference, com.intellij.openapi.editor.Editor)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value"
val="&quot;fun tryToMove(element: PsiElement, project: Project, dataContext: DataContext?, reference: PsiReference?, editor: Editor?): Boolean&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.move.MoveHandlerDelegate com.intellij.psi.PsiElement[] adjustForMove(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.psi.PsiElement) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>

View File

@@ -1,11 +1,4 @@
<root>
<item
name='com.intellij.refactoring.move.moveFilesOrDirectories.MoveFileHandler java.util.List&lt;com.intellij.usageView.UsageInfo&gt; findUsages(com.intellij.psi.PsiFile, com.intellij.psi.PsiDirectory, boolean, boolean)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value"
val="&quot;fun findUsages(psiFile: PsiFile, newParent: PsiDirectory, searchInComments: Boolean, searchInNonJavaFiles: Boolean): List&lt;UsageInfo&gt;?&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.move.moveFilesOrDirectories.MoveFileHandler void prepareMovedFile(com.intellij.psi.PsiFile, com.intellij.psi.PsiDirectory, java.util.Map&lt;com.intellij.psi.PsiElement,com.intellij.psi.PsiElement&gt;) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>

View File

@@ -1,11 +1,4 @@
<root>
<item
name='com.intellij.refactoring.rename.RenamePsiElementProcessor void findCollisions(com.intellij.psi.PsiElement, java.lang.String, java.util.Map&lt;? extends com.intellij.psi.PsiElement,java.lang.String&gt;, java.util.List&lt;com.intellij.usageView.UsageInfo&gt;)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value"
val="&quot;fun findCollisions(element: PsiElement?, newName: String?, allRenames: Map&lt;out PsiElement?, String&gt;, result: MutableList&lt;UsageInfo&gt;): Unit&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.rename.RenamePsiElementProcessor void findCollisions(com.intellij.psi.PsiElement, java.lang.String, java.util.Map&lt;? extends com.intellij.psi.PsiElement,java.lang.String&gt;, java.util.List&lt;com.intellij.usageView.UsageInfo&gt;) 2'>
<annotation name='org.jetbrains.annotations.NotNull'/>
@@ -22,13 +15,6 @@
name='com.intellij.refactoring.rename.RenamePsiElementProcessor void findExistingNameConflicts(com.intellij.psi.PsiElement, java.lang.String, com.intellij.util.containers.MultiMap&lt;com.intellij.psi.PsiElement,java.lang.String&gt;, java.util.Map&lt;com.intellij.psi.PsiElement,java.lang.String&gt;) 2'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.refactoring.rename.RenamePsiElementProcessor void prepareRenaming(com.intellij.psi.PsiElement, java.lang.String, java.util.Map&lt;com.intellij.psi.PsiElement,java.lang.String&gt;, com.intellij.psi.search.SearchScope)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value"
val="&quot;fun prepareRenaming(element: PsiElement?, newName: String?, allRenames: MutableMap&lt;PsiElement, String&gt;, scope: SearchScope): Unit&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.rename.RenamePsiElementProcessor void prepareRenaming(com.intellij.psi.PsiElement, java.lang.String, java.util.Map&lt;com.intellij.psi.PsiElement,java.lang.String&gt;, com.intellij.psi.search.SearchScope) 2'>
<annotation name='org.jetbrains.annotations.NotNull'/>

View File

@@ -1,98 +0,0 @@
<root>
<item
name='com.intellij.refactoring.safeDelete.JavaSafeDeleteDelegate void createUsageInfoForParameter(com.intellij.psi.PsiReference, java.util.List&lt;com.intellij.usageView.UsageInfo&gt;, com.intellij.psi.PsiParameter, com.intellij.psi.PsiMethod)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value"
val="&quot;fun createUsageInfoForParameter(reference: PsiReference, usages: MutableList&lt;UsageInfo&gt;, parameter: PsiParameter, method: PsiMethod): Unit&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.safeDelete.JavaSafeDeleteProcessor java.util.Collection&lt;? extends com.intellij.psi.PsiElement&gt; getElementsToSearch(com.intellij.psi.PsiElement, com.intellij.openapi.module.Module, java.util.Collection&lt;com.intellij.psi.PsiElement&gt;)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value"
val="&quot;fun getElementsToSearch(element: PsiElement, module: Module?, allElementsToDelete: Collection&lt;PsiElement&gt;): Collection&lt;out PsiElement&gt;?&quot;"/>
</annotation>
</item>
<item name='com.intellij.refactoring.safeDelete.SafeDeleteProcessorDelegate boolean handlesElement(com.intellij.psi.PsiElement)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun handlesElement(element: PsiElement): Boolean&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.safeDelete.SafeDeleteProcessorDelegate boolean isToSearchForTextOccurrences(com.intellij.psi.PsiElement)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun isToSearchForTextOccurrences(element: PsiElement): Boolean&quot;"/>
</annotation>
</item>
<item name='com.intellij.refactoring.safeDelete.SafeDeleteProcessorDelegate boolean isToSearchInComments(com.intellij.psi.PsiElement)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun isToSearchInComments(element: PsiElement): Boolean&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.safeDelete.SafeDeleteProcessorDelegate com.intellij.refactoring.safeDelete.NonCodeUsageSearchInfo findUsages(com.intellij.psi.PsiElement, com.intellij.psi.PsiElement[], java.util.List&lt;com.intellij.usageView.UsageInfo&gt;)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value"
val="&quot;fun findUsages(element: PsiElement, allElementsToDelete: Array&lt;out PsiElement&gt;, result: MutableList&lt;UsageInfo&gt;): NonCodeUsageSearchInfo?&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.safeDelete.SafeDeleteProcessorDelegate com.intellij.usageView.UsageInfo[] preprocessUsages(com.intellij.openapi.project.Project, com.intellij.usageView.UsageInfo[])'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value"
val="&quot;fun preprocessUsages(project: Project, usages: Array&lt;out UsageInfo&gt;): Array&lt;UsageInfo&gt;?&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.safeDelete.SafeDeleteProcessorDelegate java.util.Collection&lt;? extends com.intellij.psi.PsiElement&gt; getElementsToSearch(com.intellij.psi.PsiElement, java.util.Collection&lt;com.intellij.psi.PsiElement&gt;)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value"
val="&quot;fun getElementsToSearch(element: PsiElement, allElementsToDelete: Collection&lt;PsiElement&gt;): Collection&lt;out PsiElement&gt;?&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.safeDelete.SafeDeleteProcessorDelegate java.util.Collection&lt;com.intellij.psi.PsiElement&gt; getAdditionalElementsToDelete(com.intellij.psi.PsiElement, java.util.Collection&lt;com.intellij.psi.PsiElement&gt;, boolean)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value"
val="&quot;fun getAdditionalElementsToDelete(element: PsiElement, allElementsToDelete: Collection&lt;PsiElement&gt;, askUser: Boolean): MutableCollection&lt;PsiElement&gt;?&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.safeDelete.SafeDeleteProcessorDelegate java.util.Collection&lt;java.lang.String&gt; findConflicts(com.intellij.psi.PsiElement, com.intellij.psi.PsiElement[])'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value"
val="&quot;fun findConflicts(element: PsiElement, allElementsToDelete: Array&lt;out PsiElement&gt;): MutableCollection&lt;String&gt;?&quot;"/>
</annotation>
</item>
<item name='com.intellij.refactoring.safeDelete.SafeDeleteProcessorDelegate void prepareForDeletion(com.intellij.psi.PsiElement)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun prepareForDeletion(element: PsiElement): Unit&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.safeDelete.SafeDeleteProcessorDelegate void setToSearchForTextOccurrences(com.intellij.psi.PsiElement, boolean)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun setToSearchForTextOccurrences(element: PsiElement, enabled: Boolean): Unit&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.safeDelete.SafeDeleteProcessorDelegate void setToSearchInComments(com.intellij.psi.PsiElement, boolean)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun setToSearchInComments(element: PsiElement, enabled: Boolean): Unit&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.safeDelete.SafeDeleteProcessorDelegateBase java.util.Collection&lt;? extends com.intellij.psi.PsiElement&gt; getElementsToSearch(com.intellij.psi.PsiElement, com.intellij.openapi.module.Module, java.util.Collection&lt;com.intellij.psi.PsiElement&gt;)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value"
val="&quot;fun getElementsToSearch(element: PsiElement, module: Module?, allElementsToDelete: Collection&lt;PsiElement&gt;): Collection&lt;out PsiElement&gt;?&quot;"/>
</annotation>
</item>
<item
name='com.intellij.refactoring.safeDelete.SafeDeleteProcessorDelegateBase java.util.Collection&lt;? extends com.intellij.psi.PsiElement&gt; getElementsToSearch(com.intellij.psi.PsiElement, java.util.Collection&lt;com.intellij.psi.PsiElement&gt;)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value"
val="&quot;fun getElementsToSearch(element: PsiElement, allElementsToDelete: Collection&lt;PsiElement&gt;): Collection&lt;out PsiElement&gt;?&quot;"/>
</annotation>
</item>
</root>

View File

@@ -6,11 +6,6 @@
name='com.intellij.testFramework.fixtures.CodeInsightTestFixture com.intellij.openapi.vfs.VirtualFile copyDirectoryToProject(java.lang.String, java.lang.String)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.testFramework.fixtures.CodeInsightTestFixture void assertPreferredCompletionItems(int, java.lang.String...)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun assertPreferredCompletionItems(selected: Int, vararg expected: String)&quot;"/>
</annotation>
</item>
<item name='com.intellij.testFramework.fixtures.IdeaProjectTestFixture com.intellij.openapi.project.Project getProject()'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -1,8 +0,0 @@
<root>
<item
name='com.intellij.ui.classFilter.DebuggerClassFilterProvider java.util.List&lt;com.intellij.ui.classFilter.ClassFilter&gt; getFilters()'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value" val="&quot;fun getFilters(): List&lt;ClassFilter&gt;?&quot;"/>
</annotation>
</item>
</root>

View File

@@ -1,9 +0,0 @@
<root>
<item
name='com.intellij.xdebugger.settings.XDebuggerSettings java.util.Collection&lt;? extends com.intellij.openapi.options.Configurable&gt; createConfigurables(com.intellij.xdebugger.settings.DebuggerSettingsCategory)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value"
val="&quot;fun createConfigurables(category: DebuggerSettingsCategory): Collection&lt;out Configurable?&gt;&quot;"/>
</annotation>
</item>
</root>

View File

@@ -9,6 +9,7 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="ant" level="project" />
<orderEntry type="library" name="kotlin-runtime" level="project" />
<orderEntry type="library" name="kotlin-reflect" level="project" />
<orderEntry type="module" module-name="preloader" />
</component>
</module>

View File

@@ -1,7 +0,0 @@
<!-- NOTE: this Antlib is deprecated. Use org/jetbrains/kotlin/ant/antlib.xml instead -->
<!-- TODO: delete this file -->
<antlib>
<taskdef name="kotlinc" classname="org.jetbrains.kotlin.ant.Kotlin2JvmTask"/>
<taskdef name="kotlin2js" classname="org.jetbrains.kotlin.ant.Kotlin2JsTask"/>
<typedef name="withKotlin" classname="org.jetbrains.kotlin.ant.KotlinCompilerAdapter"/>
</antlib>

View File

@@ -19,22 +19,22 @@ package org.jetbrains.kotlin.ant
import org.apache.tools.ant.types.Path
import java.io.File
public class Kotlin2JsTask : KotlinCompilerBaseTask() {
class Kotlin2JsTask : KotlinCompilerBaseTask() {
override val compilerFqName = "org.jetbrains.kotlin.cli.js.K2JSCompiler"
public var library: Path? = null
public var outputPrefix: File? = null
public var outputPostfix: File? = null
public var sourceMap: Boolean = false
public var metaInfo: Boolean = false
var library: Path? = null
var outputPrefix: File? = null
var outputPostfix: File? = null
var sourceMap: Boolean = false
var metaInfo: Boolean = false
/**
* {@link K2JsArgumentConstants.CALL} (default) if need generate a main function call (main function will be auto detected)
* {@link K2JsArgumentConstants.NO_CALL} otherwise.
*/
public var main: String? = null
var main: String? = null
public fun createLibrary(): Path {
fun createLibrary(): Path {
val libraryPath = library
if (libraryPath == null) {
val t = Path(getProject())
@@ -52,7 +52,7 @@ public class Kotlin2JsTask : KotlinCompilerBaseTask() {
// TODO: write test
library?.let {
args.add("-library-files")
args.add(it.list().map { File(it).canonicalPath }.join(separator = ","))
args.add(it.list().joinToString(separator = ",") { File(it).canonicalPath })
}
outputPrefix?.let {

View File

@@ -20,23 +20,15 @@ import org.apache.tools.ant.types.Path
import org.apache.tools.ant.types.Reference
import java.io.File.pathSeparator
public class Kotlin2JvmTask : KotlinCompilerBaseTask() {
class Kotlin2JvmTask : KotlinCompilerBaseTask() {
override val compilerFqName = "org.jetbrains.kotlin.cli.jvm.K2JVMCompiler"
public var externalAnnotations: Path? = null
public var includeRuntime: Boolean = true
public var moduleName: String? = null
var includeRuntime: Boolean = true
var moduleName: String? = null
private var compileClasspath: Path? = null
public fun createExternalAnnotations(): Path {
if (externalAnnotations == null) {
externalAnnotations = Path(getProject())
}
return externalAnnotations!!.createPath()
}
public fun setClasspath(classpath: Path) {
fun setClasspath(classpath: Path) {
if (compileClasspath == null) {
compileClasspath = classpath
}
@@ -45,14 +37,14 @@ public class Kotlin2JvmTask : KotlinCompilerBaseTask() {
}
}
public fun setClasspathRef(ref: Reference) {
fun setClasspathRef(ref: Reference) {
if (compileClasspath == null) {
compileClasspath = Path(getProject())
}
compileClasspath!!.createPath().setRefid(ref)
compileClasspath!!.createPath().refid = ref
}
public fun addConfiguredClasspath(classpath: Path) {
fun addConfiguredClasspath(classpath: Path) {
setClasspath(classpath)
}
@@ -62,12 +54,7 @@ public class Kotlin2JvmTask : KotlinCompilerBaseTask() {
compileClasspath?.let {
args.add("-classpath")
args.add(it.list().join(pathSeparator))
}
externalAnnotations?.let {
args.add("-annotations")
args.add(it.list().join(pathSeparator))
args.add(it.list().joinToString(pathSeparator))
}

View File

@@ -29,12 +29,12 @@ object KotlinAntTaskUtil {
private val libPath: File by lazy {
// Find path of kotlin-ant.jar in the filesystem and find kotlin-compiler.jar in the same directory
val resourcePath = "/" + javaClass.getName().replace('.', '/') + ".class"
val resourcePath = "/" + javaClass.name.replace('.', '/') + ".class"
val jarConnection = javaClass.getResource(resourcePath).openConnection() as? JarURLConnection
?: throw UnsupportedOperationException("Kotlin compiler Ant task should be loaded from the JAR file")
val antTaskJarPath = File(jarConnection.getJarFileURL().toURI())
val antTaskJarPath = File(jarConnection.jarFileURL.toURI())
antTaskJarPath.getParentFile()
antTaskJarPath.parentFile
}
val compilerJar: File by lazy {
@@ -47,12 +47,13 @@ object KotlinAntTaskUtil {
private fun File.assertExists(): File {
if (!this.exists()) {
throw IllegalStateException("${getName()} is not found in the directory of Kotlin Ant task")
throw IllegalStateException("${name} is not found in the directory of Kotlin Ant task")
}
return this
}
synchronized fun getOrCreateClassLoader(): ClassLoader {
@Synchronized
fun getOrCreateClassLoader(): ClassLoader {
val cached = classLoaderRef.get()
if (cached != null) return cached
@@ -67,5 +68,5 @@ object KotlinAntTaskUtil {
}
public val Task.defaultModuleName: String?
val Task.defaultModuleName: String?
get() = owningTarget?.name ?: project?.name

View File

@@ -1,165 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.ant;
import kotlin.KotlinPackage;
import kotlin.jvm.functions.Function1;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.MagicNames;
import org.apache.tools.ant.taskdefs.Javac;
import org.apache.tools.ant.taskdefs.compilers.Javac13;
import org.apache.tools.ant.taskdefs.condition.AntVersion;
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.Path;
import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static org.apache.tools.ant.Project.MSG_WARN;
public class KotlinCompilerAdapter extends Javac13 {
private static final List<String> KOTLIN_EXTENSIONS = Arrays.asList("kt", "kts");
private Path externalAnnotations;
private String moduleName;
public List<Commandline.Argument> additionalArguments = new ArrayList<Commandline.Argument>(0);
public void setExternalAnnotations(Path externalAnnotations) {
this.externalAnnotations = externalAnnotations;
}
public void setModuleName(String moduleName) {
this.moduleName = moduleName;
}
public Path createExternalAnnotations() {
if (externalAnnotations == null) {
externalAnnotations = new Path(getProject());
}
return externalAnnotations.createPath();
}
public Commandline.Argument createCompilerArg() {
Commandline.Argument argument = new Commandline.Argument();
additionalArguments.add(argument);
return argument;
}
@Override
public String[] getSupportedFileExtensions() {
List<String> result = KotlinPackage.plus(Arrays.asList(super.getSupportedFileExtensions()), KOTLIN_EXTENSIONS);
//noinspection SSBasedInspection
return result.toArray(new String[result.size()]);
}
@Override
public boolean execute() throws BuildException {
Javac javac = getJavac();
checkAntVersion();
Kotlin2JvmTask kotlinc = new Kotlin2JvmTask();
kotlinc.setFailOnError(javac.getFailonerror());
kotlinc.setOutput(javac.getDestdir());
Path classpath = javac.getClasspath();
if (classpath != null) {
kotlinc.setClasspath(classpath);
}
// We use the provided src dir instead of compileList, because the latter is insane:
// it is constructed only of sources which are newer than classes with the same name
kotlinc.setSrc(javac.getSrcdir());
kotlinc.setExternalAnnotations(externalAnnotations);
if (moduleName == null) {
moduleName = AntPackage.getDefaultModuleName(javac);
}
kotlinc.setModuleName(moduleName);
kotlinc.getAdditionalArguments().addAll(additionalArguments);
// Javac13#execute passes everything in compileList to javac, which doesn't recognize .kt files
File[] compileListForJavac = filterOutKotlinSources(compileList);
boolean hasKotlinFilesInSources = compileListForJavac.length < compileList.length;
if (hasKotlinFilesInSources) {
kotlinc.execute();
if (!Integer.valueOf(0).equals(kotlinc.getExitCode())) {
// Don't run javac if failOnError = false and there were errors on Kotlin sources
return false;
}
}
else {
// This is needed for addRuntimeToJavacClasspath, where kotlinc arguments will be used.
kotlinc.fillArguments();
}
javac.log("Running javac...");
compileList = compileListForJavac;
addRuntimeToJavacClasspath(kotlinc);
return compileList.length == 0 || super.execute();
}
private void addRuntimeToJavacClasspath(@NotNull Kotlin2JvmTask kotlinc) {
for (String arg : kotlinc.getArgs()) {
// If "-no-stdlib" was specified explicitly, probably the user also wanted the javac classpath to not have it
if ("-no-stdlib".equals(arg)) return;
}
if (compileClasspath == null) {
compileClasspath = new Path(getProject());
}
compileClasspath.add(new Path(getProject(), KotlinAntTaskUtil.INSTANCE$.getRuntimeJar().getAbsolutePath()));
}
private void checkAntVersion() {
AntVersion checkVersion = new AntVersion();
checkVersion.setAtLeast("1.8.2");
if (!checkVersion.eval()) {
getJavac().log("<withKotlin> task requires Ant of version at least 1.8.2 to operate reliably. " +
"Please upgrade or, as a workaround, make sure you have at least one Java source and " +
"the output directory is clean before running this task. " +
"You have: " + getProject().getProperty(MagicNames.ANT_VERSION), MSG_WARN);
}
}
@NotNull
private static File[] filterOutKotlinSources(@NotNull File[] files) {
List<File> nonKotlinSources = KotlinPackage.filterNot(files, new Function1<File, Boolean>() {
@Override
public Boolean invoke(File file) {
for (String extension : KOTLIN_EXTENSIONS) {
if (file.getPath().endsWith("." + extension)) return true;
}
return false;
}
});
return nonKotlinSources.toArray(new File[nonKotlinSources.size()]);
}
}

View File

@@ -0,0 +1,131 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.ant
import org.apache.tools.ant.BuildException
import org.apache.tools.ant.MagicNames
import org.apache.tools.ant.Project.MSG_WARN
import org.apache.tools.ant.taskdefs.compilers.Javac13
import org.apache.tools.ant.taskdefs.condition.AntVersion
import org.apache.tools.ant.types.Commandline
import org.apache.tools.ant.types.Path
import java.io.File
import java.util.*
class KotlinCompilerAdapter : Javac13() {
var moduleName: String? = null
var additionalArguments: MutableList<Commandline.Argument> = ArrayList(0)
fun createCompilerArg(): Commandline.Argument {
val argument = Commandline.Argument()
additionalArguments.add(argument)
return argument
}
override fun getSupportedFileExtensions(): Array<String> {
return super.getSupportedFileExtensions() + KOTLIN_EXTENSIONS
}
@Throws(BuildException::class)
override fun execute(): Boolean {
val javac = javac
checkAntVersion()
val kotlinc = Kotlin2JvmTask()
kotlinc.failOnError = javac.failonerror
kotlinc.output = javac.destdir
val classpath = javac.classpath
if (classpath != null) {
kotlinc.setClasspath(classpath)
}
// We use the provided src dir instead of compileList, because the latter is insane:
// it is constructed only of sources which are newer than classes with the same name
kotlinc.src = javac.srcdir
if (moduleName == null) {
moduleName = javac.defaultModuleName
}
kotlinc.moduleName = moduleName
kotlinc.additionalArguments.addAll(additionalArguments)
// Javac13#execute passes everything in compileList to javac, which doesn't recognize .kt files
val compileListForJavac = filterOutKotlinSources(compileList)
val hasKotlinFilesInSources = compileListForJavac.size < compileList.size
if (hasKotlinFilesInSources) {
kotlinc.execute()
if (kotlinc.exitCode != 0) {
// Don't run javac if failOnError = false and there were errors on Kotlin sources
return false
}
}
else {
// This is needed for addRuntimeToJavacClasspath, where kotlinc arguments will be used.
kotlinc.fillArguments()
}
javac.log("Running javac...")
compileList = compileListForJavac
addRuntimeToJavacClasspath(kotlinc)
return compileList.isEmpty() || super.execute()
}
private fun addRuntimeToJavacClasspath(kotlinc: Kotlin2JvmTask) {
for (arg in kotlinc.args) {
// If "-no-stdlib" was specified explicitly, probably the user also wanted the javac classpath to not have it
if ("-no-stdlib" == arg) return
}
if (compileClasspath == null) {
compileClasspath = Path(getProject())
}
compileClasspath.add(Path(getProject(), KotlinAntTaskUtil.runtimeJar.absolutePath))
}
private fun checkAntVersion() {
val checkVersion = AntVersion()
checkVersion.atLeast = "1.8.2"
if (!checkVersion.eval()) {
javac.log("<withKotlin> task requires Ant of version at least 1.8.2 to operate reliably. " +
"Please upgrade or, as a workaround, make sure you have at least one Java source and " +
"the output directory is clean before running this task. " +
"You have: " + getProject().getProperty(MagicNames.ANT_VERSION), MSG_WARN)
}
}
companion object {
private val KOTLIN_EXTENSIONS = Arrays.asList("kt", "kts")
private fun filterOutKotlinSources(files: Array<File>): Array<File> {
return files.filterNot {
for (extension in KOTLIN_EXTENSIONS) {
if (it.path.endsWith("." + extension)) return@filterNot true
}
false
}.toTypedArray()
}
}
}

View File

@@ -24,25 +24,25 @@ import org.apache.tools.ant.types.Reference
import java.io.File
import java.io.PrintStream
public abstract class KotlinCompilerBaseTask : Task() {
abstract class KotlinCompilerBaseTask : Task() {
protected abstract val compilerFqName: String
protected val args: MutableList<String> = arrayListOf()
val args: MutableList<String> = arrayListOf()
public var src: Path? = null
public var output: File? = null
public var nowarn: Boolean = false
public var verbose: Boolean = false
public var printVersion: Boolean = false
public var failOnError: Boolean = true
var src: Path? = null
var output: File? = null
var nowarn: Boolean = false
var verbose: Boolean = false
var printVersion: Boolean = false
var failOnError: Boolean = true
public var noStdlib: Boolean = false
var noStdlib: Boolean = false
public val additionalArguments: MutableList<Commandline.Argument> = arrayListOf()
val additionalArguments: MutableList<Commandline.Argument> = arrayListOf()
internal var exitCode: Int? = null
var exitCode: Int? = null
public fun createSrc(): Path {
fun createSrc(): Path {
val srcPath = src
if (srcPath == null) {
val t = Path(getProject())
@@ -53,11 +53,11 @@ public abstract class KotlinCompilerBaseTask : Task() {
return srcPath.createPath()
}
public fun setSrcRef(ref: Reference) {
createSrc().setRefid(ref)
fun setSrcRef(ref: Reference) {
createSrc().refid = ref
}
public fun createCompilerArg(): Commandline.Argument {
fun createCompilerArg(): Commandline.Argument {
val argument = Commandline.Argument()
additionalArguments.add(argument)
return argument
@@ -65,7 +65,7 @@ public abstract class KotlinCompilerBaseTask : Task() {
abstract fun fillSpecificArguments()
public fun fillArguments() {
fun fillArguments() {
val sourcePaths = src ?: throw BuildException("\"src\" should be specified")
args.addAll(sourcePaths.list().map { File(it).canonicalPath })
@@ -75,7 +75,7 @@ public abstract class KotlinCompilerBaseTask : Task() {
if (verbose) args.add("-verbose")
if (printVersion) args.add("-version")
args.addAll(additionalArguments.flatMap { it.getParts().toList() })
args.addAll(additionalArguments.flatMap { it.parts.toList() })
fillSpecificArguments()
}
@@ -85,12 +85,12 @@ public abstract class KotlinCompilerBaseTask : Task() {
val compilerClass = KotlinAntTaskUtil.getOrCreateClassLoader().loadClass(compilerFqName)
val compiler = compilerClass.newInstance()
val exec = compilerClass.getMethod("execFullPathsInMessages", javaClass<PrintStream>(), javaClass<Array<String>>())
val exec = compilerClass.getMethod("execFullPathsInMessages", PrintStream::class.java, Array<String>::class.java)
log("Compiling ${src!!.list().toList()} => [${output!!.canonicalPath}]");
val result = exec(compiler, System.err, args.toTypedArray())
exitCode = (result as Enum<*>).ordinal()
exitCode = (result as Enum<*>).ordinal
if (failOnError && exitCode != 0) {
throw BuildException("Compile failed; see the compiler error output for details.")

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="frontend.java" />
<orderEntry type="module" module-name="util.runtime" />
<orderEntry type="module" module-name="cli-common" />
<orderEntry type="module" module-name="util" />
<orderEntry type="module" module-name="compiler-tests" scope="TEST" />
<orderEntry type="library" scope="TEST" name="idea-full" level="project" />
</component>
</module>

View File

@@ -0,0 +1,21 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.build
import java.io.File
data class JvmSourceRoot(val file: File, val packagePrefix: String? = null)

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.build
import org.jetbrains.kotlin.incremental.LocalFileKotlinClass
import org.jetbrains.kotlin.load.kotlin.ModuleMapping
import org.jetbrains.kotlin.utils.sure
import java.io.File
open class GeneratedFile<Target>(
val target: Target,
val sourceFiles: Collection<File>,
val outputFile: File
)
class GeneratedJvmClass<Target> (
target: Target,
sourceFiles: Collection<File>,
outputFile: File
) : GeneratedFile<Target>(target, sourceFiles, outputFile) {
val outputClass = LocalFileKotlinClass.create(outputFile).sure {
"Couldn't load KotlinClass from $outputFile; it may happen because class doesn't have valid Kotlin annotations"
}
}
fun File.isModuleMappingFile() = extension == ModuleMapping.MAPPING_FILE_EXT && parentFile.name == "META-INF"

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -0,0 +1,126 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental
import org.jetbrains.annotations.TestOnly
import org.jetbrains.kotlin.config.IncrementalCompilation
import org.jetbrains.kotlin.load.java.JvmBytecodeBinaryVersion
import org.jetbrains.kotlin.load.kotlin.JvmMetadataVersion
import java.io.File
private val NORMAL_VERSION = 8
private val EXPERIMENTAL_VERSION = 3
private val DATA_CONTAINER_VERSION = 1
private val NORMAL_VERSION_FILE_NAME = "format-version.txt"
private val EXPERIMENTAL_VERSION_FILE_NAME = "experimental-format-version.txt"
private val DATA_CONTAINER_VERSION_FILE_NAME = "data-container-format-version.txt"
class CacheVersion(
private val ownVersion: Int,
private val versionFile: File,
private val whenVersionChanged: CacheVersion.Action,
private val whenTurnedOn: CacheVersion.Action,
private val whenTurnedOff: CacheVersion.Action,
isEnabled: ()->Boolean
) {
private val isEnabled by lazy(isEnabled)
private val actualVersion: Int
get() = versionFile.readText().toInt()
private val expectedVersion: Int
get() {
val metadata = JvmMetadataVersion.INSTANCE
val bytecode = JvmBytecodeBinaryVersion.INSTANCE
return ownVersion * 1000000 +
bytecode.major * 10000 + bytecode.minor * 100 +
metadata.major * 1000 + metadata.minor
}
fun checkVersion(): Action =
when (versionFile.exists() to isEnabled) {
true to true -> if (actualVersion != expectedVersion) whenVersionChanged else Action.DO_NOTHING
false to true -> whenTurnedOn
true to false -> whenTurnedOff
else -> Action.DO_NOTHING
}
fun saveIfNeeded() {
if (!isEnabled) return
if (!versionFile.parentFile.exists()) {
versionFile.parentFile.mkdirs()
}
versionFile.writeText(expectedVersion.toString())
}
fun clean() {
versionFile.delete()
}
@get:TestOnly
val formatVersionFile: File
get() = versionFile
// Order of entries is important, because actions are sorted in KotlinBuilder::checkVersions
enum class Action {
REBUILD_ALL_KOTLIN,
REBUILD_CHUNK,
CLEAN_NORMAL_CACHES,
CLEAN_EXPERIMENTAL_CACHES,
CLEAN_DATA_CONTAINER,
DO_NOTHING
}
}
fun normalCacheVersion(dataRoot: File): CacheVersion =
CacheVersion(ownVersion = NORMAL_VERSION,
versionFile = File(dataRoot, NORMAL_VERSION_FILE_NAME),
whenVersionChanged = CacheVersion.Action.REBUILD_CHUNK,
whenTurnedOn = CacheVersion.Action.REBUILD_CHUNK,
whenTurnedOff = CacheVersion.Action.CLEAN_NORMAL_CACHES,
isEnabled = { IncrementalCompilation.isEnabled() })
fun experimentalCacheVersion(dataRoot: File): CacheVersion =
CacheVersion(ownVersion = EXPERIMENTAL_VERSION,
versionFile = File(dataRoot, EXPERIMENTAL_VERSION_FILE_NAME),
whenVersionChanged = CacheVersion.Action.REBUILD_CHUNK,
whenTurnedOn = CacheVersion.Action.REBUILD_CHUNK,
whenTurnedOff = CacheVersion.Action.CLEAN_EXPERIMENTAL_CACHES,
isEnabled = { IncrementalCompilation.isExperimental() })
fun dataContainerCacheVersion(dataRoot: File): CacheVersion =
CacheVersion(ownVersion = DATA_CONTAINER_VERSION,
versionFile = File(dataRoot, DATA_CONTAINER_VERSION_FILE_NAME),
whenVersionChanged = CacheVersion.Action.REBUILD_ALL_KOTLIN,
whenTurnedOn = CacheVersion.Action.REBUILD_ALL_KOTLIN,
whenTurnedOff = CacheVersion.Action.CLEAN_DATA_CONTAINER,
isEnabled = { IncrementalCompilation.isExperimental() })
fun allCachesVersions(containerDataRoot: File, dataRoots: Iterable<File>): Iterable<CacheVersion> {
val versions = arrayListOf<CacheVersion>()
versions.add(dataContainerCacheVersion(containerDataRoot))
for (dataRoot in dataRoots) {
versions.add(normalCacheVersion(dataRoot))
versions.add(experimentalCacheVersion(dataRoot))
}
return versions
}

View File

@@ -0,0 +1,773 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental
import com.google.protobuf.MessageLite
import com.intellij.openapi.util.io.FileUtil.toSystemIndependentName
import com.intellij.util.SmartList
import com.intellij.util.io.BooleanDataDescriptor
import com.intellij.util.io.EnumeratorStringDescriptor
import org.jetbrains.annotations.TestOnly
import org.jetbrains.kotlin.build.GeneratedJvmClass
import org.jetbrains.kotlin.config.IncrementalCompilation
import org.jetbrains.kotlin.incremental.storage.*
import org.jetbrains.kotlin.inline.inlineFunctionsJvmNames
import org.jetbrains.kotlin.load.kotlin.ModuleMapping
import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache
import org.jetbrains.kotlin.load.kotlin.incremental.components.JvmPackagePartProto
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.resolve.jvm.JvmClassName
import org.jetbrains.kotlin.serialization.ProtoBuf
import org.jetbrains.kotlin.serialization.deserialization.NameResolver
import org.jetbrains.kotlin.serialization.deserialization.TypeTable
import org.jetbrains.kotlin.serialization.deserialization.supertypes
import org.jetbrains.kotlin.serialization.jvm.BitEncoding
import org.jetbrains.kotlin.serialization.jvm.JvmProtoBufUtil
import org.jetbrains.org.objectweb.asm.*
import java.io.File
import java.security.MessageDigest
import java.util.*
val KOTLIN_CACHE_DIRECTORY_NAME = "kotlin"
open class IncrementalCacheImpl<Target>(
private val targetDataRoot: File,
targetOutputDir: File?,
target: Target
) : BasicMapsOwner(), IncrementalCache {
companion object {
private val PROTO_MAP = "proto"
private val CONSTANTS_MAP = "constants"
private val PACKAGE_PARTS = "package-parts"
private val MULTIFILE_CLASS_FACADES = "multifile-class-facades"
private val MULTIFILE_CLASS_PARTS = "multifile-class-parts"
private val SOURCE_TO_CLASSES = "source-to-classes"
private val DIRTY_OUTPUT_CLASSES = "dirty-output-classes"
private val INLINE_FUNCTIONS = "inline-functions"
private val SUBTYPES = "subtypes"
private val SUPERTYPES = "supertypes"
private val CLASS_FQ_NAME_TO_SOURCE = "class-fq-name-to-source"
private val MODULE_MAPPING_FILE_NAME = "." + ModuleMapping.MAPPING_FILE_EXT
}
private val baseDir = File(targetDataRoot, KOTLIN_CACHE_DIRECTORY_NAME)
private val experimentalMaps = arrayListOf<BasicMap<*, *>>()
private fun <K, V, M : BasicMap<K, V>> registerExperimentalMap(map: M): M {
experimentalMaps.add(map)
return registerMap(map)
}
protected val String.storageFile: File
get() = File(baseDir, this + "." + CACHE_EXTENSION)
private val protoMap = registerMap(ProtoMap(PROTO_MAP.storageFile))
private val constantsMap = registerMap(ConstantsMap(CONSTANTS_MAP.storageFile))
private val packagePartMap = registerMap(PackagePartMap(PACKAGE_PARTS.storageFile))
private val multifileFacadeToParts = registerMap(MultifileClassFacadeMap(MULTIFILE_CLASS_FACADES.storageFile))
private val partToMultifileFacade = registerMap(MultifileClassPartMap(MULTIFILE_CLASS_PARTS.storageFile))
private val sourceToClassesMap = registerMap(SourceToClassesMap(SOURCE_TO_CLASSES.storageFile))
private val dirtyOutputClassesMap = registerMap(DirtyOutputClassesMap(DIRTY_OUTPUT_CLASSES.storageFile))
private val inlineFunctionsMap = registerMap(InlineFunctionsMap(INLINE_FUNCTIONS.storageFile))
private val subtypesMap = registerExperimentalMap(SubtypesMap(SUBTYPES.storageFile))
private val supertypesMap = registerExperimentalMap(SupertypesMap(SUPERTYPES.storageFile))
private val classFqNameToSourceMap = registerExperimentalMap(ClassFqNameToSourceMap(CLASS_FQ_NAME_TO_SOURCE.storageFile))
private val dependents = arrayListOf<IncrementalCacheImpl<Target>>()
private val outputDir by lazy(LazyThreadSafetyMode.NONE) { requireNotNull(targetOutputDir) { "Target is expected to have output directory: $target" } }
val thisWithDependentCaches: Iterable<IncrementalCacheImpl<Target>> by lazy {
val result = arrayListOf(this)
result.addAll(dependents)
result
}
override fun registerInline(fromPath: String, jvmSignature: String, toPath: String) {
}
protected open fun debugLog(message: String) {}
fun addDependentCache(cache: IncrementalCacheImpl<Target>) {
dependents.add(cache)
}
fun markOutputClassesDirty(removedAndCompiledSources: List<File>) {
for (sourceFile in removedAndCompiledSources) {
val classes = sourceToClassesMap[sourceFile]
classes.forEach {
dirtyOutputClassesMap.markDirty(it.internalName)
}
sourceToClassesMap.clearOutputsForSource(sourceFile)
}
}
fun getSubtypesOf(className: FqName): Sequence<FqName> =
subtypesMap[className].asSequence()
fun getSourceFileIfClass(fqName: FqName): File? = classFqNameToSourceMap[fqName]
fun isMultifileFacade(className: JvmClassName): Boolean =
className.internalName in multifileFacadeToParts
override fun getClassFilePath(internalClassName: String): String {
return toSystemIndependentName(File(outputDir, "$internalClassName.class").canonicalPath)
}
fun saveModuleMappingToCache(sourceFiles: Collection<File>, file: File): CompilationResult {
val jvmClassName = JvmClassName.byInternalName(MODULE_MAPPING_FILE_NAME)
protoMap.process(jvmClassName, file.readBytes(), emptyArray<String>(), isPackage = false, checkChangesIsOpenPart = false)
dirtyOutputClassesMap.notDirty(MODULE_MAPPING_FILE_NAME)
sourceFiles.forEach { sourceToClassesMap.add(it, jvmClassName) }
return CompilationResult.NO_CHANGES
}
open fun saveFileToCache(generatedClass: GeneratedJvmClass<Target>): CompilationResult {
val sourceFiles: Collection<File> = generatedClass.sourceFiles
val kotlinClass: LocalFileKotlinClass = generatedClass.outputClass
val className = kotlinClass.className
dirtyOutputClassesMap.notDirty(className.internalName)
sourceFiles.forEach {
sourceToClassesMap.add(it, className)
}
if (kotlinClass.classId.isLocal) {
return CompilationResult.NO_CHANGES
}
val header = kotlinClass.classHeader
val changesInfo = when (header.kind) {
KotlinClassHeader.Kind.FILE_FACADE -> {
assert(sourceFiles.size == 1) { "Package part from several source files: $sourceFiles" }
packagePartMap.addPackagePart(className)
protoMap.process(kotlinClass, isPackage = true) +
constantsMap.process(kotlinClass, isPackage = true) +
inlineFunctionsMap.process(kotlinClass, isPackage = true)
}
KotlinClassHeader.Kind.MULTIFILE_CLASS -> {
val partNames = kotlinClass.classHeader.data?.toList()
?: throw AssertionError("Multifile class has no parts: ${kotlinClass.className}")
multifileFacadeToParts[className] = partNames
// When a class is replaced with a facade with the same name,
// the class' proto wouldn't ever be deleted,
// because we don't write proto for multifile facades.
// As a workaround we can remove proto values for multifile facades.
protoMap.remove(className)
classFqNameToSourceMap.remove(className.fqNameForClassNameWithoutDollars)
// TODO NO_CHANGES? (delegates only)
constantsMap.process(kotlinClass, isPackage = true) +
inlineFunctionsMap.process(kotlinClass, isPackage = true)
}
KotlinClassHeader.Kind.MULTIFILE_CLASS_PART -> {
assert(sourceFiles.size == 1) { "Multifile class part from several source files: $sourceFiles" }
packagePartMap.addPackagePart(className)
partToMultifileFacade.set(className.internalName, header.multifileClassName!!)
protoMap.process(kotlinClass, isPackage = true) +
constantsMap.process(kotlinClass, isPackage = true) +
inlineFunctionsMap.process(kotlinClass, isPackage = true)
}
KotlinClassHeader.Kind.CLASS -> {
assert(sourceFiles.size == 1) { "Class is expected to have only one source file: $sourceFiles" }
addToClassStorage(kotlinClass, sourceFiles.first())
protoMap.process(kotlinClass, isPackage = false) +
constantsMap.process(kotlinClass, isPackage = false) +
inlineFunctionsMap.process(kotlinClass, isPackage = false)
}
else -> CompilationResult.NO_CHANGES
}
changesInfo.logIfSomethingChanged(className)
return changesInfo
}
private fun CompilationResult.logIfSomethingChanged(className: JvmClassName) {
if (this == CompilationResult.NO_CHANGES) return
debugLog("$className is changed: $this")
}
fun clearCacheForRemovedClasses(): CompilationResult {
fun <T> T.getNonPrivateNames(nameResolver: NameResolver, vararg members: T.() -> List<MessageLite>): Set<String> =
members.flatMap { this.it().filterNot { it.isPrivate }.names(nameResolver) }.toSet()
fun createChangeInfo(className: JvmClassName): ChangeInfo? {
if (className.internalName == MODULE_MAPPING_FILE_NAME) return null
val mapValue = protoMap.get(className) ?: return null
return when {
mapValue.isPackageFacade -> {
val packageData = JvmProtoBufUtil.readPackageDataFrom(mapValue.bytes, mapValue.strings)
val memberNames =
packageData.packageProto.getNonPrivateNames(
packageData.nameResolver,
ProtoBuf.Package::getFunctionList,
ProtoBuf.Package::getPropertyList
)
ChangeInfo.Removed(className.packageFqName, memberNames)
}
else -> {
val classData = JvmProtoBufUtil.readClassDataFrom(mapValue.bytes, mapValue.strings)
val memberNames =
classData.classProto.getNonPrivateNames(
classData.nameResolver,
ProtoBuf.Class::getConstructorList,
ProtoBuf.Class::getFunctionList,
ProtoBuf.Class::getPropertyList
) + classData.classProto.enumEntryList.map { classData.nameResolver.getString(it.name) }
ChangeInfo.Removed(className.fqNameForClassNameWithoutDollars, memberNames)
}
}
}
val dirtyClasses = dirtyOutputClassesMap
.getDirtyOutputClasses()
.map(JvmClassName::byInternalName)
.toList()
val changes =
if (IncrementalCompilation.isExperimental())
dirtyClasses.mapNotNull { createChangeInfo(it) }.asSequence()
else
emptySequence<ChangeInfo>()
val changesInfo = dirtyClasses.fold(CompilationResult(changes = changes)) { info, className ->
val newInfo = CompilationResult(protoChanged = className in protoMap,
constantsChanged = className in constantsMap)
newInfo.logIfSomethingChanged(className)
info + newInfo
}
val facadesWithRemovedParts = hashMapOf<JvmClassName, MutableSet<String>>()
for (dirtyClass in dirtyClasses) {
val facade = partToMultifileFacade.get(dirtyClass.internalName) ?: continue
val facadeClassName = JvmClassName.byInternalName(facade)
val removedParts = facadesWithRemovedParts.getOrPut(facadeClassName) { hashSetOf() }
removedParts.add(dirtyClass.internalName)
}
for ((facade, removedParts) in facadesWithRemovedParts.entries) {
val allParts = multifileFacadeToParts[facade.internalName] ?: continue
val notRemovedParts = allParts.filter { it !in removedParts }
if (notRemovedParts.isEmpty()) {
multifileFacadeToParts.remove(facade)
}
else {
multifileFacadeToParts[facade] = notRemovedParts
}
}
dirtyClasses.forEach {
protoMap.remove(it)
packagePartMap.remove(it)
multifileFacadeToParts.remove(it)
partToMultifileFacade.remove(it)
constantsMap.remove(it)
inlineFunctionsMap.remove(it)
}
removeAllFromClassStorage(dirtyClasses)
dirtyOutputClassesMap.clean()
return changesInfo
}
override fun getObsoletePackageParts(): Collection<String> {
val obsoletePackageParts =
dirtyOutputClassesMap.getDirtyOutputClasses().filter { packagePartMap.isPackagePart(JvmClassName.byInternalName(it)) }
debugLog("Obsolete package parts: ${obsoletePackageParts}")
return obsoletePackageParts
}
override fun getPackagePartData(partInternalName: String): JvmPackagePartProto? {
return protoMap[JvmClassName.byInternalName(partInternalName)]?.let { value ->
JvmPackagePartProto(value.bytes, value.strings)
}
}
override fun getObsoleteMultifileClasses(): Collection<String> {
val obsoleteMultifileClasses = linkedSetOf<String>()
for (dirtyClass in dirtyOutputClassesMap.getDirtyOutputClasses()) {
val dirtyFacade = partToMultifileFacade.get(dirtyClass) ?: continue
obsoleteMultifileClasses.add(dirtyFacade)
}
debugLog("Obsolete multifile class facades: $obsoleteMultifileClasses")
return obsoleteMultifileClasses
}
override fun getStableMultifileFacadeParts(facadeInternalName: String): Collection<String>? {
val partNames = multifileFacadeToParts.get(facadeInternalName) ?: return null
return partNames.filter { !dirtyOutputClassesMap.isDirty(it) }
}
override fun getMultifileFacade(partInternalName: String): String? {
return partToMultifileFacade.get(partInternalName)
}
override fun getModuleMappingData(): ByteArray? {
return protoMap[JvmClassName.byInternalName(MODULE_MAPPING_FILE_NAME)]?.bytes
}
override fun clean() {
super.clean()
normalCacheVersion(targetDataRoot).clean()
experimentalCacheVersion(targetDataRoot).clean()
}
fun cleanExperimental() {
experimentalCacheVersion(targetDataRoot).clean()
experimentalMaps.forEach { it.clean() }
}
fun classesBySources(sources: Iterable<File>): Iterable<JvmClassName> =
sources.flatMap { sourceToClassesMap[it] }
private inner class ProtoMap(storageFile: File) : BasicStringMap<ProtoMapValue>(storageFile, ProtoMapValueExternalizer) {
fun process(kotlinClass: LocalFileKotlinClass, isPackage: Boolean): CompilationResult {
val header = kotlinClass.classHeader
val bytes = BitEncoding.decodeBytes(header.data!!)
return put(kotlinClass.className, bytes, header.strings!!, isPackage, checkChangesIsOpenPart = true)
}
fun process(className: JvmClassName, data: ByteArray, strings: Array<String>, isPackage: Boolean, checkChangesIsOpenPart: Boolean): CompilationResult {
return put(className, data, strings, isPackage, checkChangesIsOpenPart)
}
private fun put(
className: JvmClassName, bytes: ByteArray, strings: Array<String>, isPackage: Boolean, checkChangesIsOpenPart: Boolean
): CompilationResult {
val key = className.internalName
val oldData = storage[key]
val data = ProtoMapValue(isPackage, bytes, strings)
if (oldData == null ||
!Arrays.equals(bytes, oldData.bytes) ||
!Arrays.equals(strings, oldData.strings) ||
isPackage != oldData.isPackageFacade
) {
storage[key] = data
}
if (oldData == null || !checkChangesIsOpenPart) return CompilationResult(protoChanged = true)
val difference = difference(oldData, data)
val fqName = if (isPackage) className.packageFqName else className.fqNameForClassNameWithoutDollars
val changeList = SmartList<ChangeInfo>()
if (difference.isClassAffected) {
changeList.add(ChangeInfo.SignatureChanged(fqName, difference.areSubclassesAffected))
}
if (difference.changedMembersNames.isNotEmpty()) {
changeList.add(ChangeInfo.MembersChanged(fqName, difference.changedMembersNames))
}
return CompilationResult(protoChanged = changeList.isNotEmpty(), changes = changeList.asSequence())
}
operator fun contains(className: JvmClassName): Boolean =
className.internalName in storage
operator fun get(className: JvmClassName): ProtoMapValue? =
storage[className.internalName]
fun remove(className: JvmClassName) {
storage.remove(className.internalName)
}
override fun dumpValue(value: ProtoMapValue): String {
return (if (value.isPackageFacade) "1" else "0") + java.lang.Long.toHexString(value.bytes.md5())
}
}
private inner class ConstantsMap(storageFile: File) : BasicStringMap<Map<String, Any>>(storageFile, ConstantsMapExternalizer) {
private fun getConstantsMap(bytes: ByteArray): Map<String, Any>? {
val result = HashMap<String, Any>()
ClassReader(bytes).accept(object : ClassVisitor(Opcodes.ASM5) {
override fun visitField(access: Int, name: String, desc: String, signature: String?, value: Any?): FieldVisitor? {
val staticFinal = Opcodes.ACC_STATIC or Opcodes.ACC_FINAL or Opcodes.ACC_PRIVATE
if (value != null && access and staticFinal == Opcodes.ACC_STATIC or Opcodes.ACC_FINAL) {
result[name] = value
}
return null
}
}, ClassReader.SKIP_CODE or ClassReader.SKIP_DEBUG or ClassReader.SKIP_FRAMES)
return if (result.isEmpty()) null else result
}
operator fun contains(className: JvmClassName): Boolean =
className.internalName in storage
fun process(kotlinClass: LocalFileKotlinClass, isPackage: Boolean): CompilationResult {
return put(kotlinClass.className, getConstantsMap(kotlinClass.fileContents), isPackage)
}
private fun put(className: JvmClassName, constantsMap: Map<String, Any>?, isPackage: Boolean): CompilationResult {
val key = className.internalName
val oldMap = storage[key]
if (oldMap == constantsMap) return CompilationResult.NO_CHANGES
if (constantsMap != null) {
storage[key] = constantsMap
}
else {
remove(className)
}
val changes =
if (!IncrementalCompilation.isExperimental() ||
constantsMap == null || constantsMap.isEmpty() ||
oldMap == null || oldMap.isEmpty()
) {
emptySequence<ChangeInfo>()
}
else {
// we need only changed constants everything other should be covered by diff
val changedNames = oldMap.filter { constantsMap.containsKey(it.key) && constantsMap[it.key] != it.value }.map { it.key }
val fqName = if (isPackage) className.packageFqName else className.fqNameForClassNameWithoutDollars
sequenceOf(ChangeInfo.MembersChanged(fqName, changedNames))
}
return CompilationResult(constantsChanged = true, changes = changes)
}
fun remove(className: JvmClassName) {
storage.remove(className.internalName)
}
override fun dumpValue(value: Map<String, Any>): String =
value.dumpMap(Any::toString)
}
private inner class PackagePartMap(storageFile: File) : BasicStringMap<Boolean>(storageFile, BooleanDataDescriptor.INSTANCE) {
fun addPackagePart(className: JvmClassName) {
storage[className.internalName] = true
}
fun remove(className: JvmClassName) {
storage.remove(className.internalName)
}
fun isPackagePart(className: JvmClassName): Boolean =
className.internalName in storage
override fun dumpValue(value: Boolean) = ""
}
private inner class MultifileClassFacadeMap(storageFile: File) : BasicStringMap<Collection<String>>(storageFile, StringCollectionExternalizer) {
operator fun set(facadeName: JvmClassName, partNames: Collection<String>) {
storage[facadeName.internalName] = partNames
}
operator fun get(internalName: String): Collection<String>? = storage[internalName]
operator fun contains(internalName: String): Boolean = internalName in storage
fun remove(className: JvmClassName) {
storage.remove(className.internalName)
}
override fun dumpValue(value: Collection<String>): String = value.dumpCollection()
}
private inner class MultifileClassPartMap(storageFile: File) : BasicStringMap<String>(storageFile, EnumeratorStringDescriptor.INSTANCE) {
fun set(partName: String, facadeName: String) {
storage[partName] = facadeName
}
fun get(partName: String): String? {
return storage.get(partName)
}
fun remove(className: JvmClassName) {
storage.remove(className.internalName)
}
override fun dumpValue(value: String): String = value
}
inner class SourceToClassesMap(storageFile: File) : BasicStringMap<Collection<String>>(storageFile, PathStringDescriptor, StringCollectionExternalizer) {
fun clearOutputsForSource(sourceFile: File) {
remove(sourceFile.absolutePath)
}
fun add(sourceFile: File, className: JvmClassName) {
storage.append(sourceFile.absolutePath, className.internalName)
}
operator fun get(sourceFile: File): Collection<JvmClassName> =
storage[sourceFile.absolutePath].orEmpty().map { JvmClassName.byInternalName(it) }
override fun dumpValue(value: Collection<String>) = value.dumpCollection()
private fun remove(path: String) {
storage.remove(path)
}
}
inner class ClassFqNameToSourceMap(storageFile: File) : BasicStringMap<String>(storageFile, EnumeratorStringDescriptor(), PathStringDescriptor) {
operator fun set(fqName: FqName, sourceFile: File) {
storage[fqName.asString()] = sourceFile.canonicalPath
}
operator fun get(fqName: FqName): File? =
storage[fqName.asString()]?.let(::File)
fun remove(fqName: FqName) {
storage.remove(fqName.asString())
}
override fun dumpValue(value: String) = value
}
private fun addToClassStorage(kotlinClass: LocalFileKotlinClass, srcFile: File) {
if (!IncrementalCompilation.isExperimental()) return
val classData = JvmProtoBufUtil.readClassDataFrom(kotlinClass.classHeader.data!!, kotlinClass.classHeader.strings!!)
val supertypes = classData.classProto.supertypes(TypeTable(classData.classProto.typeTable))
val parents = supertypes.map { classData.nameResolver.getClassId(it.className).asSingleFqName() }
.filter { it.asString() != "kotlin.Any" }
.toSet()
val child = kotlinClass.classId.asSingleFqName()
parents.forEach { subtypesMap.add(it, child) }
val removedSupertypes = supertypesMap[child].filter { it !in parents }
removedSupertypes.forEach { subtypesMap.removeValues(it, setOf(child)) }
supertypesMap[child] = parents
classFqNameToSourceMap[kotlinClass.className.fqNameForClassNameWithoutDollars] = srcFile
}
private fun removeAllFromClassStorage(removedClasses: Collection<JvmClassName>) {
if (!IncrementalCompilation.isExperimental() || removedClasses.isEmpty()) return
val removedFqNames = removedClasses.map { it.fqNameForClassNameWithoutDollars }.toSet()
for (cache in thisWithDependentCaches) {
val parentsFqNames = hashSetOf<FqName>()
val childrenFqNames = hashSetOf<FqName>()
for (removedFqName in removedFqNames) {
parentsFqNames.addAll(cache.supertypesMap[removedFqName])
childrenFqNames.addAll(cache.subtypesMap[removedFqName])
cache.supertypesMap.remove(removedFqName)
cache.subtypesMap.remove(removedFqName)
}
for (child in childrenFqNames) {
cache.supertypesMap.removeValues(child, removedFqNames)
}
for (parent in parentsFqNames) {
cache.subtypesMap.removeValues(parent, removedFqNames)
}
}
removedFqNames.forEach { classFqNameToSourceMap.remove(it) }
}
private inner class DirtyOutputClassesMap(storageFile: File) : BasicStringMap<Boolean>(storageFile, BooleanDataDescriptor.INSTANCE) {
fun markDirty(className: String) {
storage[className] = true
}
fun notDirty(className: String) {
storage.remove(className)
}
fun getDirtyOutputClasses(): Collection<String> =
storage.keys
fun isDirty(className: String): Boolean =
storage.contains(className)
override fun dumpValue(value: Boolean) = ""
}
private inner class InlineFunctionsMap(storageFile: File) : BasicStringMap<Map<String, Long>>(storageFile, StringToLongMapExternalizer) {
private fun getInlineFunctionsMap(bytes: ByteArray): Map<String, Long> {
val result = HashMap<String, Long>()
val inlineFunctions = inlineFunctionsJvmNames(bytes)
if (inlineFunctions.isEmpty()) return emptyMap()
ClassReader(bytes).accept(object : ClassVisitor(Opcodes.ASM5) {
override fun visitMethod(access: Int, name: String, desc: String, signature: String?, exceptions: Array<out String>?): MethodVisitor? {
val dummyClassWriter = ClassWriter(Opcodes.ASM5)
return object : MethodVisitor(Opcodes.ASM5, dummyClassWriter.visitMethod(0, name, desc, null, exceptions)) {
override fun visitEnd() {
val jvmName = name + desc
if (jvmName !in inlineFunctions) return
val dummyBytes = dummyClassWriter.toByteArray()!!
val hash = dummyBytes.md5()
result[jvmName] = hash
}
}
}
}, 0)
return result
}
fun process(kotlinClass: LocalFileKotlinClass, isPackage: Boolean): CompilationResult {
return put(kotlinClass.className, getInlineFunctionsMap(kotlinClass.fileContents), isPackage)
}
private fun put(className: JvmClassName, newMap: Map<String, Long>, isPackage: Boolean): CompilationResult {
val internalName = className.internalName
val oldMap = storage[internalName] ?: emptyMap()
val added = hashSetOf<String>()
val changed = hashSetOf<String>()
val allFunctions = oldMap.keys + newMap.keys
for (fn in allFunctions) {
val oldHash = oldMap[fn]
val newHash = newMap[fn]
when {
oldHash == null -> added.add(fn)
oldHash != newHash -> changed.add(fn)
}
}
when {
newMap.isNotEmpty() -> storage[internalName] = newMap
else -> storage.remove(internalName)
}
val changes =
if (IncrementalCompilation.isExperimental()) {
val fqName = if (isPackage) className.packageFqName else className.fqNameForClassNameWithoutDollars
// TODO get name in better way instead of using substringBefore
(added.asSequence() + changed.asSequence()).map { ChangeInfo.MembersChanged(fqName, listOf(it.substringBefore("("))) }
}
else {
emptySequence<ChangeInfo>()
}
processChangedInlineFunctions(className, changed)
return CompilationResult(inlineChanged = changed.isNotEmpty(),
inlineAdded = added.isNotEmpty(),
changes = changes)
}
fun remove(className: JvmClassName) {
storage.remove(className.internalName)
}
override fun dumpValue(value: Map<String, Long>): String =
value.dumpMap { java.lang.Long.toHexString(it) }
}
protected open fun processChangedInlineFunctions(
className: JvmClassName,
changedFunctions: Collection<String>
) {
}
}
sealed class ChangeInfo(val fqName: FqName) {
open class MembersChanged(fqName: FqName, val names: Collection<String>) : ChangeInfo(fqName) {
override fun toStringProperties(): String = super.toStringProperties() + ", names = $names"
}
class Removed(fqName: FqName, names: Collection<String>) : MembersChanged(fqName, names)
class SignatureChanged(fqName: FqName, val areSubclassesAffected: Boolean) : ChangeInfo(fqName)
protected open fun toStringProperties(): String = "fqName = $fqName"
override fun toString(): String {
return this.javaClass.simpleName + "(${toStringProperties()})"
}
}
data class CompilationResult(
val protoChanged: Boolean = false,
val constantsChanged: Boolean = false,
val inlineChanged: Boolean = false,
val inlineAdded: Boolean = false,
val changes: Sequence<ChangeInfo> = emptySequence()
) {
companion object {
val NO_CHANGES: CompilationResult = CompilationResult()
}
operator fun plus(other: CompilationResult): CompilationResult =
CompilationResult(protoChanged || other.protoChanged,
constantsChanged || other.constantsChanged,
inlineChanged || other.inlineChanged,
inlineAdded || other.inlineAdded,
changes + other.changes)
}
fun ByteArray.md5(): Long {
val d = MessageDigest.getInstance("MD5").digest(this)!!
return ((d[0].toLong() and 0xFFL)
or ((d[1].toLong() and 0xFFL) shl 8)
or ((d[2].toLong() and 0xFFL) shl 16)
or ((d[3].toLong() and 0xFFL) shl 24)
or ((d[4].toLong() and 0xFFL) shl 32)
or ((d[5].toLong() and 0xFFL) shl 40)
or ((d[6].toLong() and 0xFFL) shl 48)
or ((d[7].toLong() and 0xFFL) shl 56)
)
}
@TestOnly
fun <K : Comparable<K>, V> Map<K, V>.dumpMap(dumpValue: (V)->String): String =
buildString {
append("{")
for (key in keys.sorted()) {
if (length != 1) {
append(", ")
}
val value = get(key)?.let(dumpValue) ?: "null"
append("$key -> $value")
}
append("}")
}
@TestOnly fun <T : Comparable<T>> Collection<T>.dumpCollection(): String =
"[${sorted().joinToString(", ", transform = Any::toString)}]"

View File

@@ -14,22 +14,19 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.jps.incremental
package org.jetbrains.kotlin.incremental
import org.jetbrains.jps.incremental.ModuleBuildTarget
import org.jetbrains.kotlin.incremental.components.LookupTracker
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCompilationComponents
import org.jetbrains.kotlin.modules.TargetId
public class IncrementalCompilationComponentsImpl(
caches: Map<ModuleBuildTarget, IncrementalCache>,
class IncrementalCompilationComponentsImpl(
private val caches: Map<TargetId, IncrementalCache>,
private val lookupTracker: LookupTracker
): IncrementalCompilationComponents {
private val caches = caches.mapKeys { TargetId(it.key) }
override fun getIncrementalCache(target: TargetId): IncrementalCache =
caches[target]!!
caches[target] ?: throw Exception("Incremental cache for target ${target.name} not found")
override fun getLookupTracker(): LookupTracker = lookupTracker
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.jps.incremental
package org.jetbrains.kotlin.incremental
import org.jetbrains.kotlin.load.kotlin.FileBasedKotlinClass
import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader
@@ -40,9 +40,9 @@ class LocalFileKotlinClass private constructor(
}
}
public val className: JvmClassName by lazy { JvmClassName.byClassId(classId) }
val className: JvmClassName by lazy { JvmClassName.byClassId(classId) }
override fun getLocation() = file.getAbsolutePath()
override fun getLocation(): String = file.absolutePath
public override fun getFileContents(): ByteArray = fileContents

View File

@@ -0,0 +1,217 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental
import com.intellij.util.containers.MultiMap
import com.intellij.util.containers.StringInterner
import org.jetbrains.annotations.TestOnly
import org.jetbrains.kotlin.incremental.components.LookupTracker
import org.jetbrains.kotlin.incremental.components.Position
import org.jetbrains.kotlin.incremental.components.ScopeKind
import org.jetbrains.kotlin.incremental.storage.*
import org.jetbrains.kotlin.utils.Printer
import org.jetbrains.kotlin.utils.keysToMap
import java.io.File
import java.util.*
open class LookupStorage(private val targetDataDir: File) : BasicMapsOwner() {
companion object {
private val DELETED_TO_SIZE_TRESHOLD = 0.5
private val MINIMUM_GARBAGE_COLLECTIBLE_SIZE = 10000
}
private val String.storageFile: File
get() = File(targetDataDir, this + "." + CACHE_EXTENSION)
private val countersFile = "counters".storageFile
private val idToFile = registerMap(IdToFileMap("id-to-file".storageFile))
private val fileToId = registerMap(FileToIdMap("file-to-id".storageFile))
private val lookupMap = registerMap(LookupMap("lookups".storageFile))
@Volatile
private var size: Int = 0
@Volatile
private var deletedCount: Int = 0
init {
if (countersFile.exists()) {
val lines = countersFile.readLines()
size = lines[0].toInt()
deletedCount = lines[1].toInt()
}
}
@Synchronized
fun get(lookupSymbol: LookupSymbol): Collection<String> {
val key = LookupSymbolKey(lookupSymbol.name, lookupSymbol.scope)
val fileIds = lookupMap[key] ?: return emptySet()
return fileIds.mapNotNull {
// null means it's outdated
idToFile[it]?.path
}
}
@Synchronized
fun addAll(lookups: Set<Map.Entry<LookupSymbol, Collection<String>>>, allPaths: Set<String>) {
val pathToId = allPaths.keysToMap { addFileIfNeeded(File(it)) }
for ((lookupSymbol, paths) in lookups) {
val key = LookupSymbolKey(lookupSymbol.name, lookupSymbol.scope)
val fileIds = paths.mapTo(HashSet<Int>()) { pathToId[it]!! }
fileIds.addAll(lookupMap[key] ?: emptySet())
lookupMap[key] = fileIds
}
}
@Synchronized
fun removeLookupsFrom(files: Sequence<File>) {
for (file in files) {
val id = fileToId[file] ?: continue
idToFile.remove(id)
fileToId.remove(file)
deletedCount++
}
}
@Synchronized
override fun clean() {
if (countersFile.exists()) {
countersFile.delete()
}
size = 0
deletedCount = 0
super.clean()
}
@Synchronized
override fun flush(memoryCachesOnly: Boolean) {
try {
removeGarbageIfNeeded()
if (size > 0) {
if (!countersFile.exists()) {
countersFile.parentFile.mkdirs()
countersFile.createNewFile()
}
countersFile.writeText("$size\n$deletedCount")
}
}
finally {
super.flush(memoryCachesOnly)
}
}
private fun addFileIfNeeded(file: File): Int {
val existing = fileToId[file]
if (existing != null) return existing
val id = size++
fileToId[file] = id
idToFile[id] = file
return id
}
private fun removeGarbageIfNeeded(force: Boolean = false) {
if (force || (size > MINIMUM_GARBAGE_COLLECTIBLE_SIZE && deletedCount.toDouble() / size > DELETED_TO_SIZE_TRESHOLD)) {
doRemoveGarbage()
}
}
private fun doRemoveGarbage() {
for (hash in lookupMap.keys) {
lookupMap[hash] = lookupMap[hash]!!.filter { it in idToFile }.toSet()
}
val oldFileToId = fileToId.toMap()
val oldIdToNewId = HashMap<Int, Int>(oldFileToId.size)
idToFile.clean()
fileToId.clean()
size = 0
deletedCount = 0
for ((file, oldId) in oldFileToId.entries) {
val newId = addFileIfNeeded(file)
oldIdToNewId[oldId] = newId
}
for (lookup in lookupMap.keys) {
val fileIds = lookupMap[lookup]!!.mapNotNull { oldIdToNewId[it] }.toSet()
if (fileIds.isEmpty()) {
lookupMap.remove(lookup)
}
else {
lookupMap[lookup] = fileIds
}
}
}
@TestOnly fun forceGC() {
removeGarbageIfNeeded(force = true)
flush(false)
}
@TestOnly fun dump(lookupSymbols: Set<LookupSymbol>, basePath: File? = null): String {
flush(false)
val sb = StringBuilder()
val p = Printer(sb)
val lookupsStrings = lookupSymbols.groupBy { LookupSymbolKey(it.name, it.scope) }
for (lookup in lookupMap.keys.sorted()) {
val fileIds = lookupMap[lookup]!!
val key = if (lookup in lookupsStrings) {
lookupsStrings[lookup]!!.map { "${it.scope}#${it.name}" }.sorted().joinToString(", ")
}
else {
lookup.toString()
}
val value = fileIds.map { idToFile[it]?.let { if (basePath == null) it.absolutePath else it.toRelativeString(basePath) } ?: it.toString() }.sorted().joinToString(", ")
p.println("$key -> $value")
}
return sb.toString()
}
}
class LookupTrackerImpl(private val delegate: LookupTracker) : LookupTracker {
val lookups = MultiMap<LookupSymbol, String>()
val pathInterner = StringInterner()
private val interner = StringInterner()
override val requiresPosition: Boolean
get() = delegate.requiresPosition
override fun record(filePath: String, position: Position, scopeFqName: String, scopeKind: ScopeKind, name: String) {
val internedScopeFqName = interner.intern(scopeFqName)
val internedName = interner.intern(name)
val internedFilePath = pathInterner.intern(filePath)
lookups.putValue(LookupSymbol(internedName, internedScopeFqName), internedFilePath)
delegate.record(internedFilePath, position, internedScopeFqName, scopeKind, internedName)
}
}
data class LookupSymbol(val name: String, val scope: String)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,284 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// these functions are used in the kotlin gradle plugin
@file:Suppress("unused")
package org.jetbrains.kotlin.incremental
import com.intellij.ide.highlighter.JavaFileType
import com.intellij.openapi.util.io.FileUtil
import com.intellij.openapi.util.text.StringUtil
import org.jetbrains.kotlin.build.GeneratedFile
import org.jetbrains.kotlin.build.GeneratedJvmClass
import org.jetbrains.kotlin.build.JvmSourceRoot
import org.jetbrains.kotlin.build.isModuleMappingFile
import org.jetbrains.kotlin.compilerRunner.OutputItemsCollectorImpl
import org.jetbrains.kotlin.config.IncrementalCompilation
import org.jetbrains.kotlin.config.Services
import org.jetbrains.kotlin.incremental.components.LookupTracker
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCompilationComponents
import org.jetbrains.kotlin.modules.KotlinModuleXmlBuilder
import org.jetbrains.kotlin.modules.TargetId
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.progress.CompilationCanceledStatus
import org.jetbrains.kotlin.utils.keysToMap
import java.io.File
import java.util.*
fun Iterable<File>.javaSourceRoots(roots: Iterable<File>): Iterable<File> =
filter { it.isJavaFile() }
.map { findSrcDirRoot(it, roots) }
.filterNotNull()
fun makeModuleFile(name: String, isTest: Boolean, outputDir: File, sourcesToCompile: Iterable<File>, javaSourceRoots: Iterable<File>, classpath: Iterable<File>, friendDirs: Iterable<File>): File {
val builder = KotlinModuleXmlBuilder()
builder.addModule(
name,
outputDir.absolutePath,
sourcesToCompile,
javaSourceRoots.map { JvmSourceRoot(it) },
classpath,
"java-production",
isTest,
// this excludes the output directories from the class path, to be removed for true incremental compilation
setOf(outputDir),
friendDirs
)
val scriptFile = File.createTempFile("kjps", StringUtil.sanitizeJavaIdentifier(name) + ".script.xml")
FileUtil.writeToFile(scriptFile, builder.asText().toString())
return scriptFile
}
fun makeCompileServices(
incrementalCaches: Map<TargetId, IncrementalCache>,
lookupTracker: LookupTracker,
compilationCanceledStatus: CompilationCanceledStatus?
): Services =
with(Services.Builder()) {
register(IncrementalCompilationComponents::class.java, IncrementalCompilationComponentsImpl(incrementalCaches, lookupTracker))
compilationCanceledStatus?.let {
register(CompilationCanceledStatus::class.java, it)
}
build()
}
fun makeLookupTracker(parentLookupTracker: LookupTracker = LookupTracker.DO_NOTHING): LookupTracker =
if (IncrementalCompilation.isExperimental()) LookupTrackerImpl(parentLookupTracker)
else parentLookupTracker
fun<Target> makeIncrementalCachesMap(
targets: Iterable<Target>,
getDependencies: (Target) -> Iterable<Target>,
getCache: (Target) -> IncrementalCacheImpl<Target>,
getTargetId: Target.() -> TargetId
): Map<TargetId, IncrementalCacheImpl<Target>>
{
val dependents = targets.keysToMap { hashSetOf<Target>() }
val targetsWithDependents = targets.toHashSet()
for (target in targets) {
for (dependency in getDependencies(target)) {
if (dependency !in targets) continue
dependents[dependency]!!.add(target)
targetsWithDependents.add(target)
}
}
val caches = targetsWithDependents.keysToMap { getCache(it) }
for ((target, cache) in caches) {
dependents[target]?.forEach {
cache.addDependentCache(caches[it]!!)
}
}
return caches.mapKeys { it.key.getTargetId() }
}
fun<Target> updateIncrementalCaches(
targets: Iterable<Target>,
generatedFiles: List<GeneratedFile<Target>>,
compiledWithErrors: Boolean,
getIncrementalCache: (Target) -> IncrementalCacheImpl<Target>
): CompilationResult {
var changesInfo = CompilationResult.NO_CHANGES
for (generatedFile in generatedFiles) {
val ic = getIncrementalCache(generatedFile.target)
when {
generatedFile is GeneratedJvmClass<Target> -> changesInfo += ic.saveFileToCache(generatedFile)
generatedFile.outputFile.isModuleMappingFile() -> changesInfo += ic.saveModuleMappingToCache(generatedFile.sourceFiles, generatedFile.outputFile)
}
}
if (!compiledWithErrors) {
targets.forEach {
val newChangesInfo = getIncrementalCache(it).clearCacheForRemovedClasses()
changesInfo += newChangesInfo
}
}
return changesInfo
}
fun LookupStorage.update(
lookupTracker: LookupTracker,
filesToCompile: Iterable<File>,
removedFiles: Iterable<File>
) {
if (lookupTracker !is LookupTrackerImpl) throw AssertionError("Lookup tracker is expected to be LookupTrackerImpl, got ${lookupTracker.javaClass}")
removeLookupsFrom(filesToCompile.asSequence() + removedFiles.asSequence())
addAll(lookupTracker.lookups.entrySet(), lookupTracker.pathInterner.values)
}
fun<Target> OutputItemsCollectorImpl.generatedFiles(
targets: Collection<Target>,
representativeTarget: Target,
getSources: (Target) -> Iterable<File>,
getOutputDir: (Target) -> File?
): List<GeneratedFile<Target>> {
// If there's only one target, this map is empty: get() always returns null, and the representativeTarget will be used below
val sourceToTarget =
if (targets.size >1) targets.flatMap { target -> getSources(target).map { Pair(it, target) } }.toMap()
else mapOf<File, Target>()
return outputs.map { outputItem ->
val target =
outputItem.sourceFiles.firstOrNull()?.let { sourceToTarget[it] } ?:
targets.filter { getOutputDir(it)?.let { outputItem.outputFile.startsWith(it) } ?: false }.singleOrNull() ?:
representativeTarget
if (outputItem.outputFile.name.endsWith(".class"))
GeneratedJvmClass(target, outputItem.sourceFiles, outputItem.outputFile)
else
GeneratedFile(target, outputItem.sourceFiles, outputItem.outputFile)
}
}
data class DirtyData(
val dirtyLookupSymbols: Iterable<LookupSymbol>,
val dirtyClassesFqNames: Iterable<FqName>
)
fun <Target> CompilationResult.getDirtyData(
caches: Iterable<IncrementalCacheImpl<Target>>,
log: (String)->Unit
): DirtyData {
val dirtyLookupSymbols = HashSet<LookupSymbol>()
val dirtyClassesFqNames = HashSet<FqName>()
for (change in changes) {
log("Process $change")
if (change is ChangeInfo.SignatureChanged) {
val fqNames = if (!change.areSubclassesAffected) listOf(change.fqName) else withSubtypes(change.fqName, caches)
for (classFqName in fqNames) {
assert(!classFqName.isRoot) { "$classFqName is root when processing $change" }
val scope = classFqName.parent().asString()
val name = classFqName.shortName().identifier
dirtyLookupSymbols.add(LookupSymbol(name, scope))
}
}
else if (change is ChangeInfo.MembersChanged) {
val fqNames = withSubtypes(change.fqName, caches)
// need to recompile subtypes because changed member might break override
dirtyClassesFqNames.addAll(fqNames)
for (name in change.names) {
for (fqName in fqNames) {
dirtyLookupSymbols.add(LookupSymbol(name, fqName.asString()))
}
}
}
}
return DirtyData(dirtyLookupSymbols, dirtyClassesFqNames)
}
fun mapLookupSymbolsToFiles(
lookupStorage: LookupStorage,
lookupSymbols: Iterable<LookupSymbol>,
log: (String)->Unit,
getLogFilePath: (File)->String = { it.canonicalPath },
excludes: Set<File> = emptySet()
): Set<File> {
val dirtyFiles = HashSet<File>()
for (lookup in lookupSymbols) {
val affectedFiles = lookupStorage.get(lookup).map(::File).filter { it !in excludes }
log("${lookup.scope}#${lookup.name} caused recompilation of: ${affectedFiles.map(getLogFilePath)}")
dirtyFiles.addAll(affectedFiles)
}
return dirtyFiles
}
fun <Target> mapClassesFqNamesToFiles(
caches: Iterable<IncrementalCacheImpl<Target>>,
classesFqNames: Iterable<FqName>,
log: (String)->Unit,
getLogFilePath: (File)->String = { it.canonicalPath },
excludes: Set<File> = emptySet()
): Set<File> {
val dirtyFiles = HashSet<File>()
for (cache in caches) {
for (dirtyClassFqName in classesFqNames) {
val srcFile = cache.getSourceFileIfClass(dirtyClassFqName)
if (srcFile == null || srcFile in excludes) continue
log("Class $dirtyClassFqName caused recompilation of: ${getLogFilePath(srcFile)}")
dirtyFiles.add(srcFile)
}
}
return dirtyFiles
}
private fun File.isJavaFile() = extension.equals(JavaFileType.INSTANCE.defaultExtension, ignoreCase = true)
private fun findSrcDirRoot(file: File, roots: Iterable<File>): File? =
roots.firstOrNull { FileUtil.isAncestor(it, file, false) }
private fun <Target> withSubtypes(
typeFqName: FqName,
caches: Iterable<IncrementalCacheImpl<Target>>
): Set<FqName> {
val types = LinkedList(listOf(typeFqName))
val subtypes = hashSetOf<FqName>()
while (types.isNotEmpty()) {
val unprocessedType = types.pollFirst()
caches.asSequence()
.flatMap { it.getSubtypesOf(unprocessedType) }
.filter { it !in subtypes }
.forEach { types.addLast(it) }
subtypes.add(unprocessedType)
}
return subtypes
}

View File

@@ -0,0 +1,275 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental
import com.google.protobuf.MessageLite
import org.jetbrains.kotlin.descriptors.Visibilities
import org.jetbrains.kotlin.incremental.ProtoCompareGenerated.ProtoBufClassKind
import org.jetbrains.kotlin.incremental.ProtoCompareGenerated.ProtoBufPackageKind
import org.jetbrains.kotlin.incremental.storage.ProtoMapValue
import org.jetbrains.kotlin.serialization.Flags
import org.jetbrains.kotlin.serialization.ProtoBuf
import org.jetbrains.kotlin.serialization.deserialization.Deserialization
import org.jetbrains.kotlin.serialization.deserialization.NameResolver
import org.jetbrains.kotlin.serialization.jvm.JvmProtoBufUtil
import org.jetbrains.kotlin.utils.HashSetUtil
import java.util.*
data class Difference(
val isClassAffected: Boolean = false,
val areSubclassesAffected: Boolean = false,
val changedMembersNames: Set<String> = emptySet()
)
fun difference(oldData: ProtoMapValue, newData: ProtoMapValue): Difference {
if (!oldData.isPackageFacade && newData.isPackageFacade) return Difference(isClassAffected = true, areSubclassesAffected = true)
if (oldData.isPackageFacade && !newData.isPackageFacade) return Difference(isClassAffected = true)
val differenceObject =
if (oldData.isPackageFacade) {
DifferenceCalculatorForPackageFacade(oldData, newData)
}
else {
DifferenceCalculatorForClass(oldData, newData)
}
return differenceObject.difference()
}
internal val MessageLite.isPrivate: Boolean
get() = Visibilities.isPrivate(Deserialization.visibility(
when (this) {
is ProtoBuf.Constructor -> Flags.VISIBILITY.get(flags)
is ProtoBuf.Function -> Flags.VISIBILITY.get(flags)
is ProtoBuf.Property -> Flags.VISIBILITY.get(flags)
else -> error("Unknown message: $this")
}))
private fun MessageLite.name(nameResolver: NameResolver): String {
return when (this) {
is ProtoBuf.Constructor -> "<init>"
is ProtoBuf.Function -> nameResolver.getString(name)
is ProtoBuf.Property -> nameResolver.getString(name)
else -> error("Unknown message: $this")
}
}
internal fun List<MessageLite>.names(nameResolver: NameResolver): List<String> = map { it.name(nameResolver) }
private abstract class DifferenceCalculator() {
protected abstract val oldNameResolver: NameResolver
protected abstract val newNameResolver: NameResolver
protected val compareObject by lazy { ProtoCompareGenerated(oldNameResolver, newNameResolver) }
abstract fun difference(): Difference
protected fun calcDifferenceForMembers(oldList: List<MessageLite>, newList: List<MessageLite>): Collection<String> {
val result = hashSetOf<String>()
val oldMap =
oldList.groupBy { it.getHashCode({ compareObject.oldGetIndexOfString(it) }, { compareObject.oldGetIndexOfClassId(it) }) }
val newMap =
newList.groupBy { it.getHashCode({ compareObject.newGetIndexOfString(it) }, { compareObject.newGetIndexOfClassId(it) }) }
val hashes = oldMap.keys + newMap.keys
for (hash in hashes) {
val oldMembers = oldMap[hash]
val newMembers = newMap[hash]
val differentMembers = when {
newMembers == null -> oldMembers!!.names(compareObject.oldNameResolver)
oldMembers == null -> newMembers.names(compareObject.newNameResolver)
else -> calcDifferenceForEqualHashes(oldMembers, newMembers)
}
result.addAll(differentMembers)
}
return result
}
private fun calcDifferenceForEqualHashes(
oldList: List<MessageLite>,
newList: List<MessageLite>
): Collection<String> {
val result = hashSetOf<String>()
val newSet = HashSet(newList)
oldList.forEach { oldMember ->
val newMember = newSet.firstOrNull { compareObject.checkEquals(oldMember, it) }
if (newMember != null) {
newSet.remove(newMember)
}
else {
result.add(oldMember.name(compareObject.oldNameResolver))
}
}
newSet.forEach { newMember ->
result.add(newMember.name(compareObject.newNameResolver))
}
return result
}
protected fun calcDifferenceForNames(
oldList: List<Int>,
newList: List<Int>
): Collection<String> {
val oldNames = oldList.map { compareObject.oldNameResolver.getString(it) }.toSet()
val newNames = newList.map { compareObject.newNameResolver.getString(it) }.toSet()
return HashSetUtil.symmetricDifference(oldNames, newNames)
}
private fun MessageLite.getHashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int {
return when (this) {
is ProtoBuf.Constructor -> hashCode(stringIndexes, fqNameIndexes)
is ProtoBuf.Function -> hashCode(stringIndexes, fqNameIndexes)
is ProtoBuf.Property -> hashCode(stringIndexes, fqNameIndexes)
else -> error("Unknown message: $this")
}
}
private fun ProtoCompareGenerated.checkEquals(old: MessageLite, new: MessageLite): Boolean {
return when {
old is ProtoBuf.Constructor && new is ProtoBuf.Constructor -> checkEquals(old, new)
old is ProtoBuf.Function && new is ProtoBuf.Function -> checkEquals(old, new)
old is ProtoBuf.Property && new is ProtoBuf.Property -> checkEquals(old, new)
else -> error("Unknown message: $this")
}
}
}
private class DifferenceCalculatorForClass(oldData: ProtoMapValue, newData: ProtoMapValue) : DifferenceCalculator() {
val oldClassData = JvmProtoBufUtil.readClassDataFrom(oldData.bytes, oldData.strings)
val newClassData = JvmProtoBufUtil.readClassDataFrom(newData.bytes, newData.strings)
val oldProto = oldClassData.classProto
val newProto = newClassData.classProto
override val oldNameResolver = oldClassData.nameResolver
override val newNameResolver = newClassData.nameResolver
val diff = compareObject.difference(oldProto, newProto)
override fun difference(): Difference {
var isClassAffected = false
var areSubclassesAffected = false
val names = hashSetOf<String>()
val classIsSealed = newProto.isSealed && oldProto.isSealed
fun Int.oldToNames() = names.add(oldNameResolver.getString(this))
fun Int.newToNames() = names.add(newNameResolver.getString(this))
fun calcDifferenceForNonPrivateMembers(members: (ProtoBuf.Class) -> List<MessageLite>): Collection<String> {
val oldMembers = members(oldProto).filterNot { it.isPrivate }
val newMembers = members(newProto).filterNot { it.isPrivate }
return calcDifferenceForMembers(oldMembers, newMembers)
}
for (kind in diff) {
when (kind!!) {
ProtoBufClassKind.COMPANION_OBJECT_NAME -> {
if (oldProto.hasCompanionObjectName()) oldProto.companionObjectName.oldToNames()
if (newProto.hasCompanionObjectName()) newProto.companionObjectName.newToNames()
}
ProtoBufClassKind.NESTED_CLASS_NAME_LIST -> {
if (classIsSealed) {
// when class is sealed, adding an implementation can break exhaustive when expressions
// the workaround is to recompile all class usages
isClassAffected = true
}
names.addAll(calcDifferenceForNames(oldProto.nestedClassNameList, newProto.nestedClassNameList))
}
ProtoBufClassKind.CONSTRUCTOR_LIST -> {
val differentNonPrivateConstructors = calcDifferenceForNonPrivateMembers(ProtoBuf.Class::getConstructorList)
if (differentNonPrivateConstructors.isNotEmpty()) {
isClassAffected = true
}
}
ProtoBufClassKind.FUNCTION_LIST ->
names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Class::getFunctionList))
ProtoBufClassKind.PROPERTY_LIST ->
names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Class::getPropertyList))
ProtoBufClassKind.ENUM_ENTRY_LIST -> {
isClassAffected = true
}
ProtoBufClassKind.TYPE_TABLE -> {
// TODO
}
ProtoBufClassKind.FLAGS,
ProtoBufClassKind.FQ_NAME,
ProtoBufClassKind.TYPE_PARAMETER_LIST,
ProtoBufClassKind.SUPERTYPE_LIST,
ProtoBufClassKind.SUPERTYPE_ID_LIST-> {
isClassAffected = true
areSubclassesAffected = true
}
ProtoBufClassKind.CLASS_MODULE_NAME -> {
// TODO
}
}
}
return Difference(isClassAffected, areSubclassesAffected, names)
}
}
private class DifferenceCalculatorForPackageFacade(oldData: ProtoMapValue, newData: ProtoMapValue) : DifferenceCalculator() {
val oldPackageData = JvmProtoBufUtil.readPackageDataFrom(oldData.bytes, oldData.strings)
val newPackageData = JvmProtoBufUtil.readPackageDataFrom(newData.bytes, newData.strings)
val oldProto = oldPackageData.packageProto
val newProto = newPackageData.packageProto
override val oldNameResolver = oldPackageData.nameResolver
override val newNameResolver = newPackageData.nameResolver
val diff = compareObject.difference(oldProto, newProto)
override fun difference(): Difference {
val names = hashSetOf<String>()
fun calcDifferenceForNonPrivateMembers(members: (ProtoBuf.Package) -> List<MessageLite>): Collection<String> {
val oldMembers = members(oldProto).filterNot { it.isPrivate }
val newMembers = members(newProto).filterNot { it.isPrivate }
return calcDifferenceForMembers(oldMembers, newMembers)
}
for (kind in diff) {
when (kind!!) {
ProtoBufPackageKind.FUNCTION_LIST ->
names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Package::getFunctionList))
ProtoBufPackageKind.PROPERTY_LIST ->
names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Package::getPropertyList))
ProtoBufPackageKind.TYPE_TABLE,
ProtoBufPackageKind.PACKAGE_MODULE_NAME -> {
// TODO
}
else -> throw IllegalArgumentException("Unsupported kind: $kind")
}
}
return Difference(changedMembersNames = names)
}
}
private val ProtoBuf.Class.isSealed: Boolean
get() = ProtoBuf.Modality.SEALED == Flags.MODALITY.get(flags)

View File

@@ -0,0 +1,81 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental.storage
import com.intellij.util.io.DataExternalizer
import com.intellij.util.io.EnumeratorStringDescriptor
import com.intellij.util.io.KeyDescriptor
import org.jetbrains.annotations.TestOnly
import org.jetbrains.kotlin.utils.Printer
import java.io.File
abstract class BasicMap<K : Comparable<K>, V>(
storageFile: File,
keyDescriptor: KeyDescriptor<K>,
valueExternalizer: DataExternalizer<V>
) {
protected val storage = LazyStorage(storageFile, keyDescriptor, valueExternalizer)
fun clean() {
storage.clean()
}
fun flush(memoryCachesOnly: Boolean) {
storage.flush(memoryCachesOnly)
}
fun close() {
storage.close()
}
@TestOnly
fun dump(): String {
return with(StringBuilder()) {
with(Printer(this)) {
println(this@BasicMap.javaClass.simpleName)
pushIndent()
for (key in storage.keys.sorted()) {
println("${dumpKey(key)} -> ${dumpValue(storage[key]!!)}")
}
popIndent()
}
this
}.toString()
}
@TestOnly
protected abstract fun dumpKey(key: K): String
@TestOnly
protected abstract fun dumpValue(value: V): String
}
abstract class BasicStringMap<V>(
storageFile: File,
keyDescriptor: KeyDescriptor<String>,
valueExternalizer: DataExternalizer<V>
) : BasicMap<String, V>(storageFile, keyDescriptor, valueExternalizer) {
constructor(
storageFile: File,
valueExternalizer: DataExternalizer<V>
) : this(storageFile, EnumeratorStringDescriptor.INSTANCE, valueExternalizer)
override fun dumpKey(key: String): String = key
}

View File

@@ -0,0 +1,46 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental.storage
import org.jetbrains.annotations.TestOnly
open class BasicMapsOwner {
private val maps = arrayListOf<BasicMap<*, *>>()
companion object {
val CACHE_EXTENSION = "tab"
}
protected fun <K, V, M : BasicMap<K, V>> registerMap(map: M): M {
maps.add(map)
return map
}
open fun clean() {
maps.forEach { it.clean() }
}
open fun close() {
maps.forEach { it.close() }
}
open fun flush(memoryCachesOnly: Boolean) {
maps.forEach { it.flush(memoryCachesOnly) }
}
@TestOnly fun dump(): String = maps.map { it.dump() }.joinToString("\n\n")
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental.storage
import org.jetbrains.kotlin.incremental.dumpCollection
import org.jetbrains.kotlin.name.FqName
import java.io.File
internal open class ClassOneToManyMap(
storageFile: File
) : BasicStringMap<Collection<String>>(storageFile, StringCollectionExternalizer) {
override fun dumpValue(value: Collection<String>): String = value.dumpCollection()
fun add(key: FqName, value: FqName) {
storage.append(key.asString(), value.asString())
}
operator fun get(key: FqName): Collection<FqName> =
storage[key.asString()]?.map(::FqName) ?: setOf()
operator fun set(key: FqName, values: Collection<FqName>) {
if (values.isEmpty()) {
remove(key)
return
}
storage[key.asString()] = values.map(FqName::asString)
}
fun remove(key: FqName) {
storage.remove(key.asString())
}
fun removeValues(key: FqName, removed: Set<FqName>) {
val notRemoved = this[key].filter { it !in removed }
this[key] = notRemoved
}
}
internal class SubtypesMap(storageFile: File) : ClassOneToManyMap(storageFile)
internal class SupertypesMap(storageFile: File) : ClassOneToManyMap(storageFile)

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental.storage
import org.jetbrains.kotlin.utils.keysToMap
import java.io.File
internal class FileToIdMap(file: File) : BasicMap<File, Int>(file, FileKeyDescriptor, IntExternalizer) {
override fun dumpKey(key: File): String = key.toString()
override fun dumpValue(value: Int): String = value.toString()
operator fun get(file: File): Int? = storage[file]
operator fun set(file: File, id: Int) {
storage[file] = id
}
fun remove(file: File) {
storage.remove(file)
}
fun toMap(): Map<File, Int> = storage.keys.keysToMap { storage[it]!! }
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental.storage
import com.intellij.util.io.ExternalIntegerKeyDescriptor
import java.io.File
internal class IdToFileMap(file: File) : BasicMap<Int, File>(file, ExternalIntegerKeyDescriptor(), FileKeyDescriptor) {
override fun dumpKey(key: Int): String = key.toString()
override fun dumpValue(value: File): String = value.toString()
operator fun get(id: Int): File? = storage[id]
operator fun contains(id: Int): Boolean = id in storage
operator fun set(id: Int, file: File) {
storage[id] = file
}
fun remove(id: Int) {
storage.remove(id)
}
}

View File

@@ -0,0 +1,122 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental.storage
import com.intellij.util.io.DataExternalizer
import com.intellij.util.io.IOUtil
import com.intellij.util.io.KeyDescriptor
import com.intellij.util.io.PersistentHashMap
import java.io.DataOutput
import java.io.File
import java.io.IOException
/**
* It's lazy in a sense that PersistentHashMap is created only on write
*/
class LazyStorage<K, V>(
private val storageFile: File,
private val keyDescriptor: KeyDescriptor<K>,
private val valueExternalizer: DataExternalizer<V>
) {
@Volatile
private var storage: PersistentHashMap<K, V>? = null
@Synchronized
private fun getStorageIfExists(): PersistentHashMap<K, V>? {
if (storage != null) return storage
if (storageFile.exists()) {
storage = createMap()
return storage
}
return null
}
@Synchronized
private fun getStorageOrCreateNew(): PersistentHashMap<K, V> {
if (storage == null) {
storage = createMap()
}
return storage!!
}
val keys: Collection<K>
get() = getStorageIfExists()?.allKeysWithExistingMapping ?: listOf()
operator fun contains(key: K): Boolean =
getStorageIfExists()?.containsMapping(key) ?: false
operator fun get(key: K): V? =
getStorageIfExists()?.get(key)
operator fun set(key: K, value: V) {
getStorageOrCreateNew().put(key, value)
}
fun remove(key: K) {
getStorageIfExists()?.remove(key)
}
fun append(key: K, value: String) {
append(key) { out -> IOUtil.writeUTF(out, value) }
}
fun append(key: K, value: Int) {
append(key) { out -> out.writeInt(value) }
}
@Synchronized
fun clean() {
try {
storage?.close()
}
catch (ignored: IOException) {
}
PersistentHashMap.deleteFilesStartingWith(storageFile)
storage = null
}
@Synchronized
fun flush(memoryCachesOnly: Boolean) {
val existingStorage = storage ?: return
if (memoryCachesOnly) {
if (existingStorage.isDirty) {
existingStorage.dropMemoryCaches()
}
}
else {
existingStorage.force()
}
}
@Synchronized
fun close() {
storage?.close()
}
private fun createMap(): PersistentHashMap<K, V> =
PersistentHashMap(storageFile, keyDescriptor, valueExternalizer)
private fun append(key: K, append: (DataOutput)->Unit) {
getStorageOrCreateNew().appendData(key, append)
}
}

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental.storage
import java.io.File
internal class LookupMap(storage: File) : BasicMap<LookupSymbolKey, Collection<Int>>(storage, LookupSymbolKeyDescriptor, IntCollectionExternalizer) {
override fun dumpKey(key: LookupSymbolKey): String = key.toString()
override fun dumpValue(value: Collection<Int>): String = value.toString()
fun add(name: String, scope: String, fileId: Int) {
storage.append(LookupSymbolKey(name, scope), fileId)
}
operator fun get(key: LookupSymbolKey): Collection<Int>? = storage[key]
operator fun set(key: LookupSymbolKey, fileIds: Set<Int>) {
storage[key] = fileIds
}
fun remove(key: LookupSymbolKey) {
storage.remove(key)
}
val keys: Collection<LookupSymbolKey>
get() = storage.keys
}

View File

@@ -0,0 +1,216 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental.storage
import com.intellij.openapi.util.io.FileUtil
import com.intellij.util.io.DataExternalizer
import com.intellij.util.io.EnumeratorStringDescriptor
import com.intellij.util.io.IOUtil
import com.intellij.util.io.KeyDescriptor
import java.io.DataInput
import java.io.DataInputStream
import java.io.DataOutput
import java.io.File
import java.util.*
object LookupSymbolKeyDescriptor : KeyDescriptor<LookupSymbolKey> {
override fun read(input: DataInput): LookupSymbolKey {
val first = input.readInt()
val second = input.readInt()
return LookupSymbolKey(first, second)
}
override fun save(output: DataOutput, value: LookupSymbolKey) {
output.writeInt(value.nameHash)
output.writeInt(value.scopeHash)
}
override fun getHashCode(value: LookupSymbolKey): Int = value.hashCode()
override fun isEqual(val1: LookupSymbolKey, val2: LookupSymbolKey): Boolean = val1 == val2
}
object ProtoMapValueExternalizer : DataExternalizer<ProtoMapValue> {
override fun save(output: DataOutput, value: ProtoMapValue) {
output.writeBoolean(value.isPackageFacade)
output.writeInt(value.bytes.size)
output.write(value.bytes)
output.writeInt(value.strings.size)
for (string in value.strings) {
output.writeUTF(string)
}
}
override fun read(input: DataInput): ProtoMapValue {
val isPackageFacade = input.readBoolean()
val bytesLength = input.readInt()
val bytes = ByteArray(bytesLength)
input.readFully(bytes, 0, bytesLength)
val stringsLength = input.readInt()
val strings = Array<String>(stringsLength) { input.readUTF() }
return ProtoMapValue(isPackageFacade, bytes, strings)
}
}
abstract class StringMapExternalizer<T> : DataExternalizer<Map<String, T>> {
override fun save(output: DataOutput, map: Map<String, T>?) {
output.writeInt(map!!.size)
for ((key, value) in map.entries) {
IOUtil.writeString(key, output)
writeValue(output, value)
}
}
override fun read(input: DataInput): Map<String, T>? {
val size = input.readInt()
val map = HashMap<String, T>(size)
repeat(size) {
val name = IOUtil.readString(input)!!
map[name] = readValue(input)
}
return map
}
protected abstract fun writeValue(output: DataOutput, value: T)
protected abstract fun readValue(input: DataInput): T
}
object StringToLongMapExternalizer : StringMapExternalizer<Long>() {
override fun readValue(input: DataInput): Long = input.readLong()
override fun writeValue(output: DataOutput, value: Long) {
output.writeLong(value)
}
}
object ConstantsMapExternalizer : DataExternalizer<Map<String, Any>> {
override fun save(output: DataOutput, map: Map<String, Any>?) {
output.writeInt(map!!.size)
for (name in map.keys.sorted()) {
IOUtil.writeString(name, output)
val value = map[name]!!
when (value) {
is Int -> {
output.writeByte(Kind.INT.ordinal)
output.writeInt(value)
}
is Float -> {
output.writeByte(Kind.FLOAT.ordinal)
output.writeFloat(value)
}
is Long -> {
output.writeByte(Kind.LONG.ordinal)
output.writeLong(value)
}
is Double -> {
output.writeByte(Kind.DOUBLE.ordinal)
output.writeDouble(value)
}
is String -> {
output.writeByte(Kind.STRING.ordinal)
IOUtil.writeString(value, output)
}
else -> throw IllegalStateException("Unexpected constant class: ${value.javaClass}")
}
}
}
override fun read(input: DataInput): Map<String, Any>? {
val size = input.readInt()
val map = HashMap<String, Any>(size)
repeat(size) {
val name = IOUtil.readString(input)!!
val kind = Kind.values()[input.readByte().toInt()]
val value: Any = when (kind) {
Kind.INT -> input.readInt()
Kind.FLOAT -> input.readFloat()
Kind.LONG -> input.readLong()
Kind.DOUBLE -> input.readDouble()
Kind.STRING -> IOUtil.readString(input)!!
}
map[name] = value
}
return map
}
private enum class Kind {
INT, FLOAT, LONG, DOUBLE, STRING
}
}
object IntExternalizer : DataExternalizer<Int> {
override fun read(input: DataInput): Int = input.readInt()
override fun save(output: DataOutput, value: Int) {
output.writeInt(value)
}
}
object PathStringDescriptor : EnumeratorStringDescriptor() {
override fun getHashCode(value: String) = FileUtil.pathHashCode(value)
override fun isEqual(val1: String, val2: String?) = FileUtil.pathsEqual(val1, val2)
}
object FileKeyDescriptor : KeyDescriptor<File> {
override fun read(input: DataInput): File = File(input.readUTF())
override fun save(output: DataOutput, value: File) {
output.writeUTF(value.canonicalPath)
}
override fun getHashCode(value: File?): Int =
FileUtil.FILE_HASHING_STRATEGY.computeHashCode(value)
override fun isEqual(val1: File?, val2: File?): Boolean =
FileUtil.FILE_HASHING_STRATEGY.equals(val1, val2)
}
open class CollectionExternalizer<T>(
private val elementExternalizer: DataExternalizer<T>,
private val newCollection: () -> MutableCollection<T>
) : DataExternalizer<Collection<T>> {
override fun read(input: DataInput): Collection<T> {
val result = newCollection()
val stream = input as DataInputStream
while (stream.available() > 0) {
result.add(elementExternalizer.read(stream))
}
return result
}
override fun save(output: DataOutput, value: Collection<T>) {
value.forEach { elementExternalizer.save(output, it) }
}
}
object StringCollectionExternalizer : CollectionExternalizer<String>(EnumeratorStringDescriptor(), { HashSet() })
object IntCollectionExternalizer : CollectionExternalizer<Int>(IntExternalizer, { HashSet() })

View File

@@ -0,0 +1,31 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental.storage
data class LookupSymbolKey(val nameHash: Int, val scopeHash: Int) : Comparable<LookupSymbolKey> {
constructor(name: String, scope: String) : this(name.hashCode(), scope.hashCode())
override fun compareTo(other: LookupSymbolKey): Int {
val nameCmp = nameHash.compareTo(other.nameHash)
if (nameCmp != 0) return nameCmp
return scopeHash.compareTo(other.scopeHash)
}
}
data class ProtoMapValue(val isPackageFacade: Boolean, val bytes: ByteArray, val strings: Array<String>)

View File

@@ -0,0 +1,131 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.modules
import com.intellij.openapi.util.io.FileUtil.toSystemIndependentName
import com.intellij.openapi.util.text.StringUtil.escapeXml
import org.jetbrains.kotlin.build.JvmSourceRoot
import org.jetbrains.kotlin.cli.common.modules.ModuleXmlParser.*
import org.jetbrains.kotlin.config.IncrementalCompilation
import org.jetbrains.kotlin.utils.Printer
import java.io.File
class KotlinModuleXmlBuilder {
private val xml = StringBuilder()
private val p = Printer(xml)
private var done = false
init {
openTag(p, MODULES)
}
fun addModule(
moduleName: String,
outputDir: String,
sourceFiles: Iterable<File>,
javaSourceRoots: Iterable<JvmSourceRoot>,
classpathRoots: Iterable<File>,
targetTypeId: String,
isTests: Boolean,
directoriesToFilterOut: Set<File>,
friendDirs: Iterable<File>): KotlinModuleXmlBuilder {
assert(!done) { "Already done" }
p.println("<!-- Module script for ${if (isTests) "tests" else "production"} -->")
p.println("<", MODULE, " ",
NAME, "=\"", escapeXml(moduleName), "\" ",
TYPE, "=\"", escapeXml(targetTypeId), "\" ",
OUTPUT_DIR, "=\"", getEscapedPath(File(outputDir)), "\">")
p.pushIndent()
for (friendDir in friendDirs) {
p.println("<", FRIEND_DIR, " ", PATH, "=\"", getEscapedPath(friendDir), "\"/>")
}
for (sourceFile in sourceFiles) {
p.println("<", SOURCES, " ", PATH, "=\"", getEscapedPath(sourceFile), "\"/>")
}
processJavaSourceRoots(javaSourceRoots)
processClasspath(classpathRoots, directoriesToFilterOut)
closeTag(p, MODULE)
return this
}
private fun processClasspath(
files: Iterable<File>,
directoriesToFilterOut: Set<File>) {
p.println("<!-- Classpath -->")
for (file in files) {
val isOutput = directoriesToFilterOut.contains(file) && !IncrementalCompilation.isEnabled()
if (isOutput) {
// For IDEA's make (incremental compilation) purposes, output directories of the current module and its dependencies
// appear on the class path, so we are at risk of seeing the results of the previous build, i.e. if some class was
// removed in the sources, it may still be there in binaries. Thus, we delete these entries from the classpath.
p.println("<!-- Output directory, commented out -->")
p.println("<!-- ")
p.pushIndent()
}
p.println("<", CLASSPATH, " ", PATH, "=\"", getEscapedPath(file), "\"/>")
if (isOutput) {
p.popIndent()
p.println("-->")
}
}
}
private fun processJavaSourceRoots(roots: Iterable<JvmSourceRoot>) {
p.println("<!-- Java source roots -->")
for (root in roots) {
p.print("<")
p.printWithNoIndent(JAVA_SOURCE_ROOTS, " ", PATH, "=\"", getEscapedPath(root.file), "\"")
if (root.packagePrefix != null) {
p.printWithNoIndent(" ", JAVA_SOURCE_PACKAGE_PREFIX, "=\"", root.packagePrefix, "\"")
}
p.printWithNoIndent("/>")
p.println()
}
}
fun asText(): CharSequence {
if (!done) {
closeTag(p, MODULES)
done = true
}
return xml
}
private fun openTag(p: Printer, tag: String) {
p.println("<$tag>")
p.pushIndent()
}
private fun closeTag(p: Printer, tag: String) {
p.popIndent()
p.println("</$tag>")
}
private fun getEscapedPath(sourceFile: File): String {
return escapeXml(toSystemIndependentName(sourceFile.path))
}
}

View File

@@ -0,0 +1,179 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental.testingUtils
import com.google.common.collect.Sets
import com.google.common.hash.Hashing
import com.google.common.io.Files
import com.google.protobuf.ExtensionRegistry
import com.intellij.openapi.util.io.FileUtil
import org.jetbrains.kotlin.incremental.LocalFileKotlinClass
import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader
import org.jetbrains.kotlin.serialization.DebugProtoBuf
import org.jetbrains.kotlin.serialization.jvm.BitEncoding
import org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf
import org.jetbrains.kotlin.utils.Printer
import org.jetbrains.org.objectweb.asm.ClassReader
import org.jetbrains.org.objectweb.asm.util.TraceClassVisitor
import org.junit.Assert
import org.junit.Assert.assertNotNull
import java.io.ByteArrayInputStream
import java.io.File
import java.io.PrintWriter
import java.io.StringWriter
import java.util.*
import kotlin.comparisons.compareBy
// Set this to true if you want to dump all bytecode (test will fail in this case)
private val DUMP_ALL = System.getProperty("comparison.dump.all") == "true"
fun assertEqualDirectories(expected: File, actual: File, forgiveExtraFiles: Boolean) {
val pathsInExpected = getAllRelativePaths(expected)
val pathsInActual = getAllRelativePaths(actual)
val commonPaths = Sets.intersection(pathsInExpected, pathsInActual)
val changedPaths = commonPaths
.filter { DUMP_ALL || !Arrays.equals(File(expected, it).readBytes(), File(actual, it).readBytes()) }
.sorted()
val expectedString = getDirectoryString(expected, changedPaths)
val actualString = getDirectoryString(actual, changedPaths)
if (DUMP_ALL) {
Assert.assertEquals(expectedString, actualString + " ")
}
if (forgiveExtraFiles) {
// If compilation fails, output may be different for full rebuild and partial make. Parsing output (directory string) for simplicity.
if (changedPaths.isEmpty()) {
val expectedListingLines = expectedString.split('\n').toList()
val actualListingLines = actualString.split('\n').toList()
if (actualListingLines.containsAll(expectedListingLines)) {
return
}
}
}
Assert.assertEquals(expectedString, actualString)
}
private fun File.hash() = Files.hash(this, Hashing.crc32())
private fun getDirectoryString(dir: File, interestingPaths: List<String>): String {
val buf = StringBuilder()
val p = Printer(buf)
fun addDirContent(dir: File) {
p.pushIndent()
val listFiles = dir.listFiles()
assertNotNull("$dir does not exist", listFiles)
val children = listFiles!!.sortedWith(compareBy({ it.isDirectory }, { it.name }))
for (child in children) {
if (child.isDirectory) {
if ((child.list()?.isNotEmpty() ?: false)) {
p.println(child.name)
addDirContent(child)
}
}
else {
p.println(child.name, " ", child.hash())
}
}
p.popIndent()
}
p.println(".")
addDirContent(dir)
for (path in interestingPaths) {
p.println("================", path, "================")
p.println(fileToStringRepresentation(File(dir, path)))
p.println()
p.println()
}
return buf.toString()
}
private fun getAllRelativePaths(dir: File): Set<String> {
val result = HashSet<String>()
FileUtil.processFilesRecursively(dir) {
if (it!!.isFile) {
result.add(FileUtil.getRelativePath(dir, it)!!)
}
true
}
return result
}
private fun classFileToString(classFile: File): String {
val out = StringWriter()
val traceVisitor = TraceClassVisitor(PrintWriter(out))
ClassReader(classFile.readBytes()).accept(traceVisitor, 0)
val classHeader = LocalFileKotlinClass.create(classFile)?.classHeader
val annotationDataEncoded = classHeader?.data
if (annotationDataEncoded != null) {
ByteArrayInputStream(BitEncoding.decodeBytes(annotationDataEncoded)).use {
input ->
out.write("\n------ string table types proto -----\n${DebugJvmProtoBuf.StringTableTypes.parseDelimitedFrom(input)}")
if (!classHeader!!.metadataVersion.isCompatible()) {
error("Incompatible class ($classHeader): $classFile")
}
when (classHeader.kind) {
KotlinClassHeader.Kind.FILE_FACADE ->
out.write("\n------ file facade proto -----\n${DebugProtoBuf.Package.parseFrom(input, getExtensionRegistry())}")
KotlinClassHeader.Kind.CLASS ->
out.write("\n------ class proto -----\n${DebugProtoBuf.Class.parseFrom(input, getExtensionRegistry())}")
KotlinClassHeader.Kind.MULTIFILE_CLASS_PART ->
out.write("\n------ multi-file part proto -----\n${DebugProtoBuf.Package.parseFrom(input, getExtensionRegistry())}")
else -> throw IllegalStateException()
}
}
}
return out.toString()
}
private fun getExtensionRegistry(): ExtensionRegistry {
val registry = ExtensionRegistry.newInstance()!!
DebugJvmProtoBuf.registerAllExtensions(registry)
return registry
}
private fun fileToStringRepresentation(file: File): String {
return when {
file.name.endsWith(".class") -> {
classFileToString(file)
}
else -> {
file.readText()
}
}
}

View File

@@ -0,0 +1,160 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental.testingUtils
import com.intellij.openapi.util.io.FileUtil
import java.io.File
import java.util.*
private val COMMANDS = listOf("new", "touch", "delete")
private val COMMANDS_AS_REGEX_PART = COMMANDS.joinToString("|")
private val COMMANDS_AS_MESSAGE_PART = COMMANDS.joinToString("/") { "\".$it\"" }
enum class TouchPolicy {
TIMESTAMP,
CHECKSUM
}
fun copyTestSources(testDataDir: File, sourceDestinationDir: File, filePrefix: String): Map<File, File> {
val mapping = hashMapOf<File, File>()
FileUtil.copyDir(testDataDir, sourceDestinationDir) {
it.isDirectory || it.name.startsWith(filePrefix) && (it.name.endsWith(".kt") || it.name.endsWith(".java"))
}
sourceDestinationDir.walk().forEach { mapping[it] = File(testDataDir, filePrefix + it.name) }
return mapping
}
fun getModificationsToPerform(
testDataDir: File,
moduleNames: Collection<String>?,
allowNoFilesWithSuffixInTestData: Boolean,
touchPolicy: TouchPolicy
): List<List<Modification>> {
fun getModificationsForIteration(newSuffix: String, touchSuffix: String, deleteSuffix: String): List<Modification> {
fun getDirPrefix(fileName: String): String {
val underscore = fileName.indexOf("_")
if (underscore != -1) {
val module = fileName.substring(0, underscore)
assert(moduleNames != null) { "File name has module prefix, but multi-module environment is absent" }
assert(module in moduleNames!!) { "Module not found for file with prefix: $fileName" }
return "$module/src"
}
assert(moduleNames == null) { "Test is multi-module, but file has no module prefix: $fileName" }
return "src"
}
val modifications = ArrayList<Modification>()
for (file in testDataDir.listFiles()!!) {
val fileName = file.name
if (fileName.endsWith(newSuffix)) {
modifications.add(ModifyContent(getDirPrefix(fileName) + "/" + fileName.removeSuffix(newSuffix), file))
}
if (fileName.endsWith(touchSuffix)) {
modifications.add(TouchFile(getDirPrefix(fileName) + "/" + fileName.removeSuffix(touchSuffix), touchPolicy))
}
if (fileName.endsWith(deleteSuffix)) {
modifications.add(DeleteFile(getDirPrefix(fileName) + "/" + fileName.removeSuffix(deleteSuffix)))
}
}
return modifications
}
val haveFilesWithoutNumbers = testDataDir.listFiles { it -> it.name.matches(".+\\.(${COMMANDS_AS_REGEX_PART})$".toRegex()) }?.isNotEmpty() ?: false
val haveFilesWithNumbers = testDataDir.listFiles { it -> it.name.matches(".+\\.(${COMMANDS_AS_REGEX_PART})\\.\\d+$".toRegex()) }?.isNotEmpty() ?: false
if (haveFilesWithoutNumbers && haveFilesWithNumbers) {
throw IllegalStateException("Bad test data format: files ending with both unnumbered and numbered ${COMMANDS_AS_MESSAGE_PART} were found")
}
if (!haveFilesWithoutNumbers && !haveFilesWithNumbers) {
if (allowNoFilesWithSuffixInTestData) {
return listOf(listOf())
}
else {
throw IllegalStateException("Bad test data format: no files ending with ${COMMANDS_AS_MESSAGE_PART} found")
}
}
if (haveFilesWithoutNumbers) {
return listOf(getModificationsForIteration(".new", ".touch", ".delete"))
}
else {
return (1..10)
.map { getModificationsForIteration(".new.$it", ".touch.$it", ".delete.$it") }
.filter { it.isNotEmpty() }
}
}
abstract class Modification(val path: String) {
abstract fun perform(workDir: File, mapping: MutableMap<File, File>)
override fun toString(): String = "${javaClass.simpleName} $path"
}
class ModifyContent(path: String, val dataFile: File) : Modification(path) {
override fun perform(workDir: File, mapping: MutableMap<File, File>) {
val file = File(workDir, path)
val oldLastModified = file.lastModified()
file.delete()
dataFile.copyTo(file)
val newLastModified = file.lastModified()
if (newLastModified <= oldLastModified) {
//Mac OS and some versions of Linux truncate timestamp to nearest second
file.setLastModified(oldLastModified + 1000)
}
mapping[file] = dataFile
}
}
class TouchFile(path: String, private val touchPolicy: TouchPolicy) : Modification(path) {
override fun perform(workDir: File, mapping: MutableMap<File, File>) {
val file = File(workDir, path)
when (touchPolicy) {
TouchPolicy.TIMESTAMP -> {
val oldLastModified = file.lastModified()
//Mac OS and some versions of Linux truncate timestamp to nearest second
file.setLastModified(Math.max(System.currentTimeMillis(), oldLastModified + 1000))
}
TouchPolicy.CHECKSUM -> {
file.appendText(" ")
}
}
}
}
class DeleteFile(path: String) : Modification(path) {
override fun perform(workDir: File, mapping: MutableMap<File, File>) {
val fileToDelete = File(workDir, path)
if (!fileToDelete.delete()) {
throw AssertionError("Couldn't delete $fileToDelete")
}
mapping.remove(fileToDelete)
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

404
build.xml
View File

@@ -1,6 +1,4 @@
<project name="Kotlin" default="dist" xmlns:if="ant:if" xmlns:unless="ant:unless">
<include file="jslib_files.xml" />
<property file="resources/kotlinManifest.properties"/>
<!-- Set to false to disable proguard run on kotlin-compiler.jar. Speeds up the build -->
@@ -8,14 +6,20 @@
<!-- Set to false to disable compiler's javadoc generation. Speeds up the build -->
<property name="generate.javadoc" value="true"/>
<!-- Set to false to prevent jarjar and metadata stripping on kotlin-reflect.jar and reflection sources. Use to debug reflection -->
<property name="obfuscate.reflect" value="true"/>
<property name="max.heap.size.for.forked.jvm" value="1024m"/>
<property name="bootstrap.home" value="${basedir}/dependencies/bootstrap-compiler"/>
<property name="bootstrap.compiler.home" value="${bootstrap.home}/Kotlin/kotlinc"/>
<property name="bootstrap.runtime" value="${bootstrap.compiler.home}/lib/kotlin-runtime.jar"/>
<property name="bootstrap.reflect" value="${bootstrap.compiler.home}/lib/kotlin-reflect.jar"/>
<property name="bootstrap.kotlin.test" value="${bootstrap.compiler.home}/lib/kotlin-test.jar" />
<property name="output" value="${basedir}/dist"/>
<property name="js.stdlib.output.dir" value="${output}/js"/>
<property name="intermediate-sources" value="out/src" />
<property name="kotlin-home" value="${output}/kotlinc"/>
<property name="build.number" value="snapshot"/>
<property name="bootstrap.build.no.tests" value="false"/>
@@ -26,8 +30,6 @@
<property name="java.target" value="1.6"/>
<property name="external.annotations.path" value="${basedir}/annotations"/>
<property name="dependencies.dir" value="${basedir}/dependencies"/>
<condition property="bootstrap.or.local.build" value="true">
@@ -39,6 +41,8 @@
</or>
</condition>
<include file="jslib_files.xml" />
<!--
The compiler produced on the first step of the build (Bootstrap No Tests) is only guaranteed to work against the OLD runtime
located in dependencies/bootstrap-compiler/.../kotlin-runtime.jar, because the newly built compiler is just a Kotlin application,
@@ -56,6 +60,7 @@
<path id="classpath">
<file file="${bootstrap.runtime}"/>
<file file="${bootstrap.kotlin.test}" />
<file file="${bootstrap.reflect}"/>
<fileset dir="${idea.sdk}" includes="core/*.jar"/>
<pathelement location="${protobuf.jar}"/>
@@ -86,14 +91,15 @@
<include name="compiler/builtins-serializer/src"/>
<include name="compiler/cli/src"/>
<include name="compiler/cli/cli-common/src"/>
<include name="compiler/rmi/rmi-server/src"/>
<include name="compiler/rmi/rmi-interface/src"/>
<include name="compiler/conditional-preprocessor/src/"/>
<include name="compiler/container/src"/>
<include name="compiler/frontend/src"/>
<include name="compiler/resolution/src"/>
<include name="compiler/frontend.java/src"/>
<include name="compiler/light-classes/src"/>
<include name="compiler/plugin-api/src"/>
<include name="plugins/annotation-collector/src"/>
<include name="compiler/daemon/src"/>
<include name="compiler/daemon/daemon-common/src"/>
<include name="compiler/serialization/src"/>
<include name="compiler/util/src"/>
<include name="js/js.dart-ast/src"/>
@@ -102,11 +108,13 @@
<include name="js/js.inliner/src"/>
<include name="js/js.parser/src"/>
<include name="js/js.serializer/src"/>
<include name="plugins/annotation-collector/src"/>
</dirset>
<property name="idea.out" value="${basedir}/out/production"/>
<patternset id="compilerClassesFromIDEA.fileset">
<include name="frontend/**"/>
<include name="resolution/**"/>
<include name="container/**"/>
<include name="descriptors/**"/>
<include name="deserialization/**"/>
@@ -117,8 +125,8 @@
<include name="backend-common/**"/>
<include name="cli/**"/>
<include name="cli-common/**"/>
<include name="rmi-server/**"/>
<include name="rmi-interface/**"/>
<include name="conditional-preprocessor/**"/>
<include name="daemon/**"/>
<include name="util/**"/>
<include name="util.runtime/**"/>
<include name="light-classes/**"/>
@@ -177,19 +185,33 @@
<sequential if:true="${bootstrap.or.local.build}">
<copy file="${bootstrap.runtime}" tofile="${kotlin-home}/lib/kotlin-runtime-internal-bootstrap.jar"/>
<copy file="${bootstrap.reflect}" tofile="${kotlin-home}/lib/kotlin-reflect-internal-bootstrap.jar"/>
<copy file="${bootstrap.kotlin.test}" tofile="${kotlin-home}/lib/kotlin-test-internal-bootstrap.jar" failonerror="false"/>
<jar destfile="${kotlin-home}/lib/kotlin-reflect-internal-bootstrap.jar" update="true">
<manifest>
<attribute name="Class-Path" value="kotlin-runtime-internal-bootstrap.jar"/>
</manifest>
</jar>
<jar destfile="${kotlin-home}/lib/kotlin-test-internal-bootstrap.jar" update="true">
<manifest>
<attribute name="Class-Path" value="kotlin-runtime-internal-bootstrap.jar"/>
</manifest>
</jar>
</sequential>
<sequential unless:true="${bootstrap.or.local.build}">
<copy file="${bootstrap.runtime}" todir="${kotlin-home}/lib"/>
<copy file="${bootstrap.reflect}" todir="${kotlin-home}/lib"/>
<copy file="${bootstrap.kotlin.test}" todir="${kotlin-home}/lib"/>
</sequential>
</target>
<target name="copy-dist-to-bootstrap">
<delete dir="${basedir}/dependencies/bootstrap-compiler/Kotlin/kotlinc" />
<copy todir="${basedir}/dependencies/bootstrap-compiler/Kotlin/kotlinc">
<fileset dir="${basedir}/dist/kotlinc" />
</copy>
</target>
<target name="compiler-sources">
<jar jarfile="${output}/kotlin-compiler-sources.jar">
<!-- TODO How to convert it from pathset or dirset ? -->
@@ -202,10 +224,12 @@
<fileset dir="compiler/builtins-serializer/src"/>
<fileset dir="compiler/cli/src"/>
<fileset dir="compiler/cli/cli-common/src"/>
<fileset dir="compiler/rmi/rmi-server/src"/>
<fileset dir="compiler/rmi/rmi-interface/src"/>
<fileset dir="compiler/conditional-preprocessor/src"/>
<fileset dir="compiler/daemon/src"/>
<fileset dir="compiler/daemon/daemon-common/src"/>
<fileset dir="compiler/container/src"/>
<fileset dir="compiler/frontend/src"/>
<fileset dir="compiler/resolution/src"/>
<fileset dir="compiler/frontend.java/src"/>
<fileset dir="compiler/light-classes/src"/>
<fileset dir="compiler/plugin-api/src"/>
@@ -291,7 +315,9 @@
<arg value="-output"/>
<arg value="@{output}"/>
<arg value="-no-stdlib"/>
<arg value="-version"/>
<arg value="-meta-info"/>
<arg value="-kjsm"/>
<arg line="-main noCall"/>
</java>
</sequential>
@@ -304,13 +330,15 @@
<property name="compiled.stdlib.meta.js" value="stdlib.meta.js"/>
<property name="stdlib.js.dir" value="${basedir}/js/js.translator/testData"/>
<new-kotlin2js output="${output}/${compiled.builtins.js}">
<kotlin-pp src="libraries/stdlib/src" output="${intermediate-sources}/stdlib/js" profile="JS" />
<new-kotlin2js output="${js.stdlib.output.dir}/${compiled.builtins.js}">
<src>
<fileset refid="kotlin.builtin.files"/>
</src>
</new-kotlin2js>
<new-kotlin2js output="${output}/${compiled.stdlib.js}">
<new-kotlin2js output="${js.stdlib.output.dir}/${compiled.stdlib.js}">
<src>
<resources refid="js.lib.files"/>
</src>
@@ -330,7 +358,7 @@
prettyprint="true"
languagein="ECMASCRIPT5_STRICT"
warning="${warningLevel}"
output="${output}/kotlin.js">
output="${js.stdlib.output.dir}/kotlin.js">
<sources dir="${stdlib.js.dir}">
<file name="kotlin_lib_ecma5.js"/>
@@ -339,11 +367,11 @@
<file name="long.js"/>
</sources>
<sources dir="${output}">
<sources dir="${js.stdlib.output.dir}">
<file name="${compiled.builtins.js}"/>
</sources>
<sources dir="${output}">
<sources dir="${js.stdlib.output.dir}">
<file name="${compiled.stdlib.js}"/>
</sources>
@@ -358,8 +386,11 @@
<jar jarfile="${kotlin-home}/lib/kotlin-jslib.jar" duplicate="fail">
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
<zipfileset file="${output}/kotlin.js" prefix=""/>
<zipfileset file="${output}/${compiled.stdlib.meta.js}" prefix=""/>
<zipfileset dir="${js.stdlib.output.dir}" prefix="">
<include name="kotlin.js"/>
<include name="${compiled.stdlib.meta.js}"/>
<include name="stdlib/**"/>
</zipfileset>
<manifest>
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
@@ -446,7 +477,7 @@
</assertions>
<arg value="-cp"/>
<arg value="${bootstrap.compiler.home}/lib/kotlin-compiler.jar"/>
<arg value="org.jetbrains.kotlin.serialization.builtins.BuiltinsPackage"/>
<arg value="org.jetbrains.kotlin.serialization.builtins.RunKt"/>
<arg value="${output}/builtins"/>
<arg value="core/builtins/native"/>
<arg value="core/builtins/src"/>
@@ -462,10 +493,11 @@
<fileset dir="${output}/classes/compiler"/>
<fileset dir="${output}/builtins">
<include name="kotlin/**"/>
<exclude name="kotlin/internal/**"/>
</fileset>
<fileset dir="${basedir}/core/descriptor.loader.java/src" includes="META-INF/services/**"/>
<fileset dir="${basedir}/compiler/frontend.java/src" includes="META-INF/services/**"/>
<fileset dir="${basedir}/compiler/backend/src" includes="META-INF/services/**"/>
<fileset dir="${basedir}/compiler/cli/src" includes="META-INF/services/**"/>
<fileset dir="${basedir}/resources" includes="kotlinManifest.properties"/>
<fileset dir="idea/src">
@@ -476,7 +508,7 @@
<zipgroupfileset dir="${basedir}/lib" includes="*.jar"/>
<zipgroupfileset dir="${basedir}/ideaSDK/core" includes="*.jar" excludes="util.jar"/>
<zipfileset src="${idea.sdk}/lib/jna-utils.jar"/>
<zipfileset src="${idea.sdk}/lib/jna-platform.jar"/>
<zipfileset src="${idea.sdk}/lib/oromatcher.jar"/>
<zipfileset src="${idea.sdk}/jps/jps-model.jar"/>
<zipfileset src="${dependencies.dir}/jline.jar"/>
@@ -522,8 +554,10 @@
<javac2 destdir="${output}/classes/compiler" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false"
source="${java.target}" target="${java.target}">
<withKotlin externalannotations="${external.annotations.path}" modulename="kotlin-compiler"/>
<skip pattern="kotlin/jvm/internal/.*"/>
<withKotlin modulename="kotlin-compiler">
<compilerarg value="-version"/>
</withKotlin>
<skip pattern="kotlin/Metadata"/>
<src refid="compilerSources.path"/>
<classpath refid="classpath"/>
</javac2>
@@ -546,11 +580,21 @@
<proguard configuration="${basedir}/compiler/compiler.pro"/>
</sequential>
<jar jarfile="${output}/kotlin-compiler-for-maven.jar">
<jar jarfile="${output}/kotlin-compiler-for-maven.jar" duplicate="preserve">
<patternset id="lib.metainf.patternset">
<include name="**"/>
<exclude name="META-INF/build.txt"/>
<exclude name="META-INF/MANIFEST.MF"/>
</patternset>
<!-- TODO: don't include both to the jar: it's impossible to test changes to core in the local maven build without bootstrap -->
<zipfileset src="${kotlin-home}/lib/kotlin-compiler.jar" includes="**"/>
<zipfileset src="${bootstrap.runtime}" includes="**" />
<zipfileset src="${bootstrap.reflect}" includes="**" />
<zipfileset src="${bootstrap.runtime}">
<patternset refid="lib.metainf.patternset"/>
</zipfileset>
<zipfileset src="${bootstrap.reflect}">
<patternset refid="lib.metainf.patternset"/>
</zipfileset>
<manifest>
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
@@ -564,33 +608,126 @@
</jar>
</target>
<target name="kotlinr">
<cleandir dir="${output}/classes/kotlinr"/>
<target name="kotlin-build-common">
<cleandir dir="${output}/classes/kotlin-build-common"/>
<kotlinc output="${output}/classes/kotlinr" modulename="kotlin-rmi">
<javac2 destdir="${output}/classes/kotlin-build-common" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false"
source="${java.target}" target="${java.target}">
<withKotlin modulename="kotlin-build-common">
<compilerarg value="-version"/>
</withKotlin>
<skip pattern="kotlin/Metadata"/>
<src>
<pathelement path="compiler/rmi/kotlinr/src"/>
<pathelement path="build-common/src"/>
</src>
<classpath>
<pathelement path="${bootstrap.runtime}"/>
<pathelement path="${bootstrap.reflect}"/>
<pathelement path="${idea.sdk}/lib/util.jar"/>
<pathelement path="${kotlin-home}/lib/kotlin-compiler.jar"/>
</classpath>
</javac2>
<jar destfile="${kotlin-home}/lib/kotlin-build-common.jar">
<fileset dir="${output}/classes/kotlin-build-common"/>
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
<manifest>
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.build.common}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
</manifest>
</jar>
<jar jarfile="${output}/kotlin-build-common-sources.jar">
<fileset dir="build-common/src"/>
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
<manifest>
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.build.common.sources}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
</manifest>
</jar>
</target>
<target name="kotlin-build-common-test" depends="kotlin-build-common,kotlin-test">
<cleandir dir="${output}/classes/kotlin-build-common-test"/>
<javac2 destdir="${output}/classes/kotlin-build-common-test" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false"
source="${java.target}" target="${java.target}">
<withKotlin modulename="kotlin-build-common"/>
<skip pattern="kotlin/jvm/internal/.*"/>
<src path="build-common/test"/>
<classpath>
<pathelement path="${bootstrap.runtime}"/>
<pathelement path="${bootstrap.reflect}"/>
<pathelement path="${bootstrap.kotlin.test}"/>
<pathelement path="${idea.sdk}/lib/junit-4.12.jar"/>
<pathelement path="${idea.sdk}/lib/guava-17.0.jar"/>
<pathelement path="${kotlin-home}/lib/kotlin-build-common.jar"/>
<pathelement path="${kotlin-home}/lib/kotlin-compiler.jar"/>
<pathelement path="${protobuf.jar}"/>
</classpath>
</javac2>
<jar destfile="${kotlin-home}/lib/kotlin-build-common-test.jar">
<fileset dir="${output}/classes/kotlin-build-common-test"/>
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
<manifest>
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.build.common}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
</manifest>
</jar>
</target>
<target name="daemon-client">
<cleandir dir="${output}/classes/daemon-client"/>
<kotlinc output="${output}/classes/daemon-client" modulename="client">
<src>
<pathelement path="compiler/daemon/daemon-client/src"/>
</src>
<classpath>
<pathelement path="${bootstrap.runtime}"/>
<pathelement path="${bootstrap.reflect}"/>
<pathelement path="${kotlin-home}/lib/kotlin-compiler.jar"/>
<pathelement path="${dependencies.dir}/native-platform-uberjar.jar"/>
</classpath>
</kotlinc>
<jar destfile="${kotlin-home}/lib/kotlinr.jar">
<fileset dir="${output}/classes/kotlinr"/>
<jar destfile="${kotlin-home}/lib/kotlin-daemon-client.jar">
<fileset dir="${output}/classes/daemon-client"/>
<zipfileset src="${dependencies.dir}/native-platform-uberjar.jar" includes="**" />
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
<manifest>
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.daemon-client}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
</manifest>
</jar>
</target>
<target name="android-compiler-plugin">
<cleandir dir="${output}/classes/android-compiler-plugin"/>
<javac2 destdir="${output}/classes/android-compiler-plugin" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
<withKotlin modulename="kotlin-android-compiler-plugin"/>
<skip pattern="kotlin/jvm/internal/.*"/>
<target name="android-extensions-compiler">
<cleandir dir="${output}/classes/android-extensions/android-extensions-compiler"/>
<javac2 destdir="${output}/classes/android-extensions/android-extensions-compiler" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
<withKotlin modulename="kotlin-android-extensions-compiler">
<compilerarg value="-version"/>
</withKotlin>
<skip pattern="kotlin/Metadata"/>
<src>
<pathelement path="plugins/android-compiler-plugin/src"/>
<pathelement path="plugins/android-extensions/android-extensions-compiler/src"/>
</src>
<classpath>
<pathelement path="${idea.sdk}/core/intellij-core.jar"/>
@@ -600,10 +737,10 @@
</classpath>
</javac2>
<jar destfile="${kotlin-home}/lib/android-compiler-plugin.jar">
<fileset dir="${output}/classes/android-compiler-plugin"/>
<jar destfile="${kotlin-home}/lib/android-extensions-compiler.jar">
<fileset dir="${output}/classes/android-extensions/android-extensions-compiler"/>
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
<fileset dir="${basedir}/plugins/android-compiler-plugin/src" includes="META-INF/services/**"/>
<fileset dir="${basedir}/plugins/android-extensions/android-extensions-compiler/src" includes="META-INF/services/**"/>
</jar>
</target>
@@ -611,8 +748,10 @@
<cleandir dir="${output}/classes/ant"/>
<javac2 destdir="${output}/classes/ant" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false"
source="${java.target}" target="${java.target}">
<withKotlin externalannotations="${external.annotations.path}" modulename="kotlin-ant-tools"/>
<skip pattern="kotlin/jvm/internal/.*"/>
<withKotlin modulename="kotlin-ant-tools">
<compilerarg value="-version"/>
</withKotlin>
<skip pattern="kotlin/Metadata"/>
<src>
<dirset dir="${basedir}/ant">
<include name="src"/>
@@ -644,33 +783,10 @@
</jar>
</target>
<target name="jdk-annotations">
<jar destfile="${kotlin-home}/lib/kotlin-jdk-annotations.jar">
<manifest>
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.jdk.annotations}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
</manifest>
</jar>
</target>
<target name="android-sdk-annotations">
<jar destfile="${kotlin-home}/lib/kotlin-android-sdk-annotations.jar">
<manifest>
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.android.sdk.annotations}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
</manifest>
</jar>
</target>
<macrodef name="new-kotlinc">
<attribute name="output"/>
<attribute name="moduleName"/>
<attribute name="additionalOptions" default=""/>
<element name="src"/>
<element name="class-path"/>
@@ -703,16 +819,18 @@
<arg value="-d"/>
<arg value="@{output}"/>
<arg value="-no-stdlib"/>
<arg value="-Xmultifile-package-facades"/>
<arg value="-version"/>
<arg line="@{additionalOptions}"/>
<arg value="-classpath"/>
<arg value="${toString:classpath.path}"/>
<arg value="-module-name"/>
<arg value="@{moduleName}"/>
<arg value="-Xallow-kotlin-package"/>
</java>
<javac2 srcdir="${toString:src.dirset}" destdir="@{output}" debug="true" debuglevel="lines,vars,source"
includeAntRuntime="false" source="${java.target}" target="${java.target}">
<skip pattern="kotlin/jvm/internal/.*"/>
<skip pattern="kotlin/Metadata"/>
<classpath>
<path refid="classpath.path"/>
<!-- Include @{output} here for Java compiler to resolve symbols from Kotlin sources -->
@@ -722,6 +840,29 @@
</sequential>
</macrodef>
<macrodef name="kotlin-pp">
<attribute name="src"/>
<attribute name="output"/>
<attribute name="profile"/>
<sequential>
<java classname="org.jetbrains.kotlin.preloading.Preloader" failonerror="true" fork="true" maxmemory="${max.heap.size.for.forked.jvm}">
<classpath>
<pathelement location="${kotlin-home}/lib/kotlin-preloader.jar"/>
</classpath>
<assertions>
<enable/>
</assertions>
<arg value="-cp"/>
<arg value="${kotlin-home}/lib/kotlin-compiler.jar"/>
<arg value="org.jetbrains.kotlin.preprocessor.PreprocessorCLI"/>
<arg value="@{src}"/>
<arg value="@{output}"/>
<arg value="@{profile}"/>
</java>
</sequential>
</macrodef>
<target name="builtins">
<new-kotlinc output="${output}/classes/builtins" moduleName="kotlin-builtins">
<src>
@@ -746,6 +887,26 @@
</new-kotlinc>
</target>
<target name="kotlin-test">
<new-kotlinc output="${output}/classes/kotlin-test" moduleName="kotlin-test">
<src>
<include name="libraries/kotlin.test/shared/src/main/kotlin" />
<include name="libraries/kotlin.test/shared/src/main/kotlin.jvm" />
<include name="libraries/kotlin.test/junit/src/main/kotlin" />
</src>
<class-path>
<pathelement path="${output}/classes/builtins"/>
<pathelement path="libraries/lib/junit-4.11.jar"/>
</class-path>
</new-kotlinc>
<pack-runtime-jar jar-name="kotlin-test.jar" implementation-title="${manifest.impl.title.kotlin.test}">
<jar-content>
<fileset dir="${output}/classes/kotlin-test" includes="**/*" excludes="kotlin/internal/OnlyInputTypes*,kotlin/internal"/>
</jar-content>
</pack-runtime-jar>
</target>
<target name="core">
<new-kotlinc output="${output}/classes/core" moduleName="kotlin-core">
<src>
@@ -808,7 +969,6 @@
<fileset dir="${output}/classes/stdlib"/>
<zipfileset dir="${output}/builtins">
<include name="kotlin/**"/>
<exclude name="kotlin/internal/**"/>
<!-- TODO: load metadata from @KotlinClass annotation in KotlinBuiltIns on JVM and restore this exclusion -->
<!-- exclude name="kotlin/reflect/**"/ -->
</zipfileset>
@@ -817,6 +977,7 @@
<pack-runtime-jar jar-dir="${output}" jar-name="kotlin-reflect-before-jarjar.jar" implementation-title="${manifest.impl.title.kotlin.jvm.reflect}">
<jar-content>
<fileset dir="${basedir}/core/descriptor.loader.java/src" includes="META-INF/services/**"/>
<fileset dir="${output}/classes/reflection"/>
<fileset dir="${output}/classes/core"/>
<zipfileset src="${protobuf-lite.jar}"/>
@@ -831,31 +992,47 @@
</jar>
<delete file="${output}/kotlin-reflect-jarjar.jar" failonerror="false"/>
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="dependencies/jarjar.jar"/>
<jarjar jarfile="${output}/kotlin-reflect-jarjar.jar" filesonly="true" filesetmanifest="merge">
<zipfileset src="${output}/kotlin-reflect-before-jarjar.jar"/>
<rule pattern="org.jetbrains.kotlin.**" result="kotlin.reflect.jvm.internal.impl.@1"/>
<rule pattern="com.google.protobuf.**" result="kotlin.reflect.jvm.internal.impl.com.google.protobuf.@1"/>
<rule pattern="javax.inject.**" result="kotlin.reflect.jvm.internal.impl.javax.inject.@1"/>
</jarjar>
<kotlinc src="${basedir}/generators/infrastructure/strip-kotlin-annotations.kts" output="">
<compilerarg value="-script"/>
<compilerarg value="kotlin/jvm/internal/.*"/> <!-- Annotations to strip -->
<compilerarg value="kotlin/reflect/jvm/internal/impl/.*"/> <!-- Classes to strip from -->
<compilerarg value="${output}/kotlin-reflect-jarjar.jar"/>
<compilerarg value="${kotlin-home}/lib/kotlin-reflect.jar"/>
<classpath>
<pathelement location="${idea.sdk}/lib/asm-all.jar"/>
</classpath>
</kotlinc>
<sequential if:true="${obfuscate.reflect}">
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="dependencies/jarjar.jar"/>
<jarjar jarfile="${output}/kotlin-reflect-jarjar.jar" filesonly="true" filesetmanifest="merge">
<zipfileset src="${output}/kotlin-reflect-before-jarjar.jar"/>
<rule pattern="org.jetbrains.kotlin.**" result="kotlin.reflect.jvm.internal.impl.@1"/>
<rule pattern="com.google.protobuf.**" result="kotlin.reflect.jvm.internal.impl.com.google.protobuf.@1"/>
<rule pattern="javax.inject.**" result="kotlin.reflect.jvm.internal.impl.javax.inject.@1"/>
</jarjar>
<kotlinc src="${basedir}/generators/infrastructure/strip-kotlin-annotations.kts" output="">
<compilerarg value="-version"/>
<compilerarg value="-script"/>
<compilerarg value="kotlin/Metadata"/> <!-- Annotation to strip -->
<compilerarg value="kotlin/reflect/jvm/internal/impl/.*"/> <!-- Classes to strip from -->
<compilerarg value="${output}/kotlin-reflect-jarjar.jar"/>
<compilerarg value="${kotlin-home}/lib/kotlin-reflect.jar"/>
<classpath>
<pathelement location="${idea.sdk}/lib/asm-all.jar"/>
</classpath>
</kotlinc>
</sequential>
<sequential unless:true="${obfuscate.reflect}">
<echo message="Obfuscation of kotlin-reflect is disabled"/>
<copy file="${output}/kotlin-reflect-before-jarjar.jar" tofile="${output}/kotlin-reflect-jarjar.jar" overwrite="true"/>
<copy file="${output}/kotlin-reflect-before-jarjar.jar" tofile="${kotlin-home}/lib/kotlin-reflect.jar" overwrite="true"/>
</sequential>
</target>
<target name="pack-runtime-sources">
<!-- Rename packages in the sources of reflection impl (core) -->
<delete dir="${output}/core.src" failonerror="false"/>
<copy todir="${output}/core.src/kotlin/reflect/jvm/internal/impl">
<local name="runtime.sources.base.dir"/>
<condition property="runtime.sources.base.dir"
value="${output}/core.src/kotlin/reflect/jvm/internal/impl"
else="${output}/core.src/org/jetbrains/kotlin">
<istrue value="${obfuscate.reflect}"/>
</condition>
<copy todir="${runtime.sources.base.dir}">
<fileset dir="core">
<include name="descriptor.loader.java/src/**"/>
<include name="descriptors/src/**"/>
@@ -865,9 +1042,13 @@
</fileset>
<cutdirsmapper dirs="5"/> <!-- module/src/org/jetbrains/kotlin -->
</copy>
<replaceregexp match="org\.jetbrains\.kotlin" replace="kotlin.reflect.jvm.internal.impl" flags="g">
<fileset dir="${output}/core.src"/>
</replaceregexp>
<sequential if:true="${obfuscate.reflect}">
<!-- Rename packages in the sources of reflection impl (core) -->
<replaceregexp match="org\.jetbrains\.kotlin" replace="kotlin.reflect.jvm.internal.impl" flags="g">
<fileset dir="${output}/core.src"/>
</replaceregexp>
</sequential>
<pack-runtime-jar jar-name="kotlin-runtime-sources.jar" implementation-title="${manifest.impl.title.kotlin.jvm.runtime.sources}">
<jar-content>
@@ -890,14 +1071,14 @@
</target>
<target name="runtime"
depends="builtins,stdlib,core,reflection,pack-runtime,pack-runtime-sources"/>
depends="builtins,stdlib,kotlin-test,core,reflection,pack-runtime,pack-runtime-sources,mock-runtime-for-test"/>
<target name="dist"
depends="clean,init,prepare-dist,preloader,runner,serialize-builtins,compiler,compiler-sources,ant-tools,jdk-annotations,android-sdk-annotations,runtime,kotlin-js-stdlib,android-compiler-plugin,kotlinr"
depends="clean,init,prepare-dist,preloader,runner,serialize-builtins,compiler,compiler-sources,kotlin-build-common,ant-tools,runtime,kotlin-js-stdlib,android-extensions-compiler,daemon-client,kotlin-build-common-test"
description="Builds redistributables from sources"/>
<target name="dist-quick"
depends="clean,init,prepare-dist,preloader,serialize-builtins,compiler-quick,ant-tools,jdk-annotations,android-sdk-annotations,runtime,kotlin-js-stdlib,android-compiler-plugin"
depends="clean,init,prepare-dist,preloader,serialize-builtins,compiler-quick,ant-tools,runtime,kotlin-js-stdlib,android-extensions-compiler"
description="Builds everything, but classes are reused from project out dir, doesn't run proguard and javadoc"/>
<target name="dist-quick-compiler-only"
@@ -917,8 +1098,10 @@
<javac2 destdir="${output}/classes/idea-analysis" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false"
source="${java.target}" target="${java.target}">
<withKotlin externalannotations="${external.annotations.path}" modulename="kotlin-for-upsource"/>
<skip pattern="kotlin/jvm/internal/.*"/>
<withKotlin modulename="kotlin-for-upsource">
<compilerarg value="-version"/>
</withKotlin>
<skip pattern="kotlin/Metadata"/>
<src>
<dirset dir="${basedir}/idea/ide-common" includes="src"/>
<dirset dir="${basedir}/idea/idea-analysis" includes="src"/>
@@ -939,10 +1122,11 @@
<fileset dir="${output}/classes/compiler"/>
<fileset dir="${output}/builtins">
<include name="kotlin/**"/>
<exclude name="kotlin/internal/**"/>
</fileset>
<fileset dir="${basedir}/core/descriptor.loader.java/src" includes="META-INF/services/**"/>
<fileset dir="${basedir}/compiler/frontend.java/src" includes="META-INF/services/**"/>
<fileset dir="${basedir}/compiler/backend/src" includes="META-INF/services/**"/>
<fileset dir="${basedir}/compiler/cli/src" includes="META-INF/services/**"/>
<zipgroupfileset dir="${basedir}/lib" includes="*.jar"/>
<zipgroupfileset file="${kotlin-home}/lib/kotlin-runtime.jar"/>
@@ -987,6 +1171,28 @@
</zip>
</target>
<target name="mock-runtime-for-test">
<delete dir="${output}/mock-runtime-src" failonerror="false"/>
<mkdir dir="${output}/mock-runtime-src"/>
<copy file="${basedir}/libraries/stdlib/src/kotlin/util/Standard.kt" todir="${output}/mock-runtime-src"/>
<copy file="${basedir}/libraries/stdlib/src/kotlin/internal/Annotations.kt" todir="${output}/mock-runtime-src"/>
<new-kotlinc output="${output}/classes/mock-runtime" moduleName="kotlin-stdlib">
<src>
<include name="dist/mock-runtime-src"/>
</src>
<class-path>
<pathelement path="${output}/classes/builtins"/>
</class-path>
</new-kotlinc>
<pack-runtime-jar jar-dir="${output}" jar-name="kotlin-mock-runtime-for-test.jar" implementation-title="Kotlin Mock Runtime">
<jar-content>
<fileset dir="${output}/classes/mock-runtime"/>
</jar-content>
</pack-runtime-jar>
</target>
<target name="build-bootstrap-artifacts" depends="dist,zip-compiler"/>
<target name="build-artifacts" depends="dist,zip-compiler,kotlin-for-upsource,zip-test-data"/>

Some files were not shown because too many files have changed in this diff Show More