Sergey Igushkin
73e94ffde0
Added a test for the fix of KT-16434.
...
(cherry picked from commit 5a6d06f)
2017-03-03 18:04:23 +03:00
Sergey Igushkin
6605ba80e7
Fix for androidTest variants of Android Gradle build.
...
Added a workaround reflection call to TaskManager to create a
javac task since it is missing for androidTest variants with jack.
Added source configuration with the tested variant to make
the tested sources visible to the compiler.
#KT-16434 Fixed
(cherry picked from commit 84efd05)
2017-03-03 18:04:12 +03:00
Mikhail Glukhikh
0432e2e947
Quick-fix to add noinline to parameter with suspend function type + AddInlineModifierFix refactoring #KT-16074 Fixed
2017-03-03 17:28:37 +03:00
Mikhail Glukhikh
d9710ea4ff
#EA-97027 Fixed
2017-03-03 17:28:35 +03:00
Mikhail Glukhikh
8965bb8977
Navigation: new icons for header <---> impl #KT-15842 Fixed
2017-03-03 17:28:34 +03:00
Vyacheslav Gerasimov
1376c8f8cf
Implement quickfixes for Android Lint api issues
...
#KT-16624 Fixed
#KT-16625 Fixed
#KT-14947 Fixed
2017-03-03 16:22:36 +03:00
Vyacheslav Gerasimov
a907ec92b5
Implement Android resource reference folding
...
#KT-15451 Fixed
2017-03-03 16:18:20 +03:00
Vyacheslav Gerasimov
39010ab847
Fix broken isReferenceTo checking code for Android extensions
...
#KT-16132 Fixed
2017-03-03 16:17:52 +03:00
Alexander Udalov
25c1828288
JS: write and load pre-release flag on binaries
2017-03-03 13:33:51 +03:00
Alexander Udalov
de8dd37e44
Change DeserializedContainerSource.presentableFqName to String
...
To allow outputting something other than "Class 'XXX'" in the diagnostic
message for declarations deserialized from JS
2017-03-03 13:33:51 +03:00
Alexander Udalov
f120865350
Combine cls stub builders for built-ins and JS
2017-03-03 13:33:51 +03:00
Alexander Udalov
297eb952bc
Extract common parts of built-ins and JS decompilers
2017-03-03 13:33:51 +03:00
Alexander Udalov
b52b90c182
Extract serialization of packageFqName extension to SerializerExtensionBase
2017-03-03 13:33:51 +03:00
Alexander Udalov
4e91dadfab
Combine decompiler deserializers for built-ins and JS
2017-03-03 13:33:50 +03:00
Alexander Udalov
bafa0ec1ee
Minor, don't throw exception on empty proto message
2017-03-03 13:33:50 +03:00
Alexander Udalov
5a00a97cf1
Extract common parts from deserialization of built-ins and JS
2017-03-03 13:33:50 +03:00
Alexander Udalov
3cb8f1ab20
Drop BuiltIns protobuf message, use ProtoBuf.PackageFragment instead
2017-03-03 13:33:50 +03:00
Alexander Udalov
a36e457c12
Introduce PackageFragment protobuf message for kjsm/builtins/common metadata
2017-03-03 13:33:50 +03:00
Alexander Udalov
2b1b1fb0d4
Merge VirtualFileKotlinClassFinder into VirtualFileFinder
...
VirtualFileKotlinClassFinder was the only direct subclass of VirtualFileFinder
2017-03-03 13:33:50 +03:00
Alexander Udalov
abb5bc6aba
Simplify VirtualFileFinder and their factories' hierarchy
...
Since there's no JsVirtualFileFinder anymore, inline JvmVirtualFileFinder into
VirtualFileFinder and drop "Jvm" prefix everywhere
2017-03-03 13:33:50 +03:00
Alexander Udalov
ee0874a26d
Drop JsVirtualFileFinder and its factory, refactor nearby
...
The only remaining usage was in KotlinRuntimeLibraryUtil.kt where we only
needed to check whether there's at least one file in a given package indexed by
KotlinJavaScriptMetaFileIndex. Move that logic to a public extension, drop
everything else
2017-03-03 13:33:50 +03:00
Alexander Udalov
67699bf17e
Rename metadata version index and its subclasses
2017-03-03 13:33:50 +03:00
Alexander Udalov
57877bb007
Add default value to js_code_binary_version in js.proto
...
By default, assume the version is 1.0.0
2017-03-03 13:33:49 +03:00
Mikhael Bogdanov
a03ed6f742
Fix for KT-16581: VerifyError when calling default value parameter with jvm-target 1.8
...
#KT-16581 Fixed
2017-03-03 11:21:42 +01:00
Ilya Chernikov
ffe3453937
Do not pollute IDEA log with fake script dependencies
2017-03-03 10:59:28 +01:00
Mikhail Glukhikh
3060ecc066
Minor build fix: "Convert to apply" is now applicable only with 2+ calls with the same receiver
2017-03-03 11:10:01 +03:00
Dmitry Petrov
634d9834de
Wrong receiver is generated for variable-as-function call on object.
...
Move 'generateExpressionForReferencedDescriptor' to CallGenerator,
use it in 'generateCall',
add PSI-free versions of some utility methods so that call elements can
be generated when we're already deep in ResolvedCall generation
and have forgotten about PSI.
2017-03-03 10:15:59 +03:00
Mikhail Zarechenskiy
d573962259
Add test for class delegation with private constructor
...
#KT-16583 Obsolete
2017-03-02 18:34:59 +03:00
Mikhail Zarechenskiy
e2dcec62d3
Fix access to top-level declarations inside anonymous initializer
...
#KT-16583 Fixed
2017-03-02 18:34:51 +03:00
shiraji
0e5603f644
Implement an intention converting several calls with same receiver to with/apply/run #KT-12183 Fixed
2017-03-02 16:56:56 +03:00
shiraji
c2e5fc5215
Move KtDotQualifiedExpression.deleteFirstReceiver to Utils.kt
2017-03-02 16:56:53 +03:00
Alexander Udalov
39d0cd7237
Test that all Kotlin versions in the project are consistent
...
There are two different tests: the one that checks that all versions are
consistent (but not equal, because some versions are major.minor.patch,
but some only major.minor), and the one that checks that versions of all
subprojects of the Maven projects are exactly equal (1.1-SNAPSHOT
currently)
#KT-16455 Fixed
2017-03-02 16:36:51 +03:00
Denis Zharkov
6fb83c2ba3
Force wrapping java classes from annotation methods into KClasses
...
Before this change such wrapping happened only during coercion,
i.e. when a call-site expected a KClass instance.
But when call-site expects Any, for example, no wrapping happened,
and raw j.l.Class instance was left on stack.
The solution is to put wrapping code closer to generation of annotation's
method call itself to guarantee that necessary wrapping will happen.
#KT-9453 Fixed
2017-03-02 15:19:09 +03:00
Denis Zharkov
415c3d57af
Fix substitutor for synthetic SAM adapters
...
When synthetic member comes not from the receiver type itself,
but from one of its supertypes it doesn't make sense to subsitute
the member with receiver type, we should obtain relevant supertype
and use it instead.
#KT-16578 Fixed
2017-03-02 15:06:59 +03:00
Anton Bannykh
9e5ecc11b7
JS: fixed Double.NaN behaviour (KT-13610).
2017-03-02 14:29:50 +03:00
Dmitry Petrov
f636ab21f8
Use proper descriptor for (generic) property assignment.
...
Insert IMPLICIT_INTEGER_COERCION only if Int is coerced to an integer type.
2017-03-02 14:25:58 +03:00
Dmitry Petrov
97fbbc74e6
KT-16440 ClassConstructorDescriptorImpl has null returnType
...
Set constructor return type in FunctionDescriptorResolver#createConstructorDescriptor
(it seems to be the only place where ClassConstructorDescriptorImpl#initialize(...)
is called, but returnType is not set).
2017-03-02 14:25:58 +03:00
Dmitry Petrov
dc1d92855d
KT-16438 Strange dispatch receiver for descriptors of delegated members
...
Provide proper dispatch receiver parameter for delegated members.
Use dispatch receiver parameter for delegated members in IR generation
for delegated member body (and check that the receiver has corresponding type).
2017-03-02 14:25:58 +03:00
Dmitry Petrov
c92f118e5e
Refactoring: introduce CopyBuilder for CallableMemberDescriptor and PropertyDescriptor.
...
Allow providing new dispatchReceiverParameter via CopyBuilder
(required for proper dispatch receiver for delegates).
2017-03-02 14:25:58 +03:00
Dmitry Petrov
9baaf607a3
KT-16566 Support destructuring declarations for lambda parameter in psi2ir
2017-03-02 14:25:58 +03:00
Dmitry Petrov
c226707a80
KT-16554 Local function with default arguments have no IR elements for them
2017-03-02 14:25:58 +03:00
Igor Chevdar
ab3681e164
Package level delegated properties have no dispatch receiver.
2017-03-02 12:33:01 +03:00
Igor Chevdar
3ef612f05a
Added dispatch receiver to delegation implementing property
2017-03-02 12:33:01 +03:00
Simon Ogorodnik
6dd75f697a
Fix Show implementation to show inheritance through type-aliases
...
Show implementation(Ctrl-Hover) now should show classes which inherit such class through type-alias
#KT-15200 fixed
2017-03-01 23:05:19 +03:00
Yan Zhulanow
593fbadc98
Force using the 'kotlin-stdlib-jre7' artifact when configuring Android modules with JDK >= 1.8 as Dex can't process our 'kotlin-stdlib-jre8' artifact.
...
This fixes KT-16530: Configure Kotlin in Project inserts dependency to kotlin-stdlib-jre8 in Android projects.
2017-03-01 18:50:22 +03:00
Yan Zhulanow
060095d39f
Remove kotlin-annotation-processing artifact from the serialized compiler options. It is unused in kapt3 (or if no annotation processor dependencies are provided) but is still imported into the IDEA module files. This leads to compilation error due to the plugin incompatibility.
...
Incompatibility reason: kotlin-annotation-processing has references to the shaded intellij-core, so, being provided to the unshaded kotlinc from the Kotlin plugin, it throws the AbstractMethodError.
This fixes #KT-16184.
2017-03-01 18:50:22 +03:00
Kirill Rakhman
2506bb6673
Inspection checking that destructuring variable name matches the name of different component #KT-12004 Fixed
2017-03-01 18:24:48 +03:00
Dmitry Jemerov
af7de9a0c5
Warn when running the compiler under Java 6 or 7
...
(cherry picked from commit 5537800)
(cherry picked from commit 5614874)
2017-03-01 16:21:57 +01:00
Simon Ogorodnik
000da2f6d0
Fix of <ERROR CLASS>-es pointing to public TypeAliases
2017-03-01 16:09:24 +01:00
Dmitry Jemerov
78b4cbdb69
Don't generate documentation for option that doesn't work in Gradle
2017-03-01 16:09:23 +01:00