Commit Graph

44106 Commits

Author SHA1 Message Date
Yan Zhulanow bdd7ab3a09 Kapt: Mute Java 9 tests temporarily on Windows 2018-02-08 19:36:37 +03:00
Yan Zhulanow 03a20384ef Uast: Fix an exception while converting type alias KotlinType to PsiType (KT-21874) 2018-02-08 19:36:37 +03:00
Yan Zhulanow 1cc4744345 Kapt: Map URLs to absolute file paths properly, also add some logging 2018-02-08 19:36:37 +03:00
Ilmir Usmanov 87bbac9d43 Take coroutineContext into account in RedundantSuspendModifierInspection
#KT-22651: Fixed
2018-02-08 19:34:20 +03:00
Alexander Udalov e19ed1e001 Add test on experimental const val in annotation argument
This test checks that a usage inside an annotation argument is a
signature usage, which may be too restricting but easier to support at
the moment (and the restriction can be lifted in the future)
2018-02-08 17:08:34 +01:00
Alexander Udalov a4af9dd5d1 Always consider container's experimentality in ExperimentalUsageChecker
This results in more diagnostics usually, but allows library authors to
avoid annotating everything in each experimental class with the marker
(only the class needs to be annotated now)

 #KT-22759
2018-02-08 17:08:34 +01:00
Alexander Udalov 7123202670 Add getExtensionOrNull utility for protobuf messages 2018-02-08 17:08:33 +01:00
Alexander Udalov 65a6171782 Add test on Experimental in scripts 2018-02-08 17:08:33 +01:00
Alexander Udalov 21e2a3c0b4 Load module annotations in IDE
#KT-22759 Fixed
2018-02-08 17:08:33 +01:00
Alexander Udalov 890374a42a Load module annotations for JVM and JS modules in compiler
#KT-22759 In Progress
2018-02-08 17:08:33 +01:00
Alexander Udalov 396a5ab352 JS: write/read module annotation FQ names to/from metadata
#KT-22759 In Progress
2018-02-08 17:07:23 +01:00
Alexander Udalov ff33e0bad3 Write/read module annotation FQ names to/from metadata on JVM
#KT-22759 In Progress
2018-02-08 17:07:23 +01:00
Alexander Udalov b4ac852392 Add packageProto/nameResolver to JvmPackagePartSource
May be useful for loading platform-specific protobuf extensions (such as
package_module_name on JVM) when analyzing deserialized top level
members
2018-02-08 17:07:22 +01:00
Alexander Udalov ec6b49b8b8 Check experimental API markers for deprecation
#KT-22759 In Progress
2018-02-08 17:07:22 +01:00
Alexander Udalov 5e78adb501 Support -Xexperimental/-Xuse-experimental in ExperimentalUsageChecker
#KT-22759 In Progress
2018-02-08 17:07:22 +01:00
Alexander Udalov 77625831f7 Support -Xexperimental and -Xuse-experimental, validate their values
#KT-22759 In Progress
2018-02-08 17:07:22 +01:00
Alexander Udalov 153c86c069 Report diagnostic on overrides of experimental members
Unless they're experimental themselves

 #KT-22759 In Progress
2018-02-08 17:07:22 +01:00
Alexander Udalov 29c35e6686 Do not require experimental propagation for body usages in same module
Unless it's a usage inside the body of an effectively public inline
function

 #KT-22759 In Progress
2018-02-08 17:07:22 +01:00
Alexander Udalov 6d4e8f3781 Add some validation for Experimental/UseExperimental usages
#KT-22759 In Progress
2018-02-08 17:07:22 +01:00
Alexander Udalov 0bf0a315ed Introduce Experimental and UseExperimental annotations
#KT-22759 In Progress
2018-02-08 17:07:21 +01:00
Simon Ogorodnik 366f630236 Fix J2K ObjectLiteral.testMyFrame by updating incorrect testData 2018-02-08 19:01:13 +03:00
Mikaël Peltier 126afbb8ac Avoid to generate unecessary checkcast
StackValue already avoid to generate checkcast from a type or an
 array to java.lang.Object. Add a new case to avoid to generate a
 checkcast from an array to an array of java.lang.Object when arrays
 have the same dimensions.

 #KT-22714 Fixed
2018-02-08 16:38:46 +01:00
Denis Zharkov 9a9452f73a Add @RequireKotlin(1.2.30) for kotlin.suspend
#KT-22562 Fixed
2018-02-08 17:47:37 +03:00
Alexander Udalov b6a55f74f4 Support patch versions in RequireKotlin with kind=COMPILER_VERSION 2018-02-08 17:47:37 +03:00
Denis Zharkov 72222c718a Highlight callees resolved to kotlin.suspend as a keywords
#KT-22562 In Progress
2018-02-08 17:47:37 +03:00
Denis Zharkov 99c7d8d4d5 Add call checks related to suspend lambda modifier's introduction
- Prohibit non-modifier-like calls on kotlin.suspend
- Add warning on modifier-like calls to anything but kotlin.suspend

 #KT-22766 In Progress
 #KT-22562 In Progress
