Commit Graph

14613 Commits

Author SHA1 Message Date
asedunov 85dbd8cf49 Merge pull request #410 from kuity/unnecessaryParensInWhenToIf
Fix KT-4385 "Unnecessary parentheses in "replace when with if"
2014-03-17 13:00:10 +01:00
Natalia Ukhorskaya 0045edbebe Android tests: revert sdk version to 4.1 2014-03-17 14:00:20 +04:00
Alexander Udalov 7a2fce4fba Add regression tests for obsolete issues
#KT-2592 Obsolete
 #KT-2768 Obsolete
2014-03-16 03:18:26 +04:00
Alexander Udalov 65edd6a16e Make KotlinBinaryClassCache thread-local 2014-03-14 17:26:48 +04:00
Alexander Udalov 307f52895a Refactor KotlinJvmBinaryClass, VirtualFileKotlinClass, etc.
VirtualFileKotlinClass now reads its header and name on creation. This is not
lazy enough and may be slower in some circumstances, but has the following
advantage: if anything is wrong in the header, a VirtualFileKotlinClass
instance will not be created at all, making it nearly impossible for the client
code to operate on invalid data causing all kinds of exceptions
2014-03-14 16:00:20 +04:00
Alexander Udalov 9bf0d014d5 Sort out "isSpecialAnnotation" method logic
Remove duplicate method, include all needed annotations (seems that some of
them were forgotten in either of the two methods)
2014-03-14 16:00:19 +04:00
Lingzhang 877b9f2d99 KT4385 Bug Fix for Unnecessary Parentheses in WhenToIfIntention 2014-03-13 21:26:03 -04:00
Zalim Bashorov 7b503bbe6f Minor in JS backend: added regression tests.
#{KT-2219, KT-2470, KT-2507, KT-2222, KT-2995, KT-2221} Obsolete
2014-03-13 22:57:41 +04:00
Svetlana Isakova 604e062f91 Fixed assertion error for incomplete code. 2014-03-13 19:09:01 +04:00
Natalia Ukhorskaya 904217d793 Gradle: set output directory to tmp/kotlin-classes to exclude it in IDE.
This is a temporary workaround: should be removed when Android Studio will get excluded output directories from Gradle Model (see AndroidContentRoot.java:35)
 #KT-4507 Fixed
2014-03-13 17:32:13 +04:00
Mikhael Bogdanov 6ac6bd0a7c KT-4388: Unclear warning for inline function
#KT-4388 Fixed
2014-03-13 16:35:56 +04:00
Zalim Bashorov a5e74d7db3 JS backend: switch to use Function.call for calling extension lambdas and local extension functions.
Main reason for this change is (simple) interop with native code when pass extension lambda to or from native code.

