Commit Graph

47233 Commits

Author SHA1 Message Date
Alexander Udalov dcbb8045bd Disallow function types with big arity on JVM if LV < 1.3 or API < 1.3
The implementation is a bit obscure because this worked on JS since
Kotlin 1.0 and we should not break that; however, on JVM, a diagnostic
will be reported with old language/API version

 #KT-25241 Fixed
2018-07-16 10:41:27 +02:00
Alexander Udalov 56f509ba09 Support function types with >= 23 parameters
See https://github.com/Kotlin/KEEP/issues/107

 #KT-13764 Fixed
2018-07-16 10:41:27 +02:00
Max Medvedev 5c8afea68e Completion fallback to DescriptorToSourceUtilsIde.getAnyDeclaration
That's in case if DescriptorToSourceUtils.getSourceFromDescriptor fails

#KT-22373 Fixed
2018-07-14 15:17:03 +03:00
Zalim Bashorov 74df1208ae Make "localClassCaptureExtensionReceiver" test more robust and mute it for JS IR BE 2018-07-13 23:42:41 +03:00
Zalim Bashorov 3f0b31dc23 Speed up JS IR BE tests compiling the common parts (runtime + test common utils) once (on demand) and sharing the result between tests
It's a temporary hack until we implement IR based library format.
It relies on the fact that currently, IR BE generates stable (enough) names.​
2018-07-13 23:42:41 +03:00
Zalim Bashorov 34758110ee JS IR test runner: collect all .kt files from the "irRuntime" dir automatically instead of declaring each one in the list 2018-07-13 23:42:40 +03:00
Nikolay Krasko dfcc41ebb0 Fix source position NPE (EA-118863) 2018-07-13 20:00:05 +03:00
Nikolay Krasko f1c87376b9 Another NPE in PlainTextPasteImportResolver.kt (EA-91517) 2018-07-13 20:00:05 +03:00
Nikolay Krasko 5e35fd1758 Check created javaFileFacadeFqName short name (EA-122324) 2018-07-13 20:00:05 +03:00
Nikolay Krasko 819f6c036b Add '//' char to identifier validity check 2018-07-13 20:00:05 +03:00
Nikolay Krasko ee5d357336 Guard PatternConfigurationProducer usages with JUnit presence check (EA-122472) 2018-07-13 20:00:04 +03:00
Nikolay Krasko 752cdedfe2 Stop reporting "using default platform" messages to log (KT-15300)
#KT-15300 Fixed
2018-07-13 20:00:04 +03:00
Alexander Udalov dec003af71 Minor, improve wording in exception message 2018-07-13 18:45:44 +02:00
Alexander Udalov 66b383349f Fix regression in reflection on looking up equals/hashCode/toString in interface
Caused by 4266e50be8 and 8ccbbf71ec. Previously it worked because we
used hardcoded signatures of equals/hashCode/toString and always looked
them up in java.lang.Object

 #KT-25404 Fixed
