Commit Graph

56910 Commits

Author SHA1 Message Date
Alexey Tsvetkov 12c209d360 Do not compare output for IC with JS IR BE
Temporary measure until output could be updated incrementally
2019-08-15 15:11:52 +03:00
Alexey Tsvetkov 3366ac4b18 Save incremental data with KLIB compiler 2019-08-15 15:11:52 +03:00
Alexey Tsvetkov fc49510049 Add tests for IC with JS IR BE 2019-08-15 15:11:52 +03:00
Alexey Tsvetkov 9572800ef7 Add missing dependency 2019-08-15 15:11:52 +03:00
Stanislav Erokhin b5a407371c Update the year in LICENSE.txt 2019-08-15 13:31:09 +03:00
Mikhail Zarechenskiy d59b910403 Add tests for obsolete issues
#KT-32207 Obsolete
 #KT-32836 Obsolete
 #KT-32949 Obsolete
 #KT-9384 Obsolete
2019-08-15 13:01:39 +03:00
Mikhail Zarechenskiy 1969ad6e9d [NI] Take into account use-site variance for constraint from LHS of CR
#KT-32851 Fixed
2019-08-15 13:01:38 +03:00
Mikhail Zarechenskiy 0620762b97 Enable new inference explicitly for MPP tests with type refinement 2019-08-15 12:50:19 +03:00
Mikhail Zarechenskiy 735e1ecec1 Disable new inference for IDE analysis by default in releases 2019-08-15 12:50:09 +03:00
Mikhail Zarechenskiy 69942681a3 Refactoring: move versioning.kt file to idea-analysis module 2019-08-15 12:49:54 +03:00
Mikhail Zarechenskiy 50e7ff4097 Refactoring: move isSnapshot function closer to similar ones 2019-08-15 12:49:53 +03:00
Dmitry Gridin 2c0d6ab1a5 [Compatibility] Restore GradleBuildScriptManipulator.addKotlinLibraryToModuleBuildScript(scope, libraryDescriptor)
#KT-33336 Fixed
2019-08-15 15:54:12 +07:00
Abduqodiri Qurbonzoda 63895483fd Fix take method from iterating one extra element (KT-32024) 2019-08-15 01:01:36 +03:00
Abduqodiri Qurbonzoda 01a613dca4 Add tests for floating-point to integral conversion 2019-08-15 00:57:27 +03:00
Abduqodiri Qurbonzoda 432828a2db Clarify floating-point to integral conversion rounding behaviour 2019-08-15 00:57:27 +03:00
Igor Yakovlev fd5bf33861 Removed asserts for mirror files for java stubs on kt files
The behavior of this part of code is following:
1) We wrap the kotlin light class to the object that wraps the kt files into compiled (!) cls stub (notice, that most of the time it is a single file wrapper)
2) Platform wishes to get the mirror psi of this "compiled" stub work with text of it.
3) Platform request mirror element that asserted to be ok ONLY for multifiles stub.
4) It leads to EA-209577

There is no idea why so, but the exception is high-rated, so this assertion was deleted.

Fixed EA-209577
2019-08-14 20:12:55 +03:00
Vyacheslav Gerasimov 8cfdd140bb Upgrade plugin-repository-rest-client & use token auth
#KT-33338
2019-08-14 19:10:43 +03:00
Georgy Bronnikov 20351b7c1b IR: correct type for a null const argument 2019-08-14 18:26:09 +03:00
Roman Golyshev e915bc2a69 fix expected output for when statement in scratch files
- the behaviour changed due to KT-33127 fixing
2019-08-14 15:35:38 +03:00
Roman Golyshev 1a0edd37ef KT-31295: fix issue with NewKotlinScriptAction incorrect identity
- this problem leads to the duplication of the `New Kotlin Script` action in the drop-down menu
- ^KT-31295 Fixed
2019-08-14 15:35:38 +03:00
Dmitry Petrov 986654b709 psi2ir: fix unsubstituted type parameters around SAM conversions
Preserve type substitution:
- when obtaining function type for SAM type;
- when generating SAM conversions for SAM adapter arguments;
- for "original" method corresponding to a SAM adapter.
2019-08-14 14:18:42 +03:00
Alexander Udalov 6b208f7c9c JVM IR: support LanguageFeature.UseGetterNameForPropertyAnnotationsMethodOnJvm 2019-08-14 12:34:57 +02:00
Ivan Gavrilovic 0a26742501 Run KAPT non-incrementally if annotation processor classpath changes
Annotation processor classpath for a KAPT run is recorded, and the current
run is compared against the previous one. If those differ, KAPT should
run non-incrementally.

Test: KaptIncrementalWithIsolatingApt.testChangingAnnotationProcessorClasspath
2019-08-14 18:05:04 +09:00
Ivan Gavrilovic 2412b5f992 Delete output when unable to run KAPT incrementally
When comparing previous and current classpath snapshots, and it is not
possible to compute the types that changed, make sure to delete the outputs
before invoking KAPT.

