Commit Graph

23170 Commits

Author SHA1 Message Date
Dmitry Jemerov 109c09cf7c get rid of WritableScopeWithImports 2015-06-08 15:10:39 +02:00
Michael Bogdanov baa44e3d01 Fix default parameter remapping on inlining: support store instruction
#KT-7963 Fixed
2015-06-08 16:07:39 +03:00
Michael Bogdanov 7a1625fc9e Support extension lambda inlining
#KT-7962 Fixed
2015-06-08 16:07:38 +03:00
Dmitry Jemerov 18753a16d7 a bunch of fixes to the grammar 2015-06-08 14:46:28 +02:00
Valentin Kipyatkov 5f0171aa04 Added two more inspections based on existing intentions 2015-06-08 15:37:59 +03:00
Valentin Kipyatkov 5b9680fe11 Made all inspections making code more verbose low priority 2015-06-08 15:37:59 +03:00
Valentin Kipyatkov 63b30cf7f6 KT-7955 "Add replaceWith to specify replacement pattern" intention/inpesction has too large a range
#KT-7955 Fixed
2015-06-08 15:37:58 +03:00
Valentin Kipyatkov e1efb95259 Added test 2015-06-08 15:37:40 +03:00
Valentin Kipyatkov 7dddd6c718 Code simplification 2015-06-08 15:33:58 +03:00
Valentin Kipyatkov 8243d27fb2 Smart completion: argument with "*" is not necessary the only one for vararg parameter 2015-06-08 15:33:58 +03:00
Valentin Kipyatkov 0d992ee38f Moved tests 2015-06-08 15:33:58 +03:00
Valentin Kipyatkov 54e9a46f12 Smart completion: fixed in argument with "*" 2015-06-08 15:33:58 +03:00
Valentin Kipyatkov 2197d554ca Smart completion: a bit more correct logic for last vararg parameter 2015-06-08 15:33:58 +03:00
Valentin Kipyatkov ee15eae6b3 Smart completion: function literal argument can correspond only to the last parameter! 2015-06-08 15:33:57 +03:00
Valentin Kipyatkov 6284f557e6 Smart completion: sometimes we can insert comma after vararg argument too 2015-06-08 15:33:57 +03:00
Valentin Kipyatkov 02e876679c Completion: more correct code for lambda template insertion 2015-06-08 15:33:57 +03:00
Valentin Kipyatkov 64e9ecc7b4 Moved test data 2015-06-08 15:33:57 +03:00
Valentin Kipyatkov 7eec200887 Moved tests from deprecated to generated test fixture 2015-06-08 15:33:57 +03:00
Valentin Kipyatkov 560b7dae75 Minor correction 2015-06-08 15:33:56 +03:00
Nikolay Krasko e4c7f9bc22 Keep NullableNotNullManager methods for J2K converter 2015-06-08 15:21:03 +03:00
Valentin Kipyatkov 0cb2348b2f KT-6807 J2K: Convert "==" to "===" if class has equals() method
#KT-6807 Fixed
2015-06-06 11:00:55 +03:00
Alexey Sedunov dae7717a69 Introduce Variable: Reimplement in-place refactoring using AbstractInplaceIntroducer. Extract common superclass AbstractKotlinInplaceIntroducer 2015-06-05 21:10:36 +03:00
Alexey Sedunov 4a56b99cff Introduce Parameter: Reimplement in-place refactoring using AbstractInplaceIntroducer
This simplifies implementation and fixes bug with unnecessarily detailed command history available through undo/redo
2015-06-05 21:10:35 +03:00
Alexander Udalov d475401108 Ant task: don't pass kotlin-runtime.jar to javac on "-no-stdlib" 2015-06-05 16:19:55 +03:00
Alexander Udalov f5ec8d6850 Minor, delete useless test
'withKotlinNoJavaSources' tests exactly the same
2015-06-05 16:19:42 +03:00
Alexander Udalov e224337ff3 Ant task: support "compilerarg" element in withKotlin as in kotlinc 2015-06-05 16:19:19 +03:00
Alexander Udalov dda44a61a1 Rewrite integration tests to JUnit3, make Ant JVM task tests generated 2015-06-05 16:19:17 +03:00
Alexander Udalov 0f6c23e1c4 Don't always run code in Ant task tests
But when running code, do it via <java> task, not via custom testing code. Most
of the time the compiled code need not be runned, because it's irrelevant to
the Ant task itself
2015-06-05 15:55:59 +03:00
Alexander Udalov 968d362b77 Don't check exit code in Ant tests
It's already checked in the build log in each test
2015-06-05 15:55:58 +03:00
Alexander Udalov 89408f45bb Ant task: pass kotlin-runtime to javac's classpath; simplify tests
'kotlinCompiler' test is deleted because it's a very roundabout way to compile
Kotlin and Java sources, and there's no point in testing it.

