Commit Graph

35734 Commits

Author SHA1 Message Date
Denis Zharkov a52ae04aef Fix fast-path check when selecting most specific members
Obviously 'overridableGroup' cannot be both empty and having the single element.
'conflictedHandles' that is what meant to be empty instead
2016-12-07 21:04:08 +03:00
Denis Zharkov 83056c71c9 Minor. Extract FlatSignature factory 2016-12-07 21:04:08 +03:00
Denis Zharkov c45edaa420 Minor. Extract CandidatesCollector as a type alias 2016-12-07 21:04:08 +03:00
shiraji 2815b5e62b KT-15030 Remove redundant calls of conversion methods: false positive for 'toList()'
#KT-15030 Fixed
2016-12-07 19:00:12 +03:00
Mikhail Glukhikh 268702e0cc "Change return type for enclosing fix" now handles TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH correctly #KT-14063 Fixed 2016-12-07 18:52:04 +03:00
Mikhail Glukhikh 2ac8e5b4a7 "Change return type fix" now handles data class properties correctly #KT-15028 Fixed 2016-12-07 18:51:58 +03:00
Mikhail Glukhikh 0994d46038 Convert reference to lambda: handle special case of extension functional type #KT-14985 Fixed 2016-12-07 18:51:53 +03:00
Mikhail Glukhikh e904e56de3 Convert reference to lambda: correct handling of static method references #KT-14982 Fixed 2016-12-07 18:51:48 +03:00
Mikhail Glukhikh ea8548c55b Simplify boolean == true / false is no longer applicable on flexible boolean #KT-15087 Fixed 2016-12-07 18:51:42 +03:00
Mikhail Glukhikh 4b86c4aa27 Infrastructure test for intention descriptions availability added 2016-12-07 18:51:37 +03:00
Nikolay Krasko 06172e7110 Refactoring: move runSynchronouslyWithProgress to ProgressUtil 2016-12-07 17:32:38 +03:00
Nikolay Krasko fd8d616d35 Use lazy resolve for counting list of inlined function during step out (KT-14892)
#KT-14892 Fixed
2016-12-07 17:32:38 +03:00
Nikolay Krasko fc5b493fd3 Run full resolve in debugger with write action priority (KT-14602)
#KT-14602 Fixed
2016-12-07 17:32:38 +03:00
Nikolay Krasko 45532e480f Remove repeating contexts in CompositeBindingContext creation 2016-12-07 17:32:38 +03:00
Nikolay Krasko 76916b0877 Avoid requesting line number for bad offset (EA-87678)
Example of stack trace:
java.lang.IndexOutOfBoundsException: Wrong offset: 14847. Should be in range: [0, 14846]
	at com.intellij.openapi.editor.impl.LineSet.findLineIndex(LineSet.java:141)
	at com.intellij.openapi.editor.impl.DocumentImpl.getLineNumber(DocumentImpl.java:919)
	at org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringUtilKt.getLineCount(kotlinRefactoringUtil.kt:344)
	at org.jetbrains.kotlin.idea.debugger.KotlinPositionManager.getSourcePosition(KotlinPositionManager.kt:125)
2016-12-07 17:32:38 +03:00
Nikolay Krasko ee1ce184f9 Don't resolve reference if result is useless 2016-12-07 17:32:38 +03:00
Ilya Gorbunov 7a019e80fe Exclude bundled org.jetbrains.annotations from kotlin-runtime. Add a dependency on org.jetbrains:annotations:13.0 instead. 2016-12-06 22:25:06 +03:00
Ilya Gorbunov 2e7456c56e Add non-compiled sources to runtime before packaging sources jar. 2016-12-06 21:31:41 +03:00
Ilya Gorbunov 2fa98323f1 Refactor: rename files. 2016-12-06 21:30:35 +03:00
Ilya Gorbunov d5f5f88cda Add number to string conversion with the specified radix.
#KT-8286
2016-12-06 21:30:35 +03:00
Sergey Mashkov 2ca336fb32 KT-15120 Gradle JS test compile task doesn't pick up production code 2016-12-06 16:51:15 +03:00
Alexey Tsvetkov 7b3bc0235b Fix JS compiler jar search
#KT-15127 fixed
2016-12-06 16:07:43 +03:00
Alexey Andreev 0302fcbb72 JS: don't write native superclass to metadata. Fix KT-15007 2016-12-06 15:42:34 +03:00
Sergey Mashkov e7d6711db3 IDL2K: properly handle clash or val and var attributes 2016-12-06 15:00:35 +03:00
Alexander Udalov 0d99801783 Revert "Add NonVolatileRef to runtime"
This reverts commit 1e9624901a.