Test: KaptIncrementalWithAggregatingApt.testIncompatibleClasspathChanges
2019-08-14 18:05:04 +09:00
Dmitry Petrov e4f9314f94 Use ISE instead of NPE in serialization 2019-08-14 11:16:11 +03:00
Dmitry Petrov a9c961931c JS_IR: Support 'CHECK_NOT_NULL' intrinsic 2019-08-14 11:16:11 +03:00
Dmitry Petrov 7d49b72b79 JVM_IR: Support 'CHECK_NOT_NULL' intrinsic
TODO: migrate to changes related to KT-22275
2019-08-14 11:16:10 +03:00
Dmitry Petrov 7170439517 IR: '!!' is generated as 'CHECK_NOT_NULL' intrinsic
```
fun <T : Any> CHECK_NOT_NULL(x: T?): x =
  if (x != null) x else throw NullPointerException(...)
```

This allows to compile both Kotlin/JVM and Kotlin/JS effectively.
2019-08-14 11:16:10 +03:00
Georgy Bronnikov b9db4148cc Check whether test is ignored before reporting failure 2019-08-13 19:37:11 +03:00
Vyacheslav Gerasimov 0089de7f7f Build: Workaround dependency cycle in kotlinCompilerPluginClasspath
When bootstrap version is less than from current version dependencies
of `kotlin-scripting-compiler-embeddable` are resolved into projects
which leads to circular dependencies

 #KT-33287
2019-08-13 18:03:04 +03:00
Mikhael Bogdanov 8ff081a596 Don't trigger 'testJvm6ServerRuntime' initialization during configuration phase 2019-08-13 16:35:58 +02:00
Ilya Chernikov 19ce279611 Fix script config saving to file attributes
also make reading from file attribute more robust
2019-08-13 15:40:09 +02:00
Ilya Matveev 949bb9d150 IR: Get rid of descriptors in tailrec calls collection
Issue #KT-33279 fixed
2019-08-13 19:56:46 +07:00
Ilya Matveev cafe2cdb12 IR: Fix fake-override resolution for fields
Earlier we used a result of a corresponding getter resolution to
obtain a fake overridden field. This approach is incorrect because
the getter resolved may not contain a backing field. This patch
fixes the issue by using the overriddenSymbols property of an
IrField directly.

Issue #KT-33034 fixed
2019-08-13 19:56:45 +07:00
Steven Schäfer ac667403ef (Un)mute and add tests for vararg codegen 2019-08-13 14:24:55 +02:00
Steven Schäfer d22814f6da JVM IR: Fix vararg handling in DefaultParameterInjector 2019-08-13 14:24:55 +02:00
Steven Schäfer 1543accf40 JVM IR: Remove vararg handling from ExpressionCodegen 2019-08-13 14:24:55 +02:00
Steven Schäfer 4d8d65abec JVM IR: Remove varargs from CallableReferenceLowering 2019-08-13 14:24:55 +02:00
Steven Schäfer 99f1329c14 JVM IR: Remove varargs from PropertyReferenceLowering 2019-08-13 14:24:55 +02:00
Steven Schäfer 4cef1c4901 JVM IR: Remove varargs from EnumClassLowering 2019-08-13 14:24:55 +02:00
Steven Schäfer 8d9f2f4238 JVM IR: Add a lowering to desugar varargs to arrays 2019-08-13 14:24:55 +02:00
Steven Schäfer a7b31ba42b Add a utility function to compute type substitutions for call 2019-08-13 14:24:55 +02:00
Steven Schäfer d61b276ebf JVM IR: Fix types in ArrayGet/Set intrinsics 2019-08-13 14:24:55 +02:00
Toshiaki Kameyama a1c52f69f2 New J2K: convert Long.parseLong(s) to s.toLong()
#KT-21504 Fixed
2019-08-13 12:37:16 +03:00
Dmitry Savvinov 9290ec34db Provide proper platformSpecficContainer in CompositePlatformConfigurator
Now, call 'configureDefaultCheckers' and 'configureExtensionsAndCheckers'
from all childs configurators, instead of taking just container from
CommonPlatformAnalyzerServices

This is needed because some IDE services tend to re-create containers
(in particular, PerFileAnalysisCache and ResolveElementCache do that to
re-inject new trace) and use usual injection DSL, which, in particular,
takes 'platformSpecificContainer'.

Returning 'common'-conatiner leads to losing all platform-specific checkers.
On the other hand, calling exactly 'configureDefaultCheckers' +
'configureExtensionsAndCheckers' should be correct, because that's how
single-platform 'platformSpecificContainer' is composed (see
PlatformConfiguratorBase), and in 'createContainerForCompositePlatform'
we don't use 'platformSpecificContainer' anyways

^KT-23305 Fixed
2019-08-13 12:12:29 +03:00
Dmitry Savvinov 1b7fa21a83 Minor. Add comments to creation of DelegatingBindingTrace 2019-08-13 12:12:29 +03:00
Sergey Igushkin 5578434629 Fix: No value has been specified for 'binaryResultsDirectory' (KT-33246)
With Gradle 5.5+, set the property `binaryResultsDirectory` that
replaces `binResultsDir`.

Issue #KT-33246 Fixed
2019-08-12 18:23:50 +03:00
Alexander Udalov 01ddac58e1 Add language feature for changed name of property annotations method
#KT-31352 Fixed
2019-08-12 16:48:26 +02:00
Alexander Udalov ea0142da60 Use JVM name of getter in synthetic method for property annotations
#KT-31352 In Progress
2019-08-12 16:48:25 +02:00
Alexander Udalov dfea94aef5 Minor, use INTRINSICS_CLASS_NAME constant instead of hardcoded string 2019-08-12 16:09:24 +02:00