Commit Graph

62148 Commits

Author SHA1 Message Date
Roman Golyshev 1dbb3d7c0f Revert "New J2K: fix testdata"
This reverts commit 285aa123
2020-02-20 17:33:39 +03:00
Roman Golyshev 4042214bb2 Fix tests broken by enhanced RedundantSamConstructor inspection
- The inspection now works in more cases, so the test data had to be
updated accordingly
2020-02-20 17:27:41 +03:00
Dmitriy Novozhilov 22a5bc4144 [FIR-TEST] Add build tasks for running all fir tests
- `:firCompilerTest` run all compiler fir tests
- `:idea:firTest` run all IDE fir tests
- `:firAllTest` run all fir tests
2020-02-20 16:56:34 +03:00
Dmitriy Novozhilov 82c960d40d [FIR-TEST] Run fir test in diagnostic test if fir testdata is missing 2020-02-20 16:56:34 +03:00
Dmitriy Novozhilov d4d4697202 [FIR-TEST] Fix creating dirs in FirLoadCompiledKotlin test 2020-02-20 16:56:34 +03:00
Dmitriy Novozhilov 3edbf7f541 [FIR-TEST] Move abstract diagnostics tests to tests-common module 2020-02-20 16:56:34 +03:00
Dmitriy Novozhilov 102d5c7d5a [NI] Fix detecting expected type variable for postponed atoms
#KT-36819 Fixed
2020-02-20 16:56:33 +03:00
Vladimir Dolzhenko 7e832e50ac Move copy/paste resource bundles to Kotlin
#KT-36877 #EA-224686 Fixed
2020-02-20 14:06:11 +01:00
Dmitry Petrov bc7c8e4819 Update bytecode text tests for JVM_IR 2020-02-20 14:59:29 +03:00
Yan Zhulanow 7581e0bd8e Unmute noParametersArgumentCallInExpression test in JVM IR backend 2020-02-20 20:56:36 +09:00
Juan Chen 9dd8eda1c9 [FIR]: fix library methods in packages
Library methods such as 'listOf' are resolved
to have the package fragments as their parents,
but JVM expects their containing file classes as parents.
This fix generates those file classes and
uses them as parent replacements for such library methods.
2020-02-20 14:24:02 +03:00
Dmitry Petrov 81b30b7399 Update bytecode text tests for JVM_IR 2020-02-20 14:20:21 +03:00
Denis Zharkov 071149e0fb Fix exception when Java class has different methods with same erasure
^KT-36856 Fixed
2020-02-20 14:06:13 +03:00
Vladimir Ilmov 7efb32628e [Highlight] Fix for coloring annotation attributes in Kotlin
#KT-36156 Fixed
2020-02-20 11:51:42 +01:00
Vladimir Ilmov 8d4dac398d [COROUTINE] Information message added if breakpoint policy doesn't suspended all
threads.
2020-02-20 11:51:42 +01:00
pyos eff02b6e72 JVM_IR: improve suspend tail call detection.
* TailCallOptimizationLowering should go into local classes in order to
   transform their suspend methods;
 * the check for invokes of noinline lambda arguments in codegen was
   incorrect, as it also returned true for calls of lambdas stored in
   local variables;
 * IrInlineCodegen should mark non-inlinable arguments used as inline
   suspend parameters;
 * detection of suspend/inline call sites was incorrect (or maybe it's
   the `compilationContextDescriptor` that was incorrect?..)
2020-02-20 11:10:26 +01:00
Steven Schäfer 3cf71c1d2b JVM IR: Move $assertionsDisabled field to interface DefaultImpls 2020-02-20 11:07:46 +01:00
Steven Schäfer 0ed719f792 JVM IR: Use package visibility for $assertionsDisabled field 2020-02-20 11:07:46 +01:00
Mikhail Zarechenskiy d169435300 Fix construction of Mock classes in case of generic inner types
This fixes testMissingDependencyConflictingLibraries for NI and also
 fixes changed test for OI as well
2020-02-20 12:34:35 +03:00
Mikhail Zarechenskiy 83824d0ba6 [NI] Don't stop on a candidate with unstable smartcast error
#KT-36847 Fixed
2020-02-20 12:34:34 +03:00
Mikhail Zarechenskiy 162a2d5851 [NI] Add test to check how behavior will be changed after few commits 2020-02-20 12:34:34 +03:00
Sergey Igushkin 0e970407a4 Fixup for 9b861739 (the fix for KT-35942)
* Don't include the JS friend paths into the classpath
* Fix binary compatibility with Gradle < 5.1

