Commit Graph

68709 Commits

Author SHA1 Message Date
Dmitriy Novozhilov ca031f7ace [FIR] Split ResolveUtils.kt from :resolve to separate files 2020-09-01 12:00:10 +03:00
Dmitriy Novozhilov 6ace4164ff [FIR] Split TypeUtils from :resolve to :cones and :tree modules 2020-09-01 12:00:10 +03:00
Dmitriy Novozhilov 92ffa4dea9 [FIR] Replace KotlinScopeProvider with FirScopeProvider in ClassDeserialization
This is needed to remove dependecy on :fir:resolve from serialization
  methods
2020-09-01 12:00:10 +03:00
Mikhail Glukhikh 3aa13362ca [FIR2IR] Replace NPE in setThisReceiver with more detailed exception 2020-09-01 11:40:32 +03:00
Mikhail Glukhikh 65739c50d3 FIR full pipeline test: output build status per-module 2020-09-01 11:40:32 +03:00
Pavel Kirpichenkov 2979c37001 [NI] Fix resolution status for UnstableSmartCastDiagnostic
RESOLVED_WITH_ERROR was initially added for reproducing OI behavior.
The intention was to preserve resolution into unstable smart cast and to keep failing candidate.
However, this idea was abandoned after OI behavior proved inconsistent in cases involving generics.

This commit restores RUNTIME_ERROR status of UnstableSmartCastDiagnostic.

^KT-41357 Fixed
2020-09-01 11:21:13 +03:00
Igor Chevdar 5e71068e61 [IR] Handled degenerate cases of IrStringConcatenation
It is not needed to create StringBuilder if the number of values
being concatenated is 0 or 1
2020-09-01 11:34:17 +05:00
Dmitriy Dolovov 74dce725cc [Commonizer] Tests for missed supertypes in commonized type aliases
^KT-41247
2020-09-01 13:11:33 +07:00
Dmitriy Dolovov 96736b0126 [Commonizer] Add missed supertypes in commonized type aliases
^KT-41247
2020-09-01 13:11:27 +07:00
Dmitriy Dolovov e21d99334b [Commonizer] Lookup common descriptors that don't participate in commonization (for tests only)
This is necessary to run integration tests with fake declarations from
Kotlin/Native stdlib that are absent in stdlib-common.
2020-09-01 13:11:22 +07:00
Dmitriy Dolovov ed78169051 [Commonizer] README: Describe the case when target is not available 2020-09-01 13:11:16 +07:00
Nikolay Krasko 56f0fb6c70 Prevent test failures because of Leaked Android SDK
Stop implicit adding additional SDK from environment variables in
GradleSpecificInitializer and AndroidSdkInitializer.
2020-08-31 21:18:26 +03:00
Steven Schäfer 78ab957bfe JVM IR: Fix mangling for suspend functions with inline class params (KT-41374) 2020-08-31 18:43:29 +02:00
Igor Yakovlev 48a3d4b8e0 [ULC] Add recursion guard to getLightClass
Fixed KT-41325
2020-08-31 18:01:37 +03:00
Pavel Kirpichenkov 873224dfbc [NI] Use new type substitutor for known type parameters
Use known type parameters substitutor after substitutor for fresh variables.
The old logic of substituions had the following order:
- replace known type parameters
- replace type parameters with type variables
- complete inference
- replace type variables with inferred types

According to the updated logic, replacement goes as follows:
- replace type parameters with type variables
- replace known type parameters; if they were variables, this will effectively remove them from inference
- complete inference
- replace remaining type variables with inferred types

Support projection substitution in new type substitutor.
It is needed for correct interaction with old type substitutor.
Old type substitutors can contain mappings constructor -> projection
which couldn't be expressed correctly with existing substitutor API in some cases.

^KT-41386 Fixed
2020-08-31 17:53:46 +03:00
Alexander Udalov c706673de9 Minor, refactor bytecode text tests on when-over-string optimization
- Merge `duplicatingItemsSameHashCode.kt` and
  `duplicatingItemsSameHashCode2.kt` into one test enabled on both
  backends, and rename it to
  `duplicatingItemsSameHashCodeFewBranches.kt`.
- Rename `duplicatingItemsSameHashCode3.kt` to
  `duplicatingItemsSameHashCodeMoreBranches.kt`, and also enable it for
  both backends.
- Use JVM_TEMPLATES/JVM_IR_TEMPLATES to check backend-specific behavior:
    1) JVM IR does not optimize less than 2 branches by design
    2) JVM IR does not generate duplicate branches, also by design

