Commit Graph

58750 Commits

Author SHA1 Message Date
Mikhail Zarechenskiy de009a2ff2 [NI] Minor, use singleton instead of creating anonymous object 2019-10-31 11:32:03 +03:00
Mikhail Zarechenskiy 77577dfa6f [FIR] Introduce ConeStubType to have subtyping for non-fixed variables
Currently, it's needed after changes in d7b47108f70a107818a04c8b8db33bfbf7c7e590

 Later it'll be also used for builder-inference
2019-10-31 11:32:03 +03:00
Mikhail Zarechenskiy 01ad9c47c8 [NI] Fix subtyping between integer literal types and intersection ones
Consider a call like `select(1, "")`, the resulting type for it is
 Comparable<Int & String> & Serializable.

 After variable fixation, the compiler incorporates this type into the
 constraint system to check for a contradiction, so it checks
 applicability of argument to the resulting type.

 In other words, for the above call it checks is
 `Comparable<Int & String> & Serializable` subtype of `IntegerLiteralType`?
 Which ends up in checking is `IntegerLiteralType` subtype of `Int & String`.

 Before this commit, such check was leading to the false result, but
 because of losing diagnostic (which was fixed in the previous commit:
 29f591b1), there was no error
2019-10-31 11:32:02 +03:00
Mikhail Zarechenskiy e0fb586aaf [NI] Don't loose diagnostic after type variable fixation
#KT-24488 Fixed
2019-10-31 11:32:02 +03:00
Mikhail Zarechenskiy ca8da22569 [NI] Improve CST algorithm to handle non-fixed variables
#KT-32456 Fixed
 #KT-32423 Fixed
 #KT-32818 Fixed
 #KT-33197 Fixed
2019-10-31 11:32:00 +03:00
Mikhail Zarechenskiy ba6648d535 Minor, reformat Annotations.kt file 2019-10-31 11:31:59 +03:00
Dmitry Petrov 2ff36c808e Minor: mute testEa35963 in WASM 2019-10-31 11:13:45 +03:00
Dmitry Petrov 8b2fdca706 FIR2IR: fix testData 2019-10-31 11:13:45 +03:00
Steven Schäfer b1b70e503c JVM IR: Improve codegen for try/catch statements 2019-10-31 11:13:44 +03:00
Steven Schäfer af74fd047a psi2ir: Consistently use type unit for statements
These changes allow us to accurately distinguish between statements and
expressions in the IR.

This also fixes the types of non-exhaustive conditional statements.
2019-10-31 11:13:44 +03:00
Steven Schäfer 0da4b06074 psi2ir: Fix return insertion
We should only insert a return statement at the end of a lambda or
function if the final statement is used as an expression (slice
USED_AS_RESULT_OF_LAMBDA and USED_AS_EXPRESSION).
2019-10-31 11:13:44 +03:00
Nikolay Krasko b3e733ea4f 193: More mutes in 193 (SurroundWithTestGenerated, KT-34689, KT-34542, KT-34672) 2019-10-31 11:11:50 +03:00
Nikolay Krasko f7c775a080 193: Mute tests for find usages in libraries in 193 (KT-34542) 2019-10-31 11:11:50 +03:00
Nikolay Krasko 7e5316b9f1 Fix completion test for Java in 193
It looks like java completion doesn't use () anymore.
2019-10-31 11:11:50 +03:00
Nikolay Krasko 42312c3060 Fix GradleConfiguratorTest.testProjectWithModule in 193 2019-10-31 11:11:49 +03:00
Nikolay Krasko 0d2e790b32 Fix IdeaModuleInfoTest.testSdkForScript in 193
There's automatic jdk 7 registration starting from 193.
2019-10-31 11:11:49 +03:00
Nikolay Krasko c9793e4bf4 Fix IdeaModuleInfo tests in 193 2019-10-31 11:11:49 +03:00
Nikolay Krasko 4ef063c656 Log information about failed test 2019-10-31 11:11:49 +03:00
Nikolay Krasko 201859be92 Mute RedundantRequireNotNullCall tests in 193 (KT-34672) 2019-10-31 11:11:49 +03:00
Nikolay Krasko bed2e21a1a Mute CoroutineNonBlockingontextDetectionTest tests in 193 (KT-34659) 2019-10-31 11:11:49 +03:00
Nikolay Krasko 1811b79503 Mute custom navigation tests (KT-34542) 2019-10-31 11:11:48 +03:00
pyos a835f07d51 JVM_IR: don't regenerate objects in lambdas inlined into objects 2019-10-31 09:09:54 +01:00
Ilya Goncharov eeadc95bc1 [Gradle, JS] Remove check on duplicated targets
Useful (for KT-33828), if provider of artifact has changed, but remained only one

#KT-33828 fixed
2019-10-31 10:46:17 +03:00
Kristoffer Andersen 1074a0ef69 JVM_IR: Fix Inline CallableReferences with Varargs
- Added tests to demonstrate broken behaviour: the interaction of inline
  functions and callable references with varargs and defaults in various
  combinations.
