Commit Graph

51456 Commits

Author SHA1 Message Date
Ilmir Usmanov 7e4e1b9a4d Add regression test
#KT-29327
2019-01-18 13:44:07 +03:00
Ilmir Usmanov dc6bb4cd08 Revert "Simplify tail-call optimisation check"
This reverts commit a5bcd3495e.

 #KT-27190: Open
 #KT-29327: Fixed
2019-01-18 13:44:05 +03:00
Mikhael Bogdanov 8fb2633bf4 Minor. Patch test to avoid failing in Native 2019-01-18 09:52:56 +01:00
Anton Yalyshev a4386cf28a Merge remote-tracking branch 'origin/master' 2019-01-18 11:14:17 +03:00
Andrey Uskov 2659011440 Fix compilation of GradleImportingTestCase in bunches 2019-01-18 00:45:20 +03:00
Georgy Bronnikov c3352d5fdb Unmute several tests, mute one 2019-01-17 23:46:26 +03:00
Georgy Bronnikov 7df0cffac9 Move declaration origins to IrDeclarationOrigin.kt 2019-01-17 23:46:26 +03:00
Georgy Bronnikov bccb451afd Add isSyntheic flag to IrDeclarationOrigin 2019-01-17 23:46:26 +03:00
Georgy Bronnikov ec0842c0f4 Remove descriptors from CallableReferenceLowering 2019-01-17 23:46:26 +03:00
Georgy Bronnikov 67ab8624c3 Add DeepCopyIrTreeWithDescriptors 2019-01-17 23:46:26 +03:00
Georgy Bronnikov da0a823992 Remove descriptors from LocalDeclarationslowering 2019-01-17 23:46:26 +03:00
Vyacheslav Gerasimov b525146009 Build: Switch to prebuilt protobuf-lite from teamcity repo
#KT-29202
2019-01-17 20:45:11 +03:00
Vyacheslav Gerasimov 1efd859909 Exclude protobuf-relocated build directory in CodeConformanceTest
#KT-29202
2019-01-17 20:45:11 +03:00
Vyacheslav Gerasimov c7ab69829e Build: Convert protobuf to includable build with maven publication
#KT-29202
2019-01-17 20:45:11 +03:00
Vyacheslav Gerasimov 6a3e5c4c94 Build: Move protobuf projects to subdirectory
#KT-29202
2019-01-17 20:45:11 +03:00
Ilya Gorbunov 0ac85ad715 Document that sorting is stable in each platform
#KT-12473 Fixed
2019-01-17 18:38:37 +03:00
Ilya Gorbunov 56672c2564 Ensure stable sorting in MutableList.sort/sortWith
MutableList.sortWith now works correctly in JS_IR backend too

#KT-12473
2019-01-17 18:38:23 +03:00
Andrey Uskov 7191624a92 Fix compilation of KotlinGradleProjectResolverExtension in bunches 2019-01-17 17:20:43 +03:00
Denis Zharkov 82537cdc8b Add recovery for missing comma between arguments
^KT-13497 Fixed
2019-01-17 14:58:01 +03:00
Denis Zharkov 37614254d7 Fix test on unused import suppression
Before the fix for KT-7185, the file looked like:
package suppression
@file:Suppress("UnusedImport")

import java.io.* // unused