For more information, see
https://discuss.kotlinlang.org/t/non-volatile-vs-volatile-captured-refs-by-default/

 #KT-14746 Fixed
2016-12-06 14:59:15 +03:00
Alexander Udalov 04d4351e30 Revert "Make Ref fields volatile"
This reverts commit 6b348bfc6e.

For more information, see
https://discuss.kotlinlang.org/t/non-volatile-vs-volatile-captured-refs-by-default/

 #KT-14746 In Progress
2016-12-06 14:59:14 +03:00
Mikhail Zarechenskiy 57ee8c878c Regenerate tests 2016-12-06 08:56:45 +03:00
Mikhail Zarechenskiy 0134b8819b Optimize const vals by inlining them at use sites
#KT-11734 Fixed
 #KT-13570 Fixed
2016-12-05 22:11:33 +03:00
Mikhail Zarechenskiy 8c1e165f18 Skip property accessors for constants
- Inline protected constants from Java at use sites
 - Do not create accessors for private constants in Kotlin

 #KT-11734 In Progress
2016-12-05 22:10:14 +03:00
Mikhail Zarechenskiy bd14c24592 Allow LANGUAGE_VERSION directive in codegen tests 2016-12-05 22:10:08 +03:00
Ilya Gorbunov 4d3d8463dc Make tools.jar system dependency, since classpath property is readonly. 2016-12-05 20:10:33 +03:00
Yan Zhulanow fcafaf5500 Update LightAnalysisModeCodegenTests for Kotlin 1.1 2016-12-05 20:10:32 +03:00
Yan Zhulanow e31a39386e Minor: Fix testDeprecatedJvmOverloads test (Kotlin runtime is not enabled by default now in bytecode listing tests) 2016-12-05 19:58:06 +03:00
Yan Zhulanow e39a8f2900 Kapt3, Minor: Add tools.jar to kotlin-annotation-processing classpath (Maven) 2016-12-05 19:58:05 +03:00
Yan Zhulanow 75aaf6e797 Minor: Update tests for light analysis mode (rebase) 2016-12-05 19:58:02 +03:00
Yan Zhulanow d246bd8cff Kapt3: Fix literal expressions for byte and short 2016-12-05 19:57:59 +03:00
Yan Zhulanow de0e4ac340 Kapt3: Add tests for primitive values and NonExistentClass 2016-12-05 19:57:57 +03:00
Yan Zhulanow 582f85f303 Kapt3: Generate stub for error.NonExistentClass to make javac happy 2016-12-05 19:57:56 +03:00
Yan Zhulanow 325245f996 Minor: Rebase to 1.0.6, re-generate tests 2016-12-05 19:57:55 +03:00
Yan Zhulanow c2013c4d03 Kapt3: Add 'useLightAnalysis' option to compiler and Gradle plugins 2016-12-05 19:57:53 +03:00
Yan Zhulanow e4de840b8a Kapt3: Add friend paths to kapt tasks 2016-12-05 19:57:52 +03:00
Yan Zhulanow 75a8088f65 Kapt3: Minor: Changes on review 2016-12-05 19:57:51 +03:00
Yan Zhulanow 95d1210317 Kapt3: Extract annotation processing to its own task in Gradle. Now the kotlinCompile task should know nothing about kapt, for the main task it's just a regular Java source root. 2016-12-05 19:57:49 +03:00
Yan Zhulanow 92282072fc Enable light class analysis mode for AbstractLightAnalysisModeCodegenTest. See also the previous commit.
Note that no test data files are changed, it means that light classes with the light analysis mode enabled are the same as with the full analysis.
2016-12-05 19:57:48 +03:00
Yan Zhulanow 328286ab14 Use box tests to check if the light analysis mode (without analyzing bodies when possible) produces the same result as the complete analysis. See also the next commit in which light analysis mode is applied. Note that no tests were changed. 2016-12-05 19:57:47 +03:00
Yan Zhulanow 8bdb54929b Fix @JvmMultifileClass in ClassBuilderMode=LIGHT_CLASSES 2016-12-05 19:57:46 +03:00
Yan Zhulanow 0914a65234 Kapt3: Support processor arguments. Add integration tests. 2016-12-05 19:57:45 +03:00
Yan Zhulanow b54df7a945 Kapt3: Do not resolve declaration bodies if possible in kapt 2016-12-05 19:57:44 +03:00
Yan Zhulanow d884830700 Allow to avoid declaration body resolution for function and property initializers if the return type is explicitly specified. This significantly reduces the analysis time in kapt3. 2016-12-05 19:57:43 +03:00
Yan Zhulanow 90cbf172d2 Kapt3: Use annotation simple name if the annotation declaration is inside the same package as the current source file's package 2016-12-05 19:57:42 +03:00