Related to KT-36846.
2020-08-31 16:47:11 +02:00
Alexander Udalov a639915a34 JVM IR: do not mangle property accessors of unsigned types in annotations
Before this change, we incorrectly mangled the names of annotation
methods (e.g. `getI-pVg5ArA` instead of `i`) because the isSpecial
condition was false.
2020-08-31 14:19:14 +02:00
Mikhail Glukhikh 1e360d9c91 [FIR2IR] Pass type context for type argument conversion properly 2020-08-31 14:31:58 +03:00
Jinseong Jeon 04af6846a7 FIR2IR: handle more vararg spreads for adapted callable references 2020-08-31 14:31:58 +03:00
Mikhail Glukhikh 5efabe063e [FIR] Fix JVM mapped function callable id 2020-08-31 14:31:57 +03:00
Mikhail Glukhikh db815c96c5 [FIR] Substitute copied type parameters in fake override properties 2020-08-31 14:31:57 +03:00
Mikhail Glukhikh dc9306367a FirClassSubstitutionScope: reorder companion functions 2020-08-31 14:31:57 +03:00
Mikhail Glukhikh 5ad453d927 [FIR] Substitute copied type parameters in fake override functions 2020-08-31 14:31:57 +03:00
Mikhail Glukhikh 458f89ef33 [FIR] Signature composer: return null signature for local declarations 2020-08-31 14:31:57 +03:00
Mikhail Glukhikh 02b6f34067 [FIR2IR] Add extension receiver parameter to delegated members 2020-08-31 14:31:57 +03:00
Mikhail Glukhikh 22c63c4e80 [FIR2IR] Add supertypes to delegated member type parameters 2020-08-31 14:31:56 +03:00
Mikhail Glukhikh 9ad55a0ee3 [FIR2IR] Don't create list under the hood in DelegatedMemberGenerator 2020-08-31 14:31:56 +03:00
Mikhail Glukhikh 5384ccf02f [FIR] Introduce & use FirDelegatedMemberScope 2020-08-31 14:31:56 +03:00
Mikhail Glukhikh f0af930288 [FIR] Eliminate unused FirDelegatedTypeRef 2020-08-31 14:31:56 +03:00
Mikhail Glukhikh ede910065a [FIR] Add problematic resolve test case with delegated super call 2020-08-31 14:31:56 +03:00
Mikhail Glukhikh 3f5beb77e8 [FIR2IR] Cache delegatable members properly 2020-08-31 14:31:55 +03:00
Alexander Udalov 1e712f8398 IR: remove IrElementVisitorVoidWithContext
It was only used as a superclass in IrInlineReferenceLocator and
LocalDeclarationsLowering. In both cases it's clearer and more optimal
to pass the necessary data via the visitor 'data' variable.
2020-08-31 12:47:54 +02:00
Alexander Udalov 5e48be3d11 Add a fallback flag -Xno-unified-null-checks for KT-22275
#KT-41482 Fixed
2020-08-31 12:43:28 +02:00
Ilya Kirillov 40669350f7 Wizard: navigate to wizard help page when clicking help button 2020-08-31 12:50:01 +03:00
Ilya Kirillov fa847d758d Wizard: use compileKotlin for groovy instead of direct KotlinCompile task access
#KT-38921 fixed
2020-08-31 12:49:48 +03:00
Ilya Goncharov e672f5f8e3 [Wizard, JS] Remove duplicating descriptions 2020-08-31 12:19:10 +03:00
Ilya Goncharov 554c67cd1d [Wizard, JS] Add descriptions to wizard options 2020-08-31 12:16:54 +03:00
Nicolay Mitropolsky af35b6c3c8 Provide icons to Kotlin Light-elements (KT-26235) 2020-08-31 10:54:46 +03:00
Igor Chevdar 527de030fc [box-tests] Turned on some tests for K/N 2020-08-31 12:01:31 +05:00
Igor Chevdar ab54e43b00 [IR] Commonized SAM equals/hashCode builder 2020-08-31 12:01:29 +05:00
Igor Chevdar 12ddd137bc [IR] Moved isLambda to common IR utils 2020-08-31 12:01:29 +05:00
vldf b050ef9970 [FIR] Remove print in UnusedChecker 2020-08-30 14:18:01 +03:00
Ilya Gorbunov 9c3ff6828a Export kotlin.test packages with annotations and underlying frameworks
- Add exports for jvm package names used in kotlin.test annotations;

- Export transitively underlying test framework modules
Otherwise "This class does not have a constructor" happens when using
an aliased annotation, e.g. kotlin.test.Test aliased to org.junit.test

KT-41320
2020-08-29 03:33:38 +03:00
Andrey.Lozhkin ef57c62576 [Gradle, Cocoapods] refactor I/O, improve Up-To-Date
all synthetic tasks are per pod
tasks receive parts of extension as inputs
2020-08-29 01:51:20 +03:00
Andrey.Lozhkin 1888462dc0 [Gradle, Cocoapods] move tasks from per target
podGen now per Family
podSetupBuild and podBuild now per sdk
2020-08-29 01:51:20 +03:00
Andrey Lozhkin fcf5060907 [Gradle, Cocoapods] implement DSL to support Cocoapods Dependencies from Git or Web
Issue #KT-41367 Fixed
2020-08-29 01:51:20 +03:00
Steven Schäfer b02f0f0a25 JVM IR: Fix compilation of nested inner classes 2020-08-28 20:03:19 +02:00
Steven Schäfer 02e78bcd76 JVM IR: Use package visibility for fields of captured variables 2020-08-28 20:03:19 +02:00
Roman Artemev 443269af0a [IR] Drop irProviders from stub generator 2020-08-28 18:14:05 +03:00
Roman Artemev 39808789c3 [KLIB] Fix SOE in K/N
- fixes KT-41324
2020-08-28 18:14:04 +03:00