Commit Graph

29643 Commits

Author SHA1 Message Date
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