Issue #KT-35942
2020-02-19 23:10:53 +03:00
Mikhail Glukhikh 3921613956 [FIR] Code cleanup: DeclarationsConverter 2020-02-19 22:47:59 +03:00
Mikhail Glukhikh 5d7999a808 [FIR] Handle explicitly private sealed class constructors properly
#KT-36850 Fixed
2020-02-19 22:41:24 +03:00
Mikhail Glukhikh 17b473fcb6 FirTowerResolver: code cleanup 2020-02-19 22:41:24 +03:00
Mikhail Glukhikh f1a418373c RawFirBuilder: code cleanup 2020-02-19 22:41:24 +03:00
Mikhail Glukhikh e66d6a8954 [FIR] ClassWrapper: code cleanup 2020-02-19 22:41:24 +03:00
Mikhail Glukhikh bbf448b39d [FIR] Change visibility of default sealed class constructor to private 2020-02-19 22:41:23 +03:00
Mikhail Glukhikh 14fd1d3c9f [FIR] Check visibility correctly for sealed class in file 2020-02-19 22:41:23 +03:00
Mikhail Glukhikh ace259314b Use 'symbol' instead of 'classId' in FirResolvedQualifier
This commit solves problem with resolved qualifier of local class
#KT-36758 Fixed
2020-02-19 22:41:23 +03:00
Mark Punzalan 3d51af2935 [JVM IR] Fix issue with suspend functions with @JvmOverloads. 2020-02-19 16:48:53 +01:00
Mikhail Glukhikh c289612e57 [FIR] Remove debugging println in tree generator 2020-02-19 18:14:45 +03:00
Mikhail Glukhikh a4c4b2650c FIR2IR: remove hacky & redundant resolve of delegating constructor calls 2020-02-19 18:09:06 +03:00
Mikhail Glukhikh 82c8b5f368 [FIR] Eliminate isNotSAM optimization as ineffective (see dc4f332c) 2020-02-19 18:09:06 +03:00
Mikhail Glukhikh 9017654b9d [FIR] Handle default parameters when checking callable reference type
#KT-36759 Fixed
2020-02-19 18:09:06 +03:00
Mikhail Glukhikh 04e6c63cc9 FirSymbolProvider: minor cleanup 2020-02-19 18:09:06 +03:00
Mikhail Glukhikh 1376dbf9cf Remove unused 'dispatchReceiverValue()' from FIR tower levels 2020-02-19 18:09:05 +03:00
Mikhail Glukhikh e051251b27 FIR: set isOperator only for Java methods with appropriate names
#KT-35133 Fixed
2020-02-19 18:09:04 +03:00
Mikhail Zarechenskiy cbbbf40b90 [NI] Fix isSuccessful property for member with LowPriority resolution
The problem was introduced in e40ba73950
2020-02-19 18:06:22 +03:00
simon.ogorodnik 8ca2aa47f8 [FIR] Remove duplicated code 2020-02-19 17:53:44 +03:00
simon.ogorodnik c29c140a9c [FIR] Qualifier resolve 2020-02-19 17:53:44 +03:00
Sergey Igushkin 723ebb4f57 Fix compileOnly dependencies in HMPP (KT-36469)
The `compileOnly` configuration of a source set was not included in the
granular dependency transformation, which led to the dependencies from
the configuration being excluded as unrequested during dependency
processing.

Fix this by properly including the compileOnly scope into the
dependencies transformation.

Issue #KT-36469 Fixed
2020-02-19 17:30:46 +03:00
Sergey Igushkin 9b861739cd Include the production artifacts in friend paths (KT-35942)
In some setups, the friendArtifacts that we had in addition to direct
associate compilations' output classes were insufficient. For example:

1. When an Android module's tests depend on another module which
   transitively depends on the module containing tests: then the AGP
   API doesn't tell us that there are artifacts from the tested
   variant, but instead there's just the module's artifact.

2. Similar case but without Android, and if the classes are read from
   the module's artifact rather than the production output classes dir,
   then they are definitely not on the friend paths (which include the
   production classes dirs and not the the production artifact).

In both cases, the friendArtifacts mechanism allows us to add those
potential sources of the friend classes to the friend paths.

Issue #KT-35942 Fixed
2020-02-19 17:30:45 +03:00
Vladimir Dolzhenko 4eb04af01e Add checkStability to perf tests 2020-02-19 15:26:19 +01:00
Denis Zharkov a6cf16ddfc FIR: Fix test data for FirMultiModuleResolveTestGenerated 2020-02-19 17:21:11 +03:00
Roman Golyshev 46ae6136cb Rewrite RedundantSamConstructorInspection to support more cases
- Now inspection does not rely on synthetic descriptors at all, instead
it uses `SamConversionOracle` and `SamConversionResolver` to detect
if the argument type support SAM conversion
- This transparently considers all language features like
`SAM conversions for kotlin functions`, `Functional interfaces` etc.
- In case of multiple SAM arguments, part of them can be converted only
when `SAM conversion per argument` is enabled
- Fix inspection and nj2k tests that were failing because of better
working inspection
- Rewrite automatically fixes multiple bugs that were present
- ^KT-36367 ^KT-36368 ^KT-36296 ^KT-36395 Fixed
2020-02-19 17:16:17 +03:00
Roman Golyshev 9b5110b9f3 Refactor RedundantSamConstructorInspection
- Does not change the behaviour
2020-02-19 17:16:17 +03:00
Roman Golyshev 3122760c49 Add more tests for RedundantSamConstructorInspection
- All those tests already pass, they are needed to fix the behaviour of the inspection before the changes
2020-02-19 17:16:17 +03:00
Victor Petukhov e8524137c3 NI: exclude not fixed type variables from types on which null checks should be generated
^KT-36371 Fixed
2020-02-19 15:58:08 +03:00
Victor Petukhov f10696da5e Fix formatting of RuntimeAssertion.kt 2020-02-19 15:58:08 +03:00