And it was parsed incorrectly, because @file: annotations
should come before package directive
But after fix, import directives started being parsed that lead
to wrong unused import (because suppression wasn't parsed still)
2019-01-17 14:56:42 +03:00
Denis Zharkov db53c4bea4 Add test for obsolete recovery case (semi-finished extension)
^KT-7405 Obsolete
2019-01-17 14:56:42 +03:00
Denis Zharkov 65e6e21d0f Add recovery for import lists in the middle of the file
Note, that it only works for top-level declarations

^KT-7185 Fixed
2019-01-17 14:56:42 +03:00
Denis Zharkov e6710b6fa2 Add recovery for value parameter without type or name
The case for KT-7237 belongs to /NoGTInTypeArguments test
It was fixed implicitly: before it recovery was working but the name for
the next parameter was attached to type argument list.
After that change, parameter without name gets parsed correctly (with an
error of course)

^KT-13731 Fixed
^KT-7237 Fixed
2019-01-17 14:56:42 +03:00
Denis Zharkov 5437a0e478 Add recovery for enum declaration without 'class' keyword
^KT-13703 Fixed
2019-01-17 14:56:42 +03:00
Denis Zharkov 1688fed0b7 Minor. Rename PropertyParsingMode -> DeclarationParsingMode 2019-01-17 14:56:42 +03:00
Denis Zharkov 8b3ffee183 Minor. Rename defaultDetected -> companionDetected 2019-01-17 14:56:42 +03:00
Denis Zharkov ee75b8c7e5 Minor. Extract KotlinParsing::parseCommonDeclaration 2019-01-17 14:56:42 +03:00
Dmitry Petrov c1de845d29 Generate switch instruction for 'when' with unsigned subject 2019-01-17 13:49:39 +03:00
Dmitriy Dolovov 3c2d026128 CIDR: Always relax upper limit of product version in K/N plugin for non-public CIDR builds
Issue #KT-29338:fixed
2019-01-17 17:30:16 +07:00
Andrey Uskov 618a7c3747 Improve logging in gradle import tests 2019-01-17 13:20:58 +03:00
Andrey Uskov 5302470f6b Fix "testUnresolvedDependency"
This fix is work-around fixing incompatibility issue between gradle
tooling api bundled in IDEA and gradle tooling api in gradle 4.x.
When null messages were logged it resulted in the following error:
"java.io.StreamCorruptedException: invalid stream header: ED000573"
2019-01-17 13:20:28 +03:00
Dmitry Savvinov e483f83666 Make 'is'-operator more stupid
Consider following expression: 'call() is Foo'. Suppose that we know
something about the 'call()', e.g. 'returns(foo) -> <condition>'

Previously, we've tried to re-use knowledge about 'call()', constructing
some smart clause, like 'returns(true) -> foo is Foo && <condition>'.

The conceptual error here is that *we can't* argue that <condition>
holds. Imagine that 'call()' actually has unspecified 'returns(foo2) ->
<!condition>', and 'foo2 is Foo' also holds. Then we would get
'returns(true) -> foo2 is Foo && <condition>' <=> 'returns(true) ->
<condition>' for the whole call, which is not correct.

More concrete example would be something like:
'if (!x.isNullOrEmpty() is Boolean)'

^KT-27241 Fixed
2019-01-17 12:47:27 +03:00
Dmitry Savvinov 04ff2a3ee7 Add test on isNullOrEmpty-like contract
Currently, behavior is undesired, see KT-27241
2019-01-17 12:47:27 +03:00
Anton Yalyshev fe746bd505 drop 182 support, as context info works from 183 2019-01-17 12:43:20 +03:00
Anton Yalyshev 23b0f27f3b moved PluginVersion from collector instance to context for each trigger() 2019-01-17 12:43:18 +03:00
Anton Yalyshev 124ab5a896 added Kotlin plugin version Collector 2019-01-17 12:42:41 +03:00
Andrey Uskov 48d832298b Compile Kotlin project with "-Xjvm-default=compatibility" flag
#KT-29073 Fixed
2019-01-17 12:40:10 +03:00
Andrey Uskov 7da8c41f3f Remove build script bunches in idea/idea-maven 2019-01-17 12:40:09 +03:00
Andrey Uskov 99de00362e Fix NSME during reimport of maven project
#KT-29251 Fixed
2019-01-17 12:40:08 +03:00
Andrey Uskov 68347e89cf Remove build script bunch for 191. The -Xjvm-default flag should be set in the whole project 2019-01-17 12:39:11 +03:00
Anton Yalyshev 53f07536f9 Merge remote-tracking branch 'origin/master' 2019-01-17 11:12:32 +03:00
Mikhail Glukhikh 40b88d874e Fix broken test (KT-18715) 2019-01-17 10:41:31 +03:00
Anton Yalyshev ebeff1e0d8 Merge remote-tracking branch 'origin/rr/ayalyshev/stat-refactorings-fixes' into rr/ayalyshev/stat-refactorings-fixes
# Conflicts:
#	idea/src/org/jetbrains/kotlin/idea/refactoring/rename/RenameKotlinFileProcessor.kt.173
2019-01-16 22:31:58 +03:00
Anton Yalyshev 30df986f93 removed unused collectors 2019-01-16 22:26:51 +03:00
Anton Yalyshev e434733341 removed trigger() calls when refactoring is performed automatically or recursively 2019-01-16 22:26:50 +03:00
Anton Yalyshev 70d6020025 Removed second override as findReferences(element: PsiElement) is called anyway. It duplicates trigger(). 2019-01-16 22:26:50 +03:00
Ilmir Usmanov 2ec1222cd1 Fix test data 2019-01-16 20:40:33 +03:00
Ilmir Usmanov 76e9b574cd Put default value to vars iff they are not boxed
#KT-24672 Fixed
2019-01-16 20:40:29 +03:00
Svyatoslav Kuzmich 62322dec5c Regenerate and unmute tests 2019-01-16 16:37:52 +03:00
Mikhail Glukhikh 7908663687 Fix part of tests broken by a71bb709 (too many line breaks were added) 2019-01-16 16:07:41 +03:00