Commit Graph

61866 Commits

Author SHA1 Message Date
Igor Yakovlev a67d97bdf8 Remove redundant fake facade classes
Fixed #KT-35122 #EA-218642 #EA-217640
2020-02-13 19:08:54 +03:00
Pavel Kirpichenkov 5d6d287faa [NI] Refactor UnstableSmartCast diagnostic
Split diagnostic classes for unstable smartcast with different resolution applicability.

^KT-36264 Fixed
2020-02-13 18:02:38 +03:00
Pavel Kirpichenkov 15d744c3da [NI] Continue resolution after unstable smart cast on receiver
The old inference cosideres candidates with unstable smartcast on
receiver unsuccessful, therefore another one may be selected.
KT-36264
2020-02-13 18:02:38 +03:00
Pavel Kirpichenkov 4997c9535c Mute test, affected by changes in unstable smart casts
Revealed by changes in e02b7b58, but they are not the source of a bug
See KT-36459
2020-02-13 18:02:37 +03:00
Pavel Kirpichenkov e40ba73950 [NI] Add resolution applicability for resolved candidates with error
New resolution applicability is needed in cases when error is found,
but candidate still should be selected. Currently there are two cases,
when this behaviour is required:
- unstable smartcast (choose candidate with non-nullable parameter)
- unknown lambda parameter type (against non-functional expected type)

KT-36264
2020-02-13 18:02:37 +03:00
Ilya Goncharov 4fa87d2caa [Gradle, JS] Compilations with js type because of compatibility
- In kotlinx.html there is invocation of packageJson function on compilations["main"]
It can be casted in user script to KotlinJsCompilation, or override on plugin side
2020-02-13 17:49:46 +03:00
Steven Schäfer 76f8109ff6 JVM IR: Implement LookupLocation in IrSourceCompilerForInline
This is used when compiling calls to inline functions with a different
@JvmName for incremental compilation.
2020-02-13 14:46:35 +01:00
Alexander Udalov 3278451b07 JVM IR: do not generate certain special bridges as final
Special bridges which are generated as a replacement for a non-final
fake override and use invokespecial to call the already existing
implementation in the superclass, should not be final. Otherwise we
can't generate an override for the original Kotlin function in a
subclass with the same JVM signature.
2020-02-13 14:34:18 +01:00
Pavel Kirpichenkov df046683cc Revert "[NI] Report unsafe implicit invoke accordingly to OI"
This reverts commit b045adf83a.
2020-02-13 16:06:40 +03:00
Nicolay Mitropolsky bf9d4f065b Uast: eliminating the kotlin.uast.multiresolve.enabled, it is always true for a long time 2020-02-13 15:54:48 +03:00
Nicolay Mitropolsky e4b7c39110 Uast: forcing kotlin.uast.force.uinjectionhost=true always 2020-02-13 15:54:48 +03:00
Mikhail Zarechenskiy ee48580e06 [NI] Update test data 2020-02-13 15:01:39 +03:00
Ilya Kirillov 531a63bd19 Show experimental features panel only for non-stable plugin versions
Also, use registry as backend for features settings
2020-02-13 14:59:42 +03:00
Pavel Kirpichenkov b045adf83a [NI] Report unsafe implicit invoke accordingly to OI
There are several issues with unsafe desugaring for convention calls.
Proper fix is not implemented here (see design proposal KT-30872).
This commit only applies the old logic in the new inference.
^KT-30695 Fixed
2020-02-13 14:49:43 +03:00
Vladimir Dolzhenko 9d51180202 Guard resolve calls with runWithCancellationCheck
Relates to #KT-35135
2020-02-13 12:47:58 +01:00
Mikhail Zarechenskiy 74becc7e96 Fix compilation of idea module for old inference
Also, fix code in a way so it'll compile in NI & -progressive too
2020-02-13 14:46:02 +03:00
Vladimir Dolzhenko 918895b88f Avoid using quite new ScratchFileService API
Relates to #KT-35918
2020-02-13 12:10:27 +01:00
Vladimir Dolzhenko aa0c2486c3 Fix GenerateTests after performance tests modularization 2020-02-13 12:06:18 +01:00
Ilya Chernikov b96109f23f Add diagnostic code to the ScriptDiagnostic
to allow checking for specific errors, e.g. incomplete statements in
the REPL
2020-02-13 11:33:40 +01:00
Ilya Chernikov 77eacae958 [minor] drop unused dependencies 2020-02-13 11:33:40 +01:00
Ilya Chernikov 49d092cae8 [minor] add incomplete test to the repl tests 2020-02-13 11:33:40 +01:00
Ilya Chernikov 0761a17e2f Fix embedding and relocation in main-kts
The relocation root different from the one in embeddable compiler
lead to "linking" errors for classes included in both jars, e.g.
Disposable. Reuse common root to avoid it.
2020-02-13 11:33:40 +01:00
Ilya Chernikov 514282fb0a Use correct platform classloader on script evaluation in cli compiler
#KT-28475 fixed
also minor testing infrastruct refactoring
2020-02-13 11:33:40 +01:00
Mikhail Zarechenskiy 489c4ec5ec Fix "progressive" warnings to fix compilation under progressive mode 2020-02-13 13:26:11 +03:00
Mikhail Zarechenskiy 3d28945ecb [NI] Disable feature explicitly as it's required in test 2020-02-13 12:08:10 +03:00
Mikhail Zarechenskiy 7526162f6f Mute one inline codegen test for NI
#KT-36448
2020-02-13 11:54:08 +03:00
Mikhail Zarechenskiy 3702d31cbc Set latest stable version for diagnostic tests with unsigned types 2020-02-13 11:54:08 +03:00
Dmitry Petrov 866f188120 Report JVM signature clashes from JVM_IR
Also:

