Commit Graph

87304 Commits

Author SHA1 Message Date
Dmitriy Dolovov e7caaa464e [Test] Fix using classes as annotation parameters in generated classes 2021-11-11 12:32:53 +03:00
Dmitriy Dolovov f3397dfeca [Native][tests] Fix "outputChecker cannot be serialized" Gradle issue 2021-11-11 12:32:47 +03:00
Ilya Muradyan 57543f5b19 [scripting] Fix NPE in aether.kt 2021-11-11 11:27:07 +03:00
Alexander Udalov 27cfcb9b3d IR: fix thisReceiver parameter type for function classes
Incorrect builder was used at line 269, which led to non-sensible type
in `IrClass.thisReceiver` for function types, such as
`SuspendFunction1<SuspendFunction1, SuspendFunction1>` in the linked
issue.

Avoid creating types manually completely to simplify this code and fix
the bug.

 #KT-49168 Fixed
2021-11-10 21:58:41 +01:00
Igor Laevsky 5b9268a108 [Wasm] Publish kotlin-test-wasm to maven 2021-11-10 22:12:20 +03:00
Denis.Zharkov 6e15ee8fea FIR: Refine callable reference resolution in assignment position
synthetic_select<() -> T>(::foo) form allows to select better candidate
than synthetic_select(::foo) with expect type `() -> T`
2021-11-10 22:00:01 +03:00
Denis.Zharkov 65d7da122f FIR: Fix invalid INITIALIZER_TYPE_MISMATCH for suspend lambda 2021-11-10 22:00:01 +03:00
Denis.Zharkov 994040c91c FIR: Support invoke convention on super-qualified calls 2021-11-10 22:00:00 +03:00
Ilya Kirillov 0c7728f64a Analysis API: fix PsiType creation for type parameter type with flexible upper bound 2021-11-10 18:49:43 +01:00
Svyatoslav Kuzmich 03c352c11e [Wasm] Lower complex external declarations
- Properties
- Member functions
- Object declarations
- Constructors
- Classes with instance checks
2021-11-10 19:48:11 +03:00
Svyatoslav Kuzmich c0761bf34a [Wasm] Support callable references to external functions
1. Move jsInteropFunctionsLowering after callable reference lowering,
  so it can continue to deal with just functions and function calls.
2. Generate lowered closure class in JsInteropFunctionsLowering because
2021-11-10 19:48:10 +03:00
Dmitry Petrov 916379c0e7 JVM KT-49613 use adapter for indy reference to protected constructor 2021-11-10 19:37:27 +03:00
Dmitry Petrov 76bdf4ff1a JVM KT-49548 extra test 2021-11-10 19:37:25 +03:00
Dmitry Petrov 9a4cff0dc7 JVM KT-49548 progression iterators can be tainted 2021-11-10 19:37:24 +03:00
Ivan Kochurkin 646d156bde [FIR] Reuse calculated values and clean up code 2021-11-10 19:07:27 +03:00
Ivan Kochurkin 0dab39b6e3 [FIR] Get rid of unnecessary allocations 2021-11-10 19:07:27 +03:00
Ivan Kochurkin c9ad2b3bf9 [FIR] Ignore visited super types during bypass in FirInconsistentTypeParameterHelpers
Get rid of potential exponential complexity
2021-11-10 19:07:26 +03:00
Ivan Kochurkin 6e57341a3d [FIR] Remove not used FirNotASupertypeChecker 2021-11-10 19:07:26 +03:00
Ivan Kochurkin a57c8ee9e8 [FIR] Remove not used transformAllStatementsExceptLast from FirExpressionUtil 2021-11-10 19:07:25 +03:00
Ivan Kochurkin ee490128fc [FIR] Optimize FirDeprecationChecker 2021-11-10 19:07:25 +03:00
Ivan Kochurkin 13865e52f8 [FIR] Optimize FirJvmDefaultChecker 2021-11-10 19:07:24 +03:00
Ivan Kochurkin 6fd4c67bbb [FIR] Optimize FirInterfaceDefaultMethodCallChecker
Reduce calls of getClassLikeSymbolByClassId
2021-11-10 19:07:23 +03:00
Alexander Udalov bb390dca16 Minor, improve kdoc for KValueParameter.type/varargElementType
Slightly related to e77f72071d.
2021-11-10 16:12:56 +01:00
Alexander Udalov fbd20b6556 Remove unused JvmTypeAliasExtensionVisitor and JvmValueParameterExtensionVisitor
They were added in e4702bf438 and a08cf59017 but in fact they are not
needed on JVM until there are JVM-specific extensions in the metadata.

