Commit Graph

41127 Commits

Author SHA1 Message Date
Alexey Andreev 445a80c755 Support new JS inline function format in multi-module projects 2017-09-04 15:33:03 +03:00
Alexey Andreev 7c421b0b83 Refactor JS translator to generate code for new inliner 2017-09-04 15:33:03 +03:00
Nicolay Mitropolsky 29857e48c8 KtLightAnnotationTest fix for oddly broken annotations getter 2017-09-04 15:20:20 +03:00
Nicolay Mitropolsky be4b86e3d9 KtLightAnnotationForSourceEntry fix for smart-pointers creating
`LightElementValue` made PsiCompiledElement to make it properly anchorable when creating smartpointers, when still use `kotlinOrigin.containingFile` for it to be able to `registerProblem` on such elements. (refs KT-18054)
2017-09-04 15:20:20 +03:00
Dmitry Jemerov b0fb3370e3 Correctly get qualified name for properties without backing field
#KT-19903
2017-09-04 13:21:03 +02:00
Dmitry Jemerov cc6bfcfc7c Attach super line marker to name identifier
#KT-19843 Fixed
2017-09-04 13:21:03 +02:00
Dmitry Jemerov f008736ef7 Fix package name convention pattern
#KT-19927 Fixed
2017-09-04 13:21:03 +02:00
Dmitry Jemerov f709bd869a Accept invalid patterns in naming convention settings
#KT-19926 Fixed
2017-09-04 13:21:03 +02:00
Dmitry Jemerov f74416a151 Cache the result of hasTopLevelCallables() for a KtFile
#KT-19885 Fixed
2017-09-04 13:21:03 +02:00
Dmitry Jemerov 839f197a1e KtFile: J2K and cleanup 2017-09-04 13:21:03 +02:00
Dmitry Jemerov ebef2dc0cf KtFile: rename to .kt 2017-09-04 13:21:03 +02:00
dzieciolowski 80f1a1bde8 Update gradle.xml - remove typo (#1279) 2017-09-04 13:11:24 +02:00
Alexander Udalov 840fce520c Update KotlinVersion.CURRENT to 1.1.50 2017-09-04 13:09:52 +03:00
Dmitry Jemerov 2d10df1541 Fix red code: mark dependency as exported 2017-09-01 16:59:03 +02:00
Dmitry Jemerov 81d0445775 Fix master-171 build: don't use API introduced in newer IDEA 2017-09-01 16:54:24 +02:00
Dmitry Jemerov ad37626af3 Fix compilation of KotlinBytecodeToolWindow 2017-09-01 16:41:26 +02:00
Dmitry Jemerov 59976baac2 Fix path to generated test 2017-09-01 15:27:44 +02:00
Dmitry Petrov 76acd23bd7 Revert "Fix synthetic accessor generation for properties"
This reverts commit 2427b2c
2017-09-01 16:09:29 +03:00
Dmitry Jemerov db840a73a9 Set scope of all plugin module dependencies to provided 2017-09-01 14:06:39 +02:00
Alexander Udalov 05290c3ed2 Fix AssertionError on incompatible scopes with impl typealias
This has been introduced in 9ecd04f628
2017-09-01 14:47:29 +03:00
Pavel V. Talanov f695ff96e8 IDEKotlinBinaryClassCache: store soft reference in UserData
Storing hard reference leads to binary headers being stored indefinitely
2017-09-01 14:30:27 +03:00
Dmitry Jemerov 0fa4e1cbaf Set scope of plugin dependencies to provided 2017-09-01 13:11:39 +02:00
Vyacheslav Gerasimov 5220dfc0ad Android: Add inspection & quickfix to convert findViewById to api 26
#KT-19940 Fixed Target Version 1.1.5
2017-09-01 13:32:52 +03:00
Vyacheslav Gerasimov be900a76d8 Android Lint: check for array initializer in SuppressLint 2017-09-01 13:32:08 +03:00
Vyacheslav Gerasimov f4da6c2cc6 UAST: findAttributeValue returns default value when no declared value found 2017-09-01 13:32:00 +03:00
Vyacheslav Gerasimov 56a075eab6 UAST: Fix annotation arguments processing
multiple unnamed arguments represented as value named expression with array initializer
 call kind for array in annotation argument should be "array initializer" instead of "method call"

 #KT-16600 Fixed Target Versions 1.1.5
2017-09-01 13:31:50 +03:00
Dmitry Jemerov e0bf438195 Move .xml files back to main idea module 2017-09-01 11:57:37 +02:00
Dmitry Jemerov 895d5fda46 Extract parts of plugin that depend on Java-only plugins to idea-jvn 2017-09-01 11:57:37 +02:00
Dmitry Jemerov 8b0d606ab5 Move Android .xml file to idea-android module 2017-09-01 11:57:37 +02:00
Dmitry Jemerov 9eace7b295 Move Gradle tests to idea-gradle module; remove idea dep on idea-gradle 2017-09-01 11:57:37 +02:00
Dmitry Jemerov d2972314bc Remove duplicate version detection code from AddKotlinLibQuickFix 2017-09-01 11:57:37 +02:00
Dmitry Jemerov 92103ff393 Add tests for "add kotlin-reflect.jar" quickfix 2017-09-01 11:57:37 +02:00
Dmitry Jemerov feeacda12b Extract logic of adding a dependency to KotlinProjectConfigurator 2017-09-01 11:57:37 +02:00
Dmitry Jemerov f5cea51d21 idea no longer depends on idea-maven 2017-09-01 11:57:37 +02:00
Dmitry Jemerov bf639b1272 Move logic of EnableUnsupportedFeatureFix into KotlinProjectConfigurator 2017-09-01 11:57:37 +02:00
Dmitry Jemerov 6fbb370eae Move coroutine state update logic to KotlinProjectConfigurator 2017-09-01 11:57:37 +02:00
Dmitry Jemerov e781b70170 Remove unnecessary dependency 2017-09-01 11:57:37 +02:00
Dmitry Jemerov 6f9869ae11 Remove unnecessary dependency 2017-09-01 11:57:37 +02:00
Dmitry Jemerov d8b6bd5cb3 Decouple idea-analysis from Android
Introduce API for extending syntax highlighting; use it in android
component
2017-09-01 11:57:37 +02:00
Dmitry Jemerov 982461e207 Remove unnecessary dependencies 2017-09-01 11:57:37 +02:00
Dmitry Petrov 5d44e095c8 Nullability assertions for extension receiver
In Kotlin 1.1 and before, there were no nullability assertions on
extension receivers, because receiver is resolved with NO_EXPECTED_TYPE.
So, if an expression of platform type is passed as an extension receiver
to a non-private function, it would fail with IllegalArgumentException.
However, if the function is private, then we generated no parameter
assertions under assumption that such function can be called from Kotlin
only, and all arguments are checked on the call site. Thus 'null' could
propagate indefinitely.

In Kotlin 1.2, we do the following:
- Generate nullability assertions for expression receivers.
NB nullability assertions are stored for ReceiverValue instances, not
for expressions: given expression can act as receiver in different
calls, each with an expected receiver type of its own.
- Generate nullability assertions for extension receivers of private
operator functions.
NB it still can throw NPE for some particular "optimized" cases, but at
least those nulls would not propagate indefinitely.

This behavior is disabled by an "advanced" command-line option
'-Xno-receiver-assertions'.
2017-09-01 09:49:21 +03:00
Dmitry Petrov 2427b2cc6c Fix synthetic accessor generation for properties
Generate synthetic accessors for property accessors only if the
corresponding methods are accessible in the current context.

 #KT-19306 Fixed Target versions 1.1.5
2017-09-01 09:48:26 +03:00
Mikhail Zarechenskiy dde0efd8ab Refactoring: extract anonymous objects to classes, rename variable 2017-09-01 02:24:35 +03:00
Mikhail Zarechenskiy f5222600d8 Improve diagnostics for fake calls when type inference failed
#KT-13665 Fixed
2017-09-01 02:05:58 +03:00
Mikhail Zarechenskiy 17b4874c37 Refactor FakeCallResolver, make error reporting simpler 2017-09-01 02:05:50 +03:00
Sergey Igushkin ff1c5ad793 Merge pull request #1260 from JetBrains/kotlinx.serialization.patches/gradle
Support for gradle subplugins in Kotlin2JS compilation
2017-09-01 01:03:37 +03:00
Leonid Startsev a0ddef22ef Extension points for serialization plugin in JS translator:
* Plugins for JS CLI compiler now can be loaded via -XPlugin option
* New extension point in project
* JS translator modified to accept synthetic declarations and call
 extension.
* Some functions made public to create a small API
2017-09-01 00:50:46 +03:00
Toshiaki Kameyama 0246b82833 @deprecated with multi-line message in Javadoc converted to @Deprecated("long ugly string") #KT-19644 Fixed (#1253) 2017-08-31 14:15:15 +02:00
Denis Zharkov 4e4bf31016 Fix loading JSR-305 nicknames for @CheckForNull annotation
For sake of working without jsr305.jar in the classpath `resolveTypeQualifierAnnotation`
may return javax.annotation.CheckForNull (although the latter is nickname itself)

 #KT-19985 Fixed
2017-08-31 15:13:26 +03:00
Denis Zharkov ed79891ee6 Fix type mapping for parameter of Collection<Int>::remove override
In the case the single parameter of override has `Integer` type instead
of `int` type (while in common case it would be just `int`)

See the comment inside forceSingleValueParameterBoxing for clarification

 #KT-19892 Fixed
2017-08-31 12:38:08 +03:00