'javacCompiler' test is deleted for similar reasons: using javac's "compiler"
option is not an advertised way to use Kotlin Ant task, and anyway it will work
with any CompilerAdapter instance, so it's hard to break it (apart from
deleting "withKotlin" adapter).

There are tests which check compilation/running of the same code but with the
recommended method. The pretext for deletion of these tests is to make Ant
tests generated, and that would be easier if they wouldn't depend on any outer
variables
2015-06-05 15:55:58 +03:00
Alexander Udalov 49c78602af Minor, move and rename CompilerClassLoaderHolder -> KotlinAntTaskUtil 2015-06-05 15:55:56 +03:00
Alexander Udalov 8f5826793d Ant task: warn when Ant version < 1.8.2 2015-06-05 15:55:56 +03:00
Alexander Udalov 0ad6dce7ce Ant task: support 'failOnError' attribute in kotlinc and withKotlin 2015-06-05 15:55:54 +03:00
Alexander Udalov 6d00c265e2 Always run kotlinc in <withKotlin/> Ant task
This change requires withKotlin to be run with Ant of version at least 1.8.2.

Some test data changed because now compileList contains both Java and Kotlin
sources

 #KT-7870 Fixed
2015-06-05 15:55:53 +03:00
Alexander Udalov cbbf8dec7e Drop ant-1.7 from project, advance Ant to 1.8.2
Ant 1.8.2 has the API (namely,
CompilerAdapterExtension#getSupportedFileExtensions) which will allow to fix a
critical bug in <withKotlin/> task (see KT-7870)
2015-06-05 15:55:52 +03:00
Alexander Udalov 9008a8b161 Fix withKotlin Ant task when no classpath is given
#KT-6492 Fixed
2015-06-05 15:55:51 +03:00
Nikolay Krasko cf62e0b999 Remove internal artifacts for rr/* branches 2015-06-05 14:29:54 +03:00
Nikolay Krasko 95e4766b3e Minor: reformat 2015-06-05 14:29:49 +03:00
Nikolay Krasko 9cfbf27602 Use same classloader for loading JS and JVM compilers 2015-06-05 14:29:47 +03:00
Denis Zharkov 9ec235c011 Introduce KotlinNamesValidator
It's needed to prohibit invalid kotlin identifiers in refactorings

 #EA-69048 Fixed
 #EA-69063 Fixed
2015-06-05 11:58:16 +03:00
Alexander Udalov 6e97f85863 Fix type argument substitution bug in KFunction construction
For example,

KMemberFunction2<T, P1, P2, R> : KMemberFunction<T, R>

So for this inheritance the heuristic that was present ("take the last K type
parameters of the subclass, and substitute for K parameters of the superclass")
was wrong. The new heuristic for this case is: take type parameters with the
same names.

Also don't store "parameters" in a lazy value, since it's easy to compute and
it's computed practically every time anyway
2015-06-04 23:08:21 +03:00
Alexander Udalov b474fa9278 Refactor fictitious function class kinds, reuse in J<->K map 2015-06-04 23:08:21 +03:00
Alexander Udalov 9e8c51f7d3 Minor, delete pointless field annotations 2015-06-04 23:08:20 +03:00
Ilya Gorbunov 1036448fcd Improve the documentation of MatchGroupCollection.
#KT-7938 Fixed
2015-06-04 20:51:08 +03:00
Mikhail Glukhikh 98407a7c4b Recursive annotations are now possible for properties / functions / classes / primary constructors #EA-66984 Fixed #EA-63992 Fixed #EA-64272 Fixed
A set of tests provided.
2015-06-04 20:09:36 +03:00
Ilya Gorbunov 0c1a8ab8ff Change KotlinCleanupInspection display name and description to mention deprecated symbols 2015-06-04 20:00:55 +03:00
Evgeny Gerashchenko c194ced87e Performance report is emitted only when corresponding command-line argument is provided. 2015-06-04 19:45:01 +03:00
Natalia Ukhorskaya b4190fb1fe Rewrite KotlinOutputParser for Android plugin to make it works with Android Studio 1.3
#KT-7862 Fixed
2015-06-04 19:17:46 +03:00
Pavel V. Talanov 812273cb2b Fix a problem when invoking completion outside of source roots could lead to declarations from index being analyzed in a wrong resolution facade 2015-06-04 18:36:05 +03:00
dnpetrov 50ea67ba13 KT-5524 Support [platformName] annotation for class members
@platformName is now supported for final non-overriding class member functions
(including property accessors).
Front-end provides diagnostics for inapplicable annotation cases.
Code generation updated:
- ignore kotlin.platform.platformName annotation for Java class methods;
- bridges generation generates proper JVM declarations in case of methods renamed with @platformName.
@platformName-related tests added.

#KT-5524 Fixed
2015-06-04 17:54:08 +03:00