2018-02-08 17:47:37 +03:00
Denis Zharkov ef01f641f3 Imitate support for suspend modifier on parameterless lambdas
#KT-22766 In Progress
2018-02-08 17:47:37 +03:00
Denis Zharkov 5c81d9fd6b Minor. Make function private 2018-02-08 17:47:37 +03:00
Denis Zharkov 342a532416 Minor. Inline parameters 2018-02-08 17:47:37 +03:00
Pavel V. Talanov 229184dd78 Dsl line marker: provide simple tooltip
Test dsl line marker
2018-02-08 15:36:42 +01:00
Pavel V. Talanov 519ea12bb2 Test, dsl highlighter: test custom highlighting applied to calls 2018-02-08 15:36:41 +01:00
Mikhail Glukhikh d554a4234d Redundant object type check: fix problem highlighting #KT-22484 Fixed 2018-02-08 17:10:44 +03:00
Mikhail Glukhikh 901ae087bc Redundant object type check: use referential equality, forbid for when
So #KT-22538 Fixed
2018-02-08 17:10:43 +03:00
Mikhail Glukhikh fbe6929903 Reformat: RedundantObjectTypeCheckInspection 2018-02-08 17:10:41 +03:00
Mikhail Glukhikh c715387773 Reformat & cleanup: KotlinGradleSourceSetDataService 2018-02-08 17:10:40 +03:00
Mikhail Glukhikh 198b054a6f Detect library kind in Gradle if name looks like non-JVM
Related to KT-20971
2018-02-08 17:10:39 +03:00
Mikhail Glukhikh dcbb29e947 Search for source of platform binary also in common sources
So #KT-20971 Fixed
2018-02-08 17:10:37 +03:00
Mikhail Glukhikh 76976f7e52 SourceNavigationHelper: reformat + style fix 2018-02-08 17:10:36 +03:00
Alexander Udalov 80a7f92309 Extract logic to get function parameters for default value generation
For some reason, this logic was a bit different in JVM (FunctionCodegen)
and JS (FunctionBodyTranslator). For example, in JS the
EXPECTED_FUNCTION_SOURCE_WITH_DEFAULT_ARGUMENTS_NOT_FOUND diagnostic was
reported even in the case when no expected function was found for the
actual function at all, which made it quite difficult to write
multiplatform sources for JS stdlib where it both should be compiled as
a part of the multiplatform project, and by itself (suppressing
NO_ACTUAL_FOR_EXPECT): in the latter case, the new error must have been
suppressed everywhere as well

 #KT-21913
2018-02-08 14:14:10 +01:00
Alexander Udalov 97314d010d Serialize default argument values presence for actual declarations correctly
When default argument value was present in the expected declaration, we
did not correctly serialize that fact to the metadata for the actual
declaration (`declaresDefaultValue` was used). Therefore, it was
impossible to use that actual declaration without passing all parameter
values in another module, where it was seen as a deserialized descriptor

 #KT-21913
2018-02-08 14:11:57 +01:00
Alexander Udalov 22595acbfd Fix AssertionError on overloading function with property in actual class
#KT-22352 Fixed
2018-02-08 14:11:56 +01:00
Alexander Udalov 56be83cdd3 Improve fake override construction for expected classes
Fake overrides for abstract members from expected classes should become
non-abstract (final, in fact) in non-abstract expected subclasses

 #KT-22031 Fixed
2018-02-08 14:11:55 +01:00
Denis Zharkov 88a23c73c7 Ignore @Nullable annotation for vararg parameter
See the comment in code for clarification

 #KT-19786 Fixed
2018-02-08 13:36:10 +03:00
Denis Zharkov cfd612e2c1 Minor. Reformat signatureEnhancement.kt 2018-02-08 13:36:10 +03:00
Mikhail Glukhikh 8edf8b9e4d MemberInfoUtils: when no facade is available, use resolutionApi methods 2018-02-08 13:03:41 +03:00
Mikhail Glukhikh 8b8cb0abba KotlinRunConfigurationProducer: get rid of resolve via facade 2018-02-08 13:03:40 +03:00
Denis Zharkov 2ad93a0330 Use extension registry when unpacking serialized type alias
It's funny here that "extension" here means protobuf extensions
while initial issue is about extension function types

 #Fixed KT-22728
2018-02-08 12:39:26 +03:00
Denis Zharkov fbef21bf17 Remove setting usePreciseJavaTracking in gradle.properties
It's already true by default since 9b28d1a21c
2018-02-08 12:38:19 +03:00
Alexander Udalov bb013ec2bf Update bootstrap to 1.2.40-dev-165 2018-02-08 10:15:30 +01:00
Mikhael Bogdanov 0954d1ab1b Don't generate hash in sam wrapper class name
#KT-17091 Fixed
2018-02-08 10:11:48 +01:00