(#KT-4238, #KT-4345) Fixed
2014-03-13 14:17:09 +04:00
Zalim Bashorov 206be96509 JS backend: added tests which pass an extension lambda to native code and visa versa.
Added workarounds in some tests because Rhino wrongly implicitly converts first parameter of `Function.call` to `Object`. But it's contradicts to ES5 specification(par. 15.3.4.4).

(#KT-4238, #KT-4345) In progress
2014-03-13 14:17:09 +04:00
Zalim Bashorov 597fff45e3 Minor in JS backend: made stable order of function parameters for captured variables. 2014-03-13 14:17:09 +04:00
Mikhael Bogdanov 769f559adf Wise exception propagation for inlines errors 2014-03-13 14:06:58 +04:00
Mikhael Bogdanov f475f3ba31 Inline checkbox in BytecodeToolWindow 2014-03-13 14:06:57 +04:00
Natalia Ukhorskaya 53e41e94d9 Fix maven tests 2014-03-13 13:56:28 +04:00
Natalia Ukhorskaya 0340aba2ce Tools: add new gradle-test module to root pom.xml 2014-03-13 13:56:27 +04:00
Mikhael Bogdanov 768c565d3f Fix for rubish labels inside captured field access chains 2014-03-13 10:36:55 +04:00
Mikhael Bogdanov c95001370a Code clean 2014-03-13 10:36:54 +04:00
Mikhael Bogdanov 2dcc0bce46 Inline refactoring: more templates for captured fields
Support of complex lambda inlining cases
2014-03-13 10:36:54 +04:00
Natalia Ukhorskaya 4a8bcc614a Resolve compileTimeInitializer for variable in lazy resolve 2014-03-13 10:07:18 +04:00
Natalia Ukhorskaya 89d99d2848 Remove toInt() from rendering IntValue 2014-03-13 10:07:17 +04:00
Natalia Ukhorskaya a80114d720 Use one method to create compile-time value 2014-03-13 10:07:16 +04:00
Natalia Ukhorskaya 201af666a9 Move isVar check for compile time initializer out of the setter 2014-03-13 10:07:14 +04:00
Natalia Ukhorskaya 000dd4478a Rename 2014-03-13 10:07:13 +04:00
Natalia Ukhorskaya df3ed5059c StorageManager for compile-time initializer 2014-03-13 10:07:12 +04:00
Natalia Ukhorskaya 17259a052e Write constant initializer for java properties 2014-03-13 10:07:11 +04:00
Natalia Ukhorskaya 74c4234c64 Add test for kotlin compiled property as annotation parameter 2014-03-13 10:07:10 +04:00
Natalia Ukhorskaya 9b5050dddd Serialize compile time constant for property initializer 2014-03-13 10:07:08 +04:00
Natalia Ukhorskaya bb7312b47f Render property constant 2014-03-13 10:07:07 +04:00
Natalia Ukhorskaya 8c80b41606 Add compileTimeConstant to variable descriptor 2014-03-13 10:07:06 +04:00
Natalia Ukhorskaya a2879f229a Add serializer for compile-time constant initializer 2014-03-13 10:07:05 +04:00
Natalia Ukhorskaya 073d345841 Extract BaseDeserializer from AnnotationDeserializer. Move storage to separate class 2014-03-13 10:07:04 +04:00
Natalia Ukhorskaya 6089f5e3ef Remove DescriptorSerializationTest 2014-03-13 10:07:03 +04:00
Natalia Ukhorskaya 9672026a53 Add a superclass for byte, short, int, long compile-time constants 2014-03-13 10:07:01 +04:00
Alexey Tsvetkov 1cd7fa65d7 JS backend: fixed compiler crash when use in elvis operator something which is expression in Kotlin and not in Javascript, e.g. return.
#KT-4159 fixed
2014-03-12 19:01:55 +04:00
Alexey Tsvetkov 21f87350b9 JS backend: added tests for KT-4159. 2014-03-12 19:01:55 +04:00
Nikolay Krasko 569f139d8a Update to idea 135.406, support 135 and 136 branch 2014-03-12 18:39:32 +04:00
Zack Grannan 6156a56a4b Generated tests 2014-03-12 16:02:57 +04:00
Zack Grannan 3862a3b5bc Added ifThenToSafeAccessIntention 2014-03-12 16:02:56 +04:00
Zack Grannan 1f720c8559 Added safeAccessToIfThen intention 2014-03-12 16:02:55 +04:00
Zack Grannan 1ca4bb0e79 Added ifThenToElvisIntention 2014-03-12 16:02:55 +04:00
Zack Grannan 673369affe Added elvisToIfThenIntention 2014-03-12 16:02:54 +04:00
Zack Grannan 6b5e46da50 Added IfThenUtils 2014-03-12 16:02:53 +04:00
Zack Grannan fcbd7b357a Modified doRefactoring to allow occurrences to be specified 2014-03-12 14:43:08 +04:00
Andrey Breslav aa00862425 Double-checked locking fixed in LockBasedStorageManager
There were two problems here:
 * a volatile field was read and then a local variable used, i.e. the field might have been changed in between the check and the return;
 * this volatile read was unnecessary, because the whole purpose of `_value` local variable is to avoid it.
2014-03-12 13:55:24 +04:00
Andrey Breslav 667afc565e Workaround for EA-54533 - UOE: DeserializedMemberScope.getDeclarationsByLabel 2014-03-12 13:51:04 +04:00
Natalia Ukhorskaya 3f2c43bab1 Remove unused resources 2014-03-12 11:31:09 +04:00
Natalia Ukhorskaya 94ccd8b2f2 Merge remote-tracking branch 'origin/pr/401'
Conflicts:
	libraries/tools/kotlin-gradle-plugin-core/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinPlugin.kt
	libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/KotlinGradlePluginIT.kt
2014-03-12 11:28:23 +04:00