* Do not rename public ABI fields
This includes backing fields for const, lateinit, @JvmField properties,
and instance fields for objects.

* FAKE_OVERRIDE declarations for static members of parent Java classes
Required to report cases when a Kotlin function accidentally overrides
Java class member.
2020-02-13 11:35:48 +03:00
Mikhail Zarechenskiy c1db9b6d40 [NI] Fix incremental compilation for SAM adapters
This commit fixes test:
 - JavaUsedInKotlin.SamConversions#testMethodAddedSamAdapter
2020-02-13 11:16:00 +03:00
Mikhail Zarechenskiy 1ba0870ae3 [NI-MIGRATE] Update IR text tests 2020-02-13 11:16:00 +03:00
Mikhail Zarechenskiy abc5eb4740 [NI-MIGRATE-BAD] Update problematic/questionable tests
These tests are going to be reviewed in more detail before 1.4
2020-02-13 11:15:59 +03:00
Mikhail Zarechenskiy c2fc633ad6 [NI-MIGRATE] Update test about signature enhancements
It's required as now there are no synthetic candidates
2020-02-13 11:15:59 +03:00
Mikhail Zarechenskiy 319a38bd5c [NI-MIGRATE] Update diagnostic messages 2020-02-13 11:15:59 +03:00
Mikhail Zarechenskiy cd0012c527 [NI-MIGRATE] Update CLI tests 2020-02-13 11:15:59 +03:00
Mikhail Zarechenskiy ca57d6cd16 [NI-MIGRATE] Update pseudocode tests for NI 2020-02-13 11:15:58 +03:00
Mikhail Zarechenskiy a0071885bf [NI-MIGRATE] Update type binding tests for NI 2020-02-13 11:15:58 +03:00
Mikhail Zarechenskiy 687c96060f [NI-MIGRATE] Update test data for resolve tests after enabling NI 2020-02-13 11:15:58 +03:00
Mikhail Zarechenskiy 17df92e999 Fix case in stdlib where more specific type lead to error
See #KT-30299 & #KT-32125
2020-02-13 11:15:57 +03:00
Mikhail Zarechenskiy 599ff4711e Temporary fix code before proper support of UnsafeVariance in NI
See #KT-34433
2020-02-13 11:15:57 +03:00
Mikhail Zarechenskiy c64577b735 Temporary fixes for Kotlin project after enabling NI
Most of these fixes will gone away after compiler bootstraping
2020-02-13 11:15:57 +03:00
Mikhail Zarechenskiy cdf5323f8c Disable NewInference for stdlib tests
There is one failing test namely `ValByMapExtensionsTest.doTest`, which
 is quite questionable because its checks the use of out projection and
 Exact annotation (see KT-18789)
2020-02-13 11:15:56 +03:00
Mikhail Zarechenskiy 2a4caf6dc8 Enable new inference in the compiler 2020-02-13 10:22:42 +03:00
Dmitry Gridin 8da05ed597 RemoveReturnLabelFix: introduce labelName parameter 2020-02-13 13:51:34 +07:00
Dmitry Gridin 7c65bb2e3f AbstractDiagnosticBasedMigrationInspection: cleanup code 2020-02-13 13:51:34 +07:00
Dmitry Gridin b98bdca849 RemoveAnnotationFix: inline default argument 2020-02-13 13:51:34 +07:00
Dmitry Gridin f8a21340d0 ProhibitRepeatedUseSiteTargetAnnotationsMigrationInspection: add test
#KT-36257
2020-02-13 13:51:33 +07:00
Dmitry Gridin 09e6ffdb0a AbstractDiagnosticBasedMigrationInspection: make lazy initialization 2020-02-13 13:51:33 +07:00
Valentin Kipyatkov cfc2c0fb20 Changes after rebasing on master 2020-02-13 07:40:37 +02:00
Valentin Kipyatkov 4f5d121478 Minor code improvements 2020-02-13 07:40:37 +02:00
Valentin Kipyatkov e7c72637a1 Removed misleading comments from test data 2020-02-13 07:40:37 +02:00