Commit Graph

56411 Commits

Author SHA1 Message Date
Ilya Kirillov e795e4b73d New J2K: add conversion of binary literals & fix conversion of octal ones
#KT-32835 fixed
2019-07-25 14:34:36 +03:00
Ilya Kirillov 72a09ab59b New J2K: correctly convert number literals with underscores
#KT-32837 fixed
2019-07-25 14:34:35 +03:00
Ilya Kirillov 4ead820395 New J2K: correctly print comments for qualified expression 2019-07-25 14:34:35 +03:00
Ilya Kirillov 2bd5a1f196 New J2K: separate nullability inference from common one & nullability bug fixes
It will be needed for structure mutability inference

#KT-21467 fixed
#KT-32609 fixed
#KT-32572 fixed
#KT-24677 fixed
2019-07-25 14:34:35 +03:00
Ilya Kirillov d7960caf89 New J2K: move all symbols definitions to symbols package 2019-07-25 14:34:35 +03:00
Ilya Kirillov f79b282c60 New J2K: add better support of implicit functional interfaces
#KT-32702 fixed
#KT-19327 fixed
2019-07-25 14:34:34 +03:00
Ilya Kirillov 96ca4712a0 New J2K: consider in-context declarations while performing conversion on copy-paste plain text conversion
#KT-32602 fixed
2019-07-25 14:34:34 +03:00
Ilya Kirillov c865d74965 New J2K: remove unused dependencies from nj2k modules 2019-07-25 14:34:34 +03:00
Ilya Kirillov 1bbdd0bf15 New J2K: remove unused classes 2019-07-25 14:34:34 +03:00
Ilya Kirillov 6e04b1549c New J2K: remove JKVisitor with type parameters 2019-07-25 14:34:33 +03:00
Leonid Startsev 9c8905ccb6 Patch serializable class with addtional annotation
(which contains actual serializer) to make use of it with @AssociatedObjectKey
2019-07-25 14:07:22 +03:00
Leonid Startsev 3896992b12 Fixes for IR serialization plugin
- Do not insert typeParameters into IrConstructor;
- Set correct property symbol to IrField;

- Use upper bound as a class descriptor for type parameters.
This will allow to get upper bound's KClass in polymorphic serialization.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/490;

- Lazily add all serializer functions.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/502;