Moreover, there was a typo in JvmValueParameterExtensionVisitor's
superclass (see https://github.com/JetBrains/kotlin/pull/4613).
2021-11-10 16:12:56 +01:00
Svyatoslav Scherbina ea7160947a Native: enable lazy IR generation before running fake override builder
^KT-48816 Fixed

Native compiler uses lazy IR for declarations provided by cinterop.
The problem: `FakeOverrideBuilder` requests super types during
type checking, accessing `.owner` for them. So if a type and super type
are represented as lazy IR, and lazy IR generation is not enabled yet,
then the super type symbol won't be bound by this moment, and the access
will fail.

This happens in KT-48816: fake override builder tries to access `.owner`
for `IrClassSymbol` of `NSObject` (super type of `NSDate` and `NSUUID`).

Fix this by enabling lazy IR generation before building fake overrides.
2021-11-10 12:30:12 +00:00
Nikolay Krasko b76e670ad5 Allow disabling retry tests with parameters on CI 2021-11-10 02:49:54 +03:00
Mads Ager 604f217360 [FIR] Report properties from java methods in Fir2IrLazyClass.
This shows up in annotation instantiation tests where we need
to make sure to generate a property on the annotation implementation
class for such properties.
2021-11-09 23:51:49 +03:00
Mads Ager b79ca7d7df [FIR] Allow annotation instantiation.
This commit disables the frontend error reporting for supported cases.
2021-11-09 23:51:48 +03:00
Ilya Muradyan 56d472451c Mark packages for relocation to fix classpath interferring in main-kts
KT-49476 fixed
2021-11-09 23:04:05 +03:00
Svyatoslav Kuzmich 83c94cc944 [Wasm] Name section for globals and structs 2021-11-09 19:54:27 +00:00
Svyatoslav Kuzmich a5aee29baa [Wasm] Fix createDirectoryToRunInBrowser
Helper function to import stringFromWasm no longer needed.
2021-11-09 19:54:26 +00:00
Alexander Udalov 1071919706 Remove backend tests on old inference
Also remove any mentions of NewInference, and rename some tests.
2021-11-09 20:07:33 +01:00
Alexander Udalov 3626b1df44 Psi2ir: remove support for disabling SamConversionPerArgument 2021-11-09 20:04:29 +01:00
konstantin.tskhovrebov d5ab0382f6 Revert "Update K/N version to "1.6.20-dev-3759""
This reverts commit d119976b46.
2021-11-09 22:03:09 +03:00
Mikhail Glukhikh 8ac4507a1f FIR2IR: simplify/generify declaration caching code 2021-11-09 21:04:41 +03:00
Mikhail Glukhikh 3d60064310 Extract & reuse ConeKotlinType.findClassRepresentation in FIR2IR 2021-11-09 21:04:40 +03:00
Mikhail Glukhikh 6eaeada1e6 FIR: cache properties in use-site scope properly 2021-11-09 21:04:40 +03:00
Mikhail Glukhikh f2c734fc02 FIR2IR: add another fallback for simple synthetic property 2021-11-09 21:04:39 +03:00
Mikhail Glukhikh b50350f6a5 FIR2IR: add fallback for a synthetic property override situation 2021-11-09 21:04:39 +03:00
Mikhail Glukhikh 67a05883d6 FIR2IR: create local classes on the fly properly 2021-11-09 21:04:38 +03:00
Mikhail Glukhikh a05244eca1 FIR: don't enhance synthetic property if not needed 2021-11-09 21:04:38 +03:00
Mikhail Glukhikh 6b1da9eb70 Rename: generateAccessorSymbol -> generateSyntheticPropertySymbol 2021-11-09 21:04:37 +03:00
Mikhail Glukhikh 5a44fda42c FIR2IR: bind fake override calls via symbol table 2021-11-09 21:04:37 +03:00
Mikhail Glukhikh d4cdf874be FIR2IR: add fake override generation for built-in classes 2021-11-09 21:04:36 +03:00
Mikhail Glukhikh 0622a47493 FIR2IR: implement early f/o overridden symbols binding #KT-42784 Fixed
Related to KT-49288
2021-11-09 21:04:36 +03:00
Mikhail Glukhikh 5b6e21690b FIR2IR: call fake overrides properly #KT-49288 Fixed 2021-11-09 21:04:35 +03:00
Dmitriy Novozhilov ec079a2663 [Build] Add runtime dependency on descriptors.runtime to tests for low level api
This is needed to keep ability to run those tests using JPS
2021-11-09 20:06:11 +03:00
Dmitriy Novozhilov 0a902c1bef [Build] Remove dist_root artifact from JPS project configuration
This artifact was used to build compiler artifact during each project
  build, which is not needed for running compiler tests. Removal of
  this artifact from build chain reduces time of build for ~3 seconds
  which is a lot for rebuilds after minor changes (which are usually
  take only few seconds)
2021-11-09 20:06:08 +03:00
sebastian.sellmair 1a0e2ad074 [Gradle][MPP] Composite metadata jar: Use "$sourceSetName-cinterop" directory for cinterops
This convention seems to be more robust against clashes against user
specified source set names. We could potentially foresee users to
use "cinterop" as source set name, but the pattern
 $sourceSetName-cinterop seems robust enough.

^KT-49596 Verification Pending
2021-11-09 16:34:33 +00:00
sebastian.sellmair ea669ce076 [Gradle][MPP] Assert sourceSetCInteropMetadataDirectory on deserialized older metadata files
^KT-49596 Verification Pending
2021-11-09 16:34:33 +00:00