Commit Graph

45134 Commits

Author SHA1 Message Date
Mikhail Glukhikh 7b2a66c006 Convert 'simplify when' from intention to inspection
Related to KT-20492
2017-11-10 15:34:11 +03:00
Toshiaki Kameyama df86ff7115 Introduce "Simplify when" intention where one branch is always true
So #KT-20492 Fixed
2017-11-10 15:34:08 +03:00
Denis Zharkov 26ba2ab3db Postpone creating DataFlowValue until they're really needed
Unfortnutately DataFlowValueFactory::createDataFlowValue isn't very cheap,
so it's better to avoid these calls when it's possible
2017-11-10 13:01:13 +03:00
Denis Zharkov 714a057e3b Minor. Drop unused DataFlowExtras::possibleTypes 2017-11-10 13:01:13 +03:00
Denis Zharkov b4499d52ee Introduce OpenAddressLinearProbingHashTable to be used in binding context
See comments in the implementation for clarification
2017-11-10 13:01:13 +03:00
Mikhael Bogdanov 5d84aec8f7 Clean dependencies in 'tests-java8' module 2017-11-10 09:46:41 +01:00
Mikhael Bogdanov ce62991c5a Add test-ir-jvm module 2017-11-10 09:46:40 +01:00
Ilya Gorbunov 598dc1af04 Introduce deployRepo parameter to override deploy-repo set by teamcity
Currently it isn't possible to do that from command line.
2017-11-10 00:14:25 +03:00
Simon Ogorodnik cf9b7d0f42 Set unit test mode to false in production environment 2017-11-09 21:38:47 +03:00
Ilya Gorbunov e801390c7a Fix intellij-community revision JFlex is downloaded from
Because it was removed in master
2017-11-09 17:58:54 +03:00
Anton Bannykh 4d12426145 JS: use ANT replace task to set $version
Needed make kotlin-test depend on the same version of kotlin
2017-11-09 15:10:12 +03:00
Mikhael Bogdanov af784dcd47 Update android test dependencies 2017-11-09 11:38:10 +01:00
Ilya Gorbunov b2627f53a3 Fix resources clashes in ultimate plugin tests
Rollback tests-jar configuration to extend testCompile instead of testRuntime.
Otherwise an unwanted main artifact from the runtime configuration gets added to the
artifacts of tests-jar configuration.

Exclude transitive dependencies of projectTests(":idea")
2017-11-08 19:05:36 +03:00
Ilya Gorbunov 24c982de9b Make project dependency shortcuts return ProjectDependency
to enable further configuration.
2017-11-08 19:03:40 +03:00
Mikhael Bogdanov 416392bb74 Don't propagate reified markers for special enum functions
#KT-18254 Fixed
2017-11-08 15:35:44 +01:00
Mikhael Bogdanov 800cc63347 Remove external finally block interval on splitting during inline
#KT-20433 Fixed
2017-11-08 15:35:43 +01:00
Alexey Andreev f51709e61c Clean-up application from EncodeSignatureTest
Hopefully, this fixes random failing tests
2017-11-08 16:13:07 +03:00
Alexey Andreev 779af375a7 JS: fix inlining of array constructor expressed via typealias
See KT-20978
2017-11-08 16:12:16 +03:00
Alexey Andreev ec53f9b254 JS: don't emit short circuit operators for boolean and/or
See KT-21004
2017-11-08 16:10:57 +03:00
Vyacheslav Gerasimov 16b9a376b6 Android Lint: Run AnalysisScope.toSearchScope under read action 2017-11-07 20:11:19 +03:00
Vyacheslav Gerasimov d6d20a5b5d Android Lint: Don't check files unrelated to Android modules
#KT-21064 Fixed
2017-11-07 20:11:19 +03:00
Alexey Sedunov ba0b21d1a3 Add @JvmStatic Intention: Support functions/properties in objects
Also eliminate unnecessary object instance references on Java call sites

 #KT-20095 Fixed
