Commit Graph

87485 Commits

Author SHA1 Message Date
Dmitriy Novozhilov 2aa027639c [FIR] Fix access to fields from super class
^KT-49654 Fixed
2021-11-16 15:48:08 +03:00
Dmitriy Novozhilov e7c9d76163 [FIR] Use SupertypeSupplier in type resolver for calculating supertypes
This is needed to avoid problems with checking visibility of types which
  are used in supertypes during supertypes resolution in IDE, when
  supertypes of some class can be already computed, but not saved in
  class itself, but still lay in supertypeComputationSession

There were 4 failing tests before this changes (all in
  `DiagnosisCompilerTestFE10TestdataTestGenerated$Tests$Exposed`):
- testInternal
- testInternalAndProtected
- testProtected
- testProtectedSameWay
2021-11-16 15:48:07 +03:00
Dmitriy Novozhilov 499b97d51e [FIR] Fix setting file in supertypes resolution
^KT-49652 Fixed
2021-11-16 15:48:06 +03:00
Svyatoslav Scherbina e11ffc75e4 IR: remove default undefined offsets from createTemporaryVariableDeclaration
Scope.createTemporaryVariableDeclaration has default values for
startOffset and endOffset parameters, which are UNDEFINED_OFFSET.

This is error-prone. Caller should typically be able to pass proper
offsets. If not, let using undefined offsets at least be explicit.

Remove default values for startOffset and endOffset parameters in
Scope.createTemporaryVariableDeclaration
2021-11-16 11:59:56 +00:00
Svyatoslav Scherbina 2f5706597a IR: fix offsets in irTemporary
The variable generated by IrStatementBuilder.irTemporary doesn't inherit
startOffset and endOffset from the builder. In particular, as a result,
temporary variables generated for elvis operator left operand have
UNDEFINED_OFFSET.

Additionally, ProvisionalFunctionExpressionLowering copies the offsets
of a variable to lowered lambda in the variable initializer. With the
problem described above, this causes invalid debug information in
Kotlin/Native, see KT-49360.

Fix irTemporary by using builder's offsets for the variable.