2018-07-13 18:45:44 +02:00
Alexander Udalov 1f4dfbf5f3 Fix compilation of Java 9 sources for kotlin-reflect-api
Do not pass the jars for modules such as descriptors, descriptors.jvm,
etc to `--module-path` because javac assumes that these are separate
modules (even though they're listed later as parts of this module in
`--patch-module), and prohibits to have split packages and foreign
service implementations among them
2018-07-13 18:45:09 +02:00
Alexander Udalov 0d03d5abf6 Regenerate tests 2018-07-13 18:40:31 +02:00
Denis Zharkov 89d99e3989 Refine diagnostics for nullability migration warnings
#KT-24911 Fixed
2018-07-13 17:51:21 +03:00
Georgy Bronnikov f85030b1e6 Remove a file added by mistake 2018-07-13 16:16:39 +03:00
Mikhail Zarechenskiy 820d168607 First, check for inline class type before boxing
The problem was that if `type` is of primitive type, but `KotlinType` is
 actually an inline class type, then anyway we boxed this type as primitive
2018-07-13 15:48:21 +03:00
Nicolay Mitropolsky 3c71761cf3 lightAnnotations: check element validity before resolving call 2018-07-13 15:46:44 +03:00
Nicolay Mitropolsky cedc6821c3 lightAnnotations: proper parents for KtLightAnnotationsValues 2018-07-13 15:45:30 +03:00
Georgy Bronnikov 8478c73434 Make @JvmStatic work on JVM_IR 2018-07-13 13:43:02 +03:00
Toshiaki Kameyama 2547612d54 Implement Smart Enter handler for value argument list (KT-18807)
#KT-18807 Fixed
2018-07-13 13:04:19 +03:00
Natalia Selezneva 25cc85241f 172: Fix absent method in 172 branch 2018-07-13 12:02:08 +03:00
Natalia Selezneva 68ffcdc653 182: Fix imports in 182 branch 2018-07-13 11:33:10 +03:00
Natalia Selezneva 6835e5dd6f Wraps syncPublisher() call in KotlinCompilerSettings in a dispose check
Fix ConfigureKotlinTest
2018-07-13 09:50:42 +03:00
Mikhail Zarechenskiy ef2095e4d3 Mute tests about unsigned types for JS backend 2018-07-13 00:27:12 +03:00
Yan Zhulanow a464cc7f28 Minor: Do not report stack traces about PCE to the debug log 2018-07-12 20:36:42 +03:00
Yan Zhulanow 2070d40963 Minor: Move safeSourceName to utils, make it a function 2018-07-12 20:36:41 +03:00
Yan Zhulanow 423bd573a3 Kapt: Do not add imports for overloaded callables (#KT-25071) 2018-07-12 20:36:41 +03:00
Yan Zhulanow 00edc007f8 Minor: Fix the "Could not find installation home path" terminal warning 2018-07-12 20:36:41 +03:00
Yan Zhulanow f6afab1226 Minor: Remove an obsolete warning in Android subplugin 2018-07-12 20:36:41 +03:00
Yan Zhulanow 22cfde3d43 Debugger: Check if the class instance is not yet collected before usage (EA-118758) 2018-07-12 20:36:41 +03:00
Yan Zhulanow a2fdf7d47d Evaluator: Support when expressions (EA-119639) 2018-07-12 20:36:41 +03:00
Yan Zhulanow c749a222eb Debugger: Add a missing read action (EA-119592) 2018-07-12 20:36:41 +03:00
Yan Zhulanow 2203615085 Check if the stackFrame we use is valid (EA-120312)
Unfortunately, the 'isValid' is a private field in StackFrameImpl so we have to catch an exception with an empty catch block.
2018-07-12 20:36:41 +03:00
Yan Zhulanow cf3550b139 Add a number of runReadAction() in debugger (EA-120985) 2018-07-12 20:36:40 +03:00
Yan Zhulanow 115356b990 Eval4J: Do not report certain kinds of exceptions to EA 2018-07-12 20:36:40 +03:00
Yan Zhulanow d8bab58b2c Minor: Fix exception message 2018-07-12 20:36:40 +03:00
Yan Zhulanow d6db9e8f6f Evaluator: Do not report division by zero (EA-122365) 2018-07-12 20:36:40 +03:00
Yan Zhulanow f16da8c566 Debugger: Add a missing read action (EA-123238) 2018-07-12 20:36:40 +03:00
Yan Zhulanow 6392adcfc9 Kapt: Ensure we collect .java files from the unique directories (#KT-24963) 2018-07-12 20:36:40 +03:00
Yan Zhulanow 20299f6224 Pill: Allow '18x-SNAPSHOT' versions 2018-07-12 20:36:40 +03:00
Yan Zhulanow 778df36dfa Debugger: Exclude inline callable usages inside itself (EA-117459) 2018-07-12 20:36:39 +03:00
Yan Zhulanow 6e3c2e8015 Revert "Android Extensions: Allow to access library project resources in Gradle setup (#KT-22430)"
This reverts commit a70707b
2018-07-12 20:36:39 +03:00
Raluca Sauciuc e0137ed1d5 Android Extensions: make synthetic import resolution more resilient
In commit ec0abb0 (Fix EA-79206: Process only valid layout.xml...) we
started to drop layouts with invalid PsiFiles during resolution of
(synthetic) package fragments.

In Android Studio we run into invalid files quite often, and it seems
to be caused by a race with some invokeLater'ed code from android-ndk;
this has the side effect of now showing all the corresponding symbols
as unresolved, and the imports themselves are suggested for removal.

As a temporary fix I propose we try again to get a valid PsiFile.

Bug: https://issuetracker.google.com/78547457
(cherry picked from commit 3e8789225bd653caaedeca7f761a6442d48214b0)
2018-07-12 20:36:39 +03:00
Raluca Sauciuc e7c1f578d1 Recognize Instant Apps plugin
Tested with sample project and Studio 3.2 Canary 18:
https://github.com/googlesamples/android-instant-apps/tree/master/hello-kotlin

(cherry picked from commit 528d66d5840cc8f584270c516e85da1a632df8b8)
2018-07-12 20:36:39 +03:00
Yan Zhulanow 392460e426 Kapt: Allow to disable info->warning mapping in logger (#KT-24985) 2018-07-12 20:36:39 +03:00
Yan Zhulanow 8b3aa3dc7f as32: Kapt: 'kapt.kotlin.generated' is not marked as source root in Android Studio (#KT-24449) 2018-07-12 20:36:39 +03:00
Yan Zhulanow b2938ceacf Remove Gradle(Java) Kotlin configurator in Android modules (#KT-17946) 2018-07-12 20:36:39 +03:00