2017-11-07 19:25:03 +03:00
Alexey Sedunov cfad305826 Misc: Fix deserialization of CommonCompilerArguments.freeArgs
#KT-20938 Fixed
2017-11-07 19:25:02 +03:00
Alexey Sedunov 0bd267111e Kotlin Facet: Fix language/API version initialization 2017-11-07 19:25:02 +03:00
Ilya Gorbunov a005f4804e Strengthen deprecation for CharSequence.size in JS 2017-11-07 18:59:33 +03:00
Ilya Gorbunov 9305903e6c Remove deprecated pairwise function
It was replaced with zipWithNext.
2017-11-07 18:59:33 +03:00
Nikolay Krasko 329322e268 Increase stub version because of change in overload sorting
See commit f197f36e239e3500baf4af87d9b719a123fe2f26
2017-11-07 18:00:23 +03:00
Mikhail Glukhikh 6c2eb06351 Do not report "unused receiver" on companion objects
So #KT-19560 Fixed
2017-11-07 17:28:13 +03:00
Nikolay Krasko 84ab397f25 Restrict 172 plugin to 172 ide only 2017-11-07 13:30:00 +03:00
Nicolay Mitropolsky fab8187574 UAST: Complex test data moved to separate file (KT-20990) 2017-11-06 19:59:50 +03:00
Nicolay Mitropolsky 9730d50e10 UAST: yet another fight with string literals in string literals (KT-20990) 2017-11-06 19:59:50 +03:00
Alexey Andreev 132285ea03 JS: optimize loop over array.withIndex()
See KT-20932
2017-11-03 17:36:05 +03:00
Alexey Andreev 1be86e05ae JS: optimize range check for int and long
See KT-2218

Additionally, fix temporary variable elimination for && and ||
2017-11-03 17:35:17 +03:00
Alexey Andreev 43302ce00c JS: add missing members to kotlin.js.Date
See KT-20694
2017-11-03 17:31:25 +03:00
Alexey Andreev 0a31b4ccc1 JS: improve declarations for JSON object
See KT-20580
2017-11-03 17:31:22 +03:00
Alexey Andreev bd7129d0d6 JS: fix non-abstract extension properties in interfaces
KT-20994
2017-11-03 17:29:44 +03:00
Pavel V. Talanov 9e061d3bbb Fix light class exception on empty multifile facade
Fix generating multifile facade with all members private (in bytecode)
leading to delegate not being generated for corresponding light class

 #KT-20966 Fixed
2017-11-03 16:44:53 +03:00
Alexey Sedunov b20ffe76b7 Navigation: Support "Navigate/Related Symbol" for expects/actuals
#KT-20952 Fixed
2017-11-03 16:34:36 +03:00
Alexey Sedunov b2e5e9dab5 Highlighting: Support implicit 'it' references
#KT-21002 Fixed
2017-11-03 16:34:36 +03:00
Alexey Sedunov d1eaf444a6 Line markers: Do not show package in "Choose actual for" popup
#KT-20953 Fixed
2017-11-03 16:34:35 +03:00
Alexey Sedunov 327caa086b Gradle: Do not rely on isQualifiedModuleNamesEnabled() to predict module name
IDEA 173 uses resolve-level setting to control naming of imported modules

 #KT-20985 Fixed
2017-11-03 16:34:35 +03:00
Alexander Udalov 3ead2e9cd4 Use KotlinCoreEnvironment.createForTests in test code
createForProduction creates and caches JavaCoreApplicationEnvironment
instance, which can alter behavior of subsequent tests
2017-11-03 14:03:02 +01:00
Alexander Udalov dddd1cdba5 Use JUnit 3 + KtUsefulTestCase instead of JUnit 4 in compiler tests
This is needed because KtUsefulTestCase performs useful cleanup at the
end of the test (namely, resets ApplicationManager#ourApplication to
null)
2017-11-03 14:03:02 +01:00
Alexander Udalov 3049b5d92f Remove logging in KotlinSuppressCache.isSuppressedByAnnotated
It produces lots of useless output in stderr when tests are run with
Gradle in the terminal
2017-11-02 17:15:59 +01:00
Alexander Udalov b43b470b8f Move Java 8 tests generator to tests-java8, run it in "Generate Compiler Tests" 2017-11-02 17:13:05 +01:00
Alexander Udalov f52ba44e90 Move JS tests generator to :js:js.tests, run it in "Generate Compiler Tests"
Also cleanup generateTestDataForReservedWords and make everything there
private
2017-11-02 17:12:46 +01:00
Alexander Udalov 8c6ed3e872 Generate IR tests in GenerateCompilerTests.kt 2017-11-02 17:12:46 +01:00
Ilya Gorbunov 61b78d7eda Make projectTests type of dependency transitive on testRuntime dependencies
`tests-jar` configuration now extends testRuntime instead of testCompile
(note that testRuntime extends testCompile),
and projectTests() dependency shortcut makes it transitive.

This is required to depend on test utility modules producing `-tests` jar instead of default one
without listing all their transitive dependencies.
2017-11-02 18:19:52 +03:00
Ilya Gorbunov 3cfb1fd6a7 Simplify dependency setup for jvm6 codegen test server 2017-11-02 18:18:58 +03:00
Simon Ogorodnik 339d06d040 Improve diagnosticMissingPackageFragment reporting
Single execution path to report missing package fragment problems

Split failures on PluginDeclarationProviderFactory site by
known reasons to improve exception analysis
2017-11-02 16:31:43 +03:00