^KT-49360 Fixed
2021-11-16 11:59:55 +00:00
Mikhail Glukhikh fb859c0270 FIR: add error messages for new inference errors 2021-11-16 14:18:25 +03:00
Mikhail Glukhikh 4ad790874e Drop empty FirDefaultErrorMessages.kt 2021-11-16 14:18:25 +03:00
Elena Lepilkina c06875b8e9 [K/N] Added test for exceptions behaviour in case of dynamic libs (KT-47828) 2021-11-16 10:44:53 +00:00
Dmitriy Novozhilov 167a4c6b97 [Build] Add dependency on :core:descriptors.runtime to spec tests
This is needed to run those tests via JPS
2021-11-16 13:29:13 +03:00
Dmitriy Novozhilov 62b774b2e3 [FE 1.0] Properly report INTEGER_OPERATOR_RESOLVE_WILL_CHANGE
^KT-38895
2021-11-16 13:29:12 +03:00
Pavel Kunyavskiy 21444d6be8 [K/N] Optimize and get rid of recursion in SCC search in Devirtualization 2021-11-16 08:27:41 +00:00
Alexander Udalov 38273e6b3c Minor, remove comments in JvmContentRoots.kt, suppress unused
The kdocs were almost self-evident, as opposed to the fact that
JvmClasspathRoot is unused in the project, which could make it a victim
of an innocent refactoring.
2021-11-16 02:20:52 +01:00
aragos 466acc6132 Allow the usage of virtual JVM content roots in kotlinc (#4645) 2021-11-16 02:20:40 +01:00
Ivan Kochurkin 6ec0d94f1d [FIR] Temporary convert CANNOT_CHECK_FOR_ERASED to warning 2021-11-16 01:07:37 +03:00
Nikolay Krasko 4dc45a4118 Drop sources and javadoc artifacts for kotlin-test-wasm
There's a source and javadoc validation in sonatype that
once *-sources.jar or *-javadoc.jar is found expect main
jar must be present as well.

This doesn't work when instead of jar we publish klib.
2021-11-15 19:54:56 +03:00
Igor Yakovlev 71bf36b613 [JS] Fix test testdata for InlineMultiFile.testTrait test 2021-11-15 19:53:50 +03:00
Igor Yakovlev a7f0f62f69 [WASM] Generate missing WASM tests and mute failing ones 2021-11-15 19:53:49 +03:00
Igor Yakovlev ec9fcce1bc [WASM] Add hashCode, equals and toString to KClass and KType implementations 2021-11-15 19:53:48 +03:00
Igor Yakovlev ee7f4c7278 [WASM] Implementation typeOf support 2021-11-15 19:53:48 +03:00
Igor Yakovlev 39a389c49a [WASM] Implementation qualifiedOrSimpleName 2021-11-15 19:53:47 +03:00
Igor Yakovlev ce360bb10b [WASM] Implementation of Class references 2021-11-15 19:53:46 +03:00
Igor Yakovlev d9f2bd7963 Revert "[Wasm][Temporary] Stubs for typeOf and ::class constructs"
This reverts commit 8dc81b6c57.
2021-11-15 19:53:45 +03:00
sebastian.sellmair 7d56ef1925 [Gradle, MPP] Implement kotlin.mpp.absentAndroidTarget.nowarn flag
^KT-41641 Verification Pending
2021-11-15 16:15:18 +00:00
sebastian.sellmair c56c503426 [Gradle] Implement 'Project.kotlinPropertiesProvider' extension
This extension should increase discoverability over the previous
'PropertiesProvider(project)' API
2021-11-15 16:15:17 +00:00
sebastian.sellmair 373dcef45d [Gradle, MPP] Mention multiplatform in absent android target warning
^KT-41641 Verification Pending
2021-11-15 16:15:17 +00:00
sebastian.sellmair bf04f821d6 [Gradle, MPP] Print warning on absent 'android' targets
^KT-41641 Verification Pending
2021-11-15 16:15:16 +00:00
sebastian.sellmair db21bfe13b [Gradle, MPP] findAndroidTarget: Return null when missing
Prior to this change a 'Collection is empty.' error was reported
when the Android plugin was applied without an Android Kotlin target
being registered.

^KT-41641 Verification Pending
2021-11-15 16:15:16 +00:00
Igor Laevsky c7cfa97748 [Wasm] Implement Any::hashCode() 2021-11-15 18:26:46 +03:00
Igor Laevsky 9e00a2c5b4 [Wasm] Implement platform random in stdlib 2021-11-15 18:26:45 +03:00
Igor Laevsky 1bdc9edb20 [Wasm] Implement Jasmine adapter for kotlin.test 2021-11-15 18:26:44 +03:00
Dmitriy Dolovov 7ed3941580 [Native][tests] Update generated tests 2021-11-15 18:24:58 +03:00
Dmitriy Dolovov 503f159f4d [Native] External tests: Preserve original line offsets 2021-11-15 18:15:43 +03:00
Dmitriy Dolovov cc667189ec [Native] External tests: Don't clean up test directives
This does not make sense anymore since external test data files are patched during test execution on the fly.
2021-11-15 18:15:43 +03:00
Dmitriy Dolovov 61b8fb8fc2 [Native][tests] Allow overriding test properties via Gradle properties 2021-11-15 18:15:43 +03:00
Dmitriy Dolovov a029b50755 [Native][tests] Enable codegen_box_callableReference/genericConstructorReference.kt 2021-11-15 18:15:42 +03:00
Dmitriy Dolovov 4900aa673b [Native][tests] Fix formatting of error message about failed test 2021-11-15 18:15:42 +03:00
Dmitriy Dolovov 9c70d5088c [Native][tests] Don't warn when committed TestFile is committed again
Actually, there is nothing wrong with calling commit() again: Some TestFiles are created as uncommitted and require calling commit(), while others are created as committed from the very beginning.
2021-11-15 18:15:42 +03:00
Dmitriy Dolovov 407e82adbb [Native][tests] Minor. Make computePackageName() a bit more comprehensive 2021-11-15 18:15:42 +03:00
Dmitriy Dolovov e30f33b18d [Native][tests] Minor. Prefer to use raw string literals for better readability 2021-11-15 18:15:42 +03:00
Dmitriy Dolovov e5bb16c750 [Native][tests] Minor. Comments formatted 2021-11-15 18:15:42 +03:00
Dmitriy Dolovov 24f00f8fda [Native][tests] Warn when committed TestFile is committed again 2021-11-15 18:15:42 +03:00
Dmitriy Dolovov c014daf1b2 [Native][tests] Minor. Simplify StandardTestCaseGroupProvider.runForFirstMeaningfulStatement() 2021-11-15 18:15:42 +03:00
Dmitriy Dolovov 0e1c60d5ab [Native][tests] Split TestExecutable -> TestExecutable/TestRun (part 2) 2021-11-15 18:15:42 +03:00
Dmitriy Dolovov 55a2d5cb4a [Native][tests] Minor. Rename internal functions 2021-11-15 18:15:42 +03:00
Dmitriy Dolovov fb0dda5a24 [Native][tests] Use ThreadSafeCache instead of ConcurrentHashMap 2021-11-15 18:15:42 +03:00
Dmitriy Dolovov c219e53634 [Native][tests] Minor. Prefer using JUnit assertions over Kotlin checks 2021-11-15 18:15:42 +03:00
Dmitriy Dolovov e21c9fe3b2 [Native][tests] Drop useless generated test suite class 2021-11-15 18:15:41 +03:00
Dmitriy Dolovov 4bc48ea466 [Native][tests] Split TestExecutable into TestExecutable and TestRun
The latter keeps the list of run parameters now. It's assumed that the same TestExecutable instance can be run with different TestRuns.
2021-11-15 18:15:41 +03:00
Dmitriy Dolovov 6cef8c1f91 [Native][tests] Minor. Drop unused function 2021-11-15 18:15:41 +03:00
Dmitriy Dolovov ce4d2093cc [Native][tests] Use the single 'generateTests' task 2021-11-15 18:15:41 +03:00