- Don't generate constructor invocation for abstract(sealed) classes deserializer.
Such code is incorrect anyway (you can't create an instance of abstract class) and causes problems in devirtualization when exporting Native libraries.
2019-07-25 14:07:24 +03:00
Leonid Startsev 6494227c64 Change order in SerializableProperties initialization logic
in that way so binding context would be checked only after resolve is triggered (via .getContributed descriptors).
Empty binding context led to some subtle bugs.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/508
2019-07-25 14:07:22 +03:00
Leonid Startsev 822b4556e3 Rewrite IDE check whether serialization plugin is enabled
In a such way so it wouldn't check for actual JAR file and wouldn't touch filesystem.
Fixes KT-32346
2019-07-25 14:07:22 +03:00
Mikhail Glukhikh 2381aa330a FIR: fix delegate expression consistency tests 2019-07-25 09:46:46 +03:00
Mikhail Glukhikh d32e5065c5 FIR: implementation of delegateProvider in delegate resolve 2019-07-25 09:46:42 +03:00
Mikhail Glukhikh 213f951da3 FIR: partial implementation of delegate resolve #KT-32217 Fixed 2019-07-25 09:46:34 +03:00
Mikhail Glukhikh 63b7fa70f9 FIR2IR: add extension receiver parameters to functions 2019-07-25 09:46:29 +03:00
Ivan Gavrilovic be3fe9495c Report non-incremental annotation processors correctly
This commit fixes an issue when all APs would be reported as non-incremental,
even if only a single one is non-incremental. Now, additional declared type
is added that is used to denote processors that are incremental, but have
been forced to run non-incrementally in presence of non-incremental APs.

This means that only APs that do not support incremental annotation processing,
or APs that are dynamic and are non-incremental at runtime will be reported.
2019-07-25 04:57:26 +09:00
Ivan Gavrilovic ad352355de KT-23880: Enable incremental APT mode with KAPT by default
The feature has been present since 1.3.30 behind a flag. This
commit enables it by default.
2019-07-25 04:57:26 +09:00
Ivan Gavrilovic a108af76d6 Mark property as output instead of local state when needed
Kapt task incremental annotation processing cache directory
was using @LocalState annotation that was added in Gradle 4.3.
However, minimum supported version is 4.2, so this commit registers
this directory as output of a task for pre 4.3 versions. This is safe
as caching is enabled only for Gradle 4.3+.

Test: verified manually
2019-07-25 04:57:26 +09:00
Ivan Gavrilovic 5a2ff86691 Handle classpath snapshot changes better
Because Kapt Gradle task uses PathSensitivity.NONE for the input representing
the classpath structure, there are cases when paths of the files may change,
but because content is the same, there will be no incremental changes.

Classpath snapshot comparison did not handle this case correctly, but this
commit fixes that. In more details:
- classpath entries with the same path and that are not reported as changed
will have their information loaded from the previous snapshot
- any other entry (changed path or changed content) will be reloaded

Test: ClasspathSnapshotTest
2019-07-25 04:57:26 +09:00
Georgy Bronnikov f66b475867 Create wrapped receiver descriptors where needed 2019-07-24 20:25:47 +03:00
Roman Artemev 46b98a1e98 [JS BE] Make sourceMap generation more precise
- Don't produce mapping for closing bracket in case of expressionBody
 - Map Kt*Function declaration into corresponding js fun declaration
 - Update test data & add new test
2019-07-24 18:56:40 +03:00
Kirill Shmakov 12a1b0296b Clean up useless code 2019-07-24 18:25:11 +03:00
Nikolay Krasko d3bc2ec855 Remove internal jdk to fix flaky MavenUpdateConfigurationQuickFixTest 2019-07-24 17:28:01 +03:00
Nikolay Krasko 6176373713 Test data update for JavaWithGroovyInvoke since 183 2019-07-24 17:28:01 +03:00
Nicolay Mitropolsky 5f9660cd33 KtLightParameter introduced as interface 2019-07-24 10:11:45 +03:00
Nicolay Mitropolsky 50158e508a org.jetbrains.kotlin.asJava.elements.LightParameter converted to Kotlin
to avoid clashes in `getMethod` with `KtLightParameter`
2019-07-24 10:11:44 +03:00
Nicolay Mitropolsky 7dcd3849e0 org.jetbrains.kotlin.asJava.elements.LightParameter converted to Kotlin: Rename .java to .kt 2019-07-24 10:11:44 +03:00
Nicolay Mitropolsky 8982a49dcb renaming KtLightParameter to KtLightParameterImpl 2019-07-24 10:11:44 +03:00
Anton Yalyshev 4a20a440a7 Cleanup: remove redundant semicolon 2019-07-24 07:41:58 +03:00
Anton Yalyshev 6d53151256 Add statistics (FUS) collector for IDE Settings. At the moment - New Inference only. 2019-07-24 07:41:58 +03:00
Ilmir Usmanov 56b6b957d1 Generate line numbers for RHS of elvis expression if both LHS and RHS
are at the same line.
 #KT-32689 Fixed
2019-07-23 18:00:44 +03:00
Alexander Udalov 1f36f60f43 JVM IR: remove CrIrType, use class container in callable reference lowerings
This is possible now because after 3a9b94235f, 0423d0f41e and
5341de253f, all top level functions/properties in sources and in
binaries have a corresponding containing facade class
2019-07-23 16:39:38 +02:00
Igor Chevdar a048a11074 Enabled/disabled some tests for K/N 2019-07-23 19:16:46 +05:00
Igor Chevdar c4da5cb95c [IR] Added IrType.isKSuspendFunction() 2019-07-23 19:16:46 +05:00
Dmitriy Dolovov e398804663 Show the actual Kotlin version in error message in nativeLibrariesUtil.kt 2019-07-23 20:54:39 +07:00
Dmitry Gridin 4e2989e884 CreateExpectActualFix: fix package for files with root package from non-root directory
#KT-28746 Fixed
2019-07-23 16:24:43 +03:00
Dmitry Gridin c76ca988eb KotlinCreateTestIntention: disallow intention for expect classes
#KT-26242 Fixed
2019-07-23 16:24:16 +03:00
Dmitry Gridin 311cfc3806 UnimplementedKotlinInterfaceMemberAnnotator: shouldn't report methods with @JvmStatic
#KT-27208 Fixed
2019-07-23 16:23:04 +03:00
Dmitry Gridin cf07585b11 UnimplementedKotlinInterfaceMemberAnnotator: cleanup code 2019-07-23 16:23:03 +03:00
Andrey Uskov ad1b795a69 Disable KaptImportingTest in IDEA 183 and below 2019-07-23 11:43:36 +03:00
Andrey Uskov 6e10126c6f Fix matching file paths under Windows in NewMultiplatformKaptProjectImportingTest 2019-07-23 11:43:16 +03:00
Toshiaki Kameyama 22c5e208a6 ReplaceGuardClause inspection: do not report when 'if' expression is used as expression 2019-07-22 20:49:20 +03:00
Toshiaki Kameyama a6690e4e35 ReplaceGuardClause inspection: do not remove 'else' branch
#KT-32797 Fixed
2019-07-22 20:49:20 +03:00
Toshiaki Kameyama a3a3c52c24 ReplaceGuardClause inspection: fix highlight range 2019-07-22 20:49:20 +03:00
Alexander Udalov 35e4295e16 IR: deduplicate code in DeepCopyWithWrappedDescriptors/DeepCopyIrTreeWithDescriptors 2019-07-22 19:47:25 +02:00
Alexander Udalov 96efae2b48 IR: fix endless recursion in IrTypeSystemContext.isMarkedNullable 2019-07-22 19:47:25 +02:00
Nikolay Krasko 72fdb47f13 Fix maven import tests by adding java-ide-customization dependency [KT-32833]
Need java-ide-customization because of JavaAwareModuleTypeManagerImpl
registration. Otherwise there were two instances of JavaModuleType that
were not equal and that prevented facets creating after Maven project
importing.

 #KT-32833 Fixed
2019-07-22 19:13:51 +03:00