- Refactored InlineCallableReferencesToLambdaPhase to look like and use
  some of the infrastructure from CallableReferenceLowering.
- Lifted some of this infrastructure out to be broadly reusable.
2019-10-31 08:15:22 +01:00
Andrey Uskov 5360a7a3fe Fix GradleConfiguratorTest
Fixed naming of jdk platforms in mocks in order to pass IDE validation
2019-10-31 00:40:13 +03:00
Andrey Uskov 33cacb87d3 Fix import tests for IDE 183 2019-10-31 00:40:11 +03:00
Vladimir Dolzhenko 4b2834c4a8 Provide incremental analysis of a file when it is applicable
#KT32868 Fixed
2019-10-30 21:41:29 +01:00
Kirill Shmakov c7bd6d8ede Support watchos and tvos in cinterop definitions 2019-10-30 22:14:38 +03:00
Ilya Goncharov 08f9dd2aea [Gradle, JS] Fix entry for webpack (with Configuration Avoidance broke) 2019-10-30 18:58:56 +03:00
Dmitriy Novozhilov 6f91c0e679 [FIR] Don't check @ExtensionFunction in fir consistency tests 2019-10-30 18:49:12 +03:00
Dmitriy Novozhilov ad9bf62b2f [FIR] Remove adding annotations from bounds to type parameter in lightTree2Fir 2019-10-30 18:49:11 +03:00
Dmitriy Novozhilov 36ad065792 [FIR] Fix testdata broken after d2b895d8 2019-10-30 18:49:07 +03:00
Alexander Podkhalyuzin ddd25c703a SmartPointers in Introduce Variable refactoring
It's often case, when psi can die after reparse, especially after
reformatting cases, SmartPointers are opposite to it, can survive

#KT-32601 Fixed
2019-10-30 18:08:14 +03:00
Alexander Podkhalyuzin aa604d0854 Fixed new/old type inference diff, sometimes causes problems in JPS 2019-10-30 18:05:34 +03:00
Stanislav Erokhin 607249e899 Make computeTasksAndResolveCall public for compiler plugins 2019-10-30 16:44:38 +03:00
Vyacheslav Gerasimov 17bd547666 Build: Fix internalKotlinRepo url for JPS build 2019-10-30 16:38:10 +03:00
Alexander Udalov 28187da750 Fix compilation of :idea:compileTestKotlin
Original patch authored by @h0tk3y.
2019-10-30 12:56:42 +01:00
Jiaxiang Chen 6454cfad87 add local variable test. This test runs box() method and checks local variable types and names avaiable at every step. 2019-10-30 14:13:12 +03:00
Jiaxiang Chen 6b73ef4b0b refactor stepping test to extract common logic for other debug information test 2019-10-30 14:13:12 +03:00
Anton Yalyshev dec7f51902 Return an old stepping cause new one requires a big refactoring for GradleModuleBuilder 2019-10-30 13:49:40 +03:00
Anton Yalyshev 9075a83ebe Prevents creating of new Gradle-based Kotlin project in a path of previous one 2019-10-30 13:49:40 +03:00
Mads Ager 1713625718 JVM: Improve line number handling for suspend calls.
Take branching and method calls into account when finding the line
number of the continuation. If there is no line number before
branching instructions or method calls, the following code is
still on the line of the suspend call itself.

This fixes a couple of issues with incorrect line numbers for
multiple throws on the same line or multipe suspend calls on
the same line.

In addition, it avoids the need to spam the method node with
repeated line number instructions in the IR backend.
2019-10-30 13:40:21 +03:00
Mikhail Glukhikh 34d9959b17 FIR: add more correct handling of Java raw types 2019-10-30 12:55:38 +03:00
Mikhail Glukhikh d4af35d794 FIR: add substitution for Java fields 2019-10-30 12:55:37 +03:00
Mikhail Glukhikh 83cd7cf516 FIR: add new problematic tests 2019-10-30 12:55:37 +03:00
Alexander Udalov 544b402d06 Update bootstrap to 1.3.70-dev-1070 2019-10-30 10:31:51 +01:00
Georgy Bronnikov 9c8e8651be IR: make stub marker parameter for constructors nullable
In constructor stubs for default arguments, a marker parameter used
to have a non-null type, but null was passed as the corresponding
argument. This patch corrects the type.
2019-10-30 12:23:27 +03:00
Natalia Selezneva 35e2c9eb59 Fix scripting tests in 193
^KT-34541 Fixed
2019-10-30 12:02:45 +03:00
Natalia Selezneva 4613bf4b06 Minimize bunch files size for AbstractScriptConfigurationTest.kt 2019-10-30 12:02:45 +03:00
Dmitriy Novozhilov d2b895d8c2 [FIR] Add @ExtensionFunction to lambdas with receivers 2019-10-30 11:03:15 +03:00