Commit Graph

93985 Commits

Author SHA1 Message Date
Dmitry Gridin 716efa60df [light classes] drop redundant receiver from createTypeFromCanonicalText
^KT-53097
2022-08-01 13:56:38 +00:00
Dmitry Gridin 1514d5f563 [light classes] drop redundant KtLightClassForSourceDeclaration#forceUsingOldLightClasses
^KT-53097
2022-08-01 13:56:37 +00:00
Dmitry Gridin be45a329d6 [light classes] drop redundant KtLightSimpleModifierList
^KT-53097
2022-08-01 13:56:36 +00:00
Dmitry Gridin 9606d49379 [light classes] drop redundant KtUltraLightSupport from annotations
^KT-53097
2022-08-01 13:56:35 +00:00
Dmitry Gridin 4f18e7091b [light classes] analysis-api-fir: migrate from :compiler:backend to :compiler:backend.common.jvm
^KT-53097
2022-08-01 13:56:35 +00:00
Dmitry Gridin 1708b4fe48 [light classes] move light-classes-base module to analysis
^KT-53097
2022-08-01 13:56:34 +00:00
Svyatoslav Scherbina 1b131332ab [Native][tests] Simplify handling opt-ins in the test launcher
For a box test, the test engine generates a test launcher -- a function
that calls `box` function. The latter might require an opt-in. To deal
with this, the test engine was using some heuristics to detect possibly
used opt-ins and applied them to the test launcher.

This commit provides an alternative solution -- it uses
`@Suppress("OPT_IN_USAGE_ERROR")` annotation for the test launcher. This
way, it doesn't have to guess which opt-ins to apply.
2022-08-01 15:24:15 +02:00
Svyatoslav Scherbina 09c131afd2 [Native][tests] Add standalone test for KClass package names
To ensure that after introducing `ReflectionPackageName` annotation,
we still have tests that check KClass package names without it.
2022-08-01 15:24:15 +02:00
Svyatoslav Scherbina c1853a0218 [Native][tests] Introduce NATIVE_STANDALONE directive
This directive makes the test standalone, i.e. disables grouping it with
other tests into a single compilation, and in particular disables
package renaming for the test.

Also, remove the old hard-coded way to mark tests standalone.
2022-08-01 15:24:10 +02:00
Svyatoslav Scherbina d50b0693b2 [Native][tests] Don't make typeOf tests standalone
The test engine detected tests using typeOf and made them "standalone",
i.e. disabled test grouping and thus package renaming for them, to keep
the reflection information intact.

Now, with `ReflectionPackageName` annotation, this is not required
anymore.
2022-08-01 15:23:38 +02:00
Svyatoslav Scherbina cee0731cef [Native][tests] Keep reflection package name when renaming packages
The test engine renames packages in test files to allow group many tests
into single compilation for performance reasons.

As a result, reflection APIs return different package names. To deal
with this, the test engine uses certain heuristics to detect tests using
reflection APIs, and disables grouping (and thus package renaming) for
them.

This commit provides an alternative solution for the same problem --
now the test engine instructs the compiler to use original package names
for reflection information, by means of the introduced
`ReflectionPackageName` annotation.
2022-08-01 15:23:32 +02:00
Svyatoslav Scherbina 38723816b7 [Native][tests] Fix file annotation patching in test files
Previously, the test engine was copying @file:OptIn annotations from
each file to all the other files inside the same test data, and also was
removing other file annotations in certain cases.

Now it only adds the opt-ins specified with `!OPT_IN` directives, and
doesn't remove anything.
2022-08-01 15:23:19 +02:00
Artem Kobzar 0cef573a7b [K/JS] test(@JsExport): add few more tests on export after ExportModel discussion meeting. 2022-08-01 12:17:35 +00:00
Pavel Mikhailovskii 76f92eac69 Trivia. A better wording in a documentation comment. 2022-08-01 11:51:37 +02:00
Mads Ager e46540729c Fix equality for generated test files.
They were compared based on the name of the file only disregarding
the module. Therefore, the test framework would only patch
package declarations for one file with a given name even if there
were multiple files with that name in different packages.
2022-08-01 08:57:17 +00:00
Mads Ager 59c2bde10a [K/N] Unmute passing tests. 2022-08-01 08:57:16 +00:00
Igor Yakovlev c2d62b37e6 [WASM] Enable stdlib tests 2022-07-29 19:50:31 +02:00
Yahor Berdnikau 21b8e1a0c8 Fix Kapt generate stubs doesn't know about java sources from main task
Restore configuration to set to KaptGenerateStubsTask java sources
set to related KotlinCompile task.

^KT-52761 Fixed
2022-07-29 16:52:47 +00:00
Roman Golyshev bcd6a54ffb [Analysis API FIR] Fix small mistake in KDocReferenceResolver
`owner` is a PSI element, it can never be an instance of
`KtConstructorSymbol`

Also, make `MutableCollection` an extension receiver instead of context
receiver for the consistency
2022-07-29 17:13:52 +02:00
Artem Kobzar fb32af1c02 [K/JS] feat: eliminate usage of kotlin.reflection if there is just raw js class usage. 2022-07-29 14:22:19 +00:00
Artem Kobzar b9189be728 [K/JS] fix(KT-46643): prevent removal of setter for overridden external field. 2022-07-29 12:41:17 +00:00
Ilya Goncharov 1c39042e7a [Gradle, JS] Compatibility breaking changes for css and scss support
This reverts commit 487e854f60.

^KT-53367 fixed
2022-07-29 12:35:57 +00:00
Pavel Kunyavskiy 51651aef74 [K/N] Basic support of thread sanitizer for generated code 2022-07-29 11:15:18 +00:00
konstantin.tskhovrebov 6efe416258 Cocoapods: fix local path to downloaded and extracted pod archive. 2022-07-29 12:49:39 +02:00
Mads Ager efde7c53d2 Remove reference to System.out.println from test.
This makes the test usable for non-jvm targets as well.
2022-07-29 09:34:53 +00:00
Artem Kobzar 9a57c6ccc3 [K/JS] feat(Generated TS validation): add a new property and gradle task to validate generated by the IR compiler typescript declaration files. 2022-07-29 09:26:12 +00:00
Martin Bonnin 20bc46e06e add KDoc for entryPoint 2022-07-29 11:01:38 +02:00
Steven Schäfer 7e472301b6 Re-enable "JVM IR: Move direct invoke optimization into a separate pass" 2022-07-29 01:06:44 +02:00
Steven Schäfer 6f0ff6aeb0 IR: Fix scope transparency in ReturnableBlockLowering
An IrReturnableBlock introduces a new variable scope and shouldn't be
replaced with a transparent IrComposite block.
2022-07-29 01:06:44 +02:00
Ilmir Usmanov b93c000250 Make suspend fun, where suspend is a function error in 1.9
instead of 1.8.

 #KT-49264
2022-07-28 21:03:07 +02:00
Igor Chevdar 92109a6bef [IR][inliner] Reworked local classes in inline lambdas
#KT-52795 Fixed
2022-07-28 16:01:18 +00:00
Igor Chevdar 8981eb85de [box-tests] Added a couple of reproducers for KT-52795 2022-07-28 16:01:17 +00:00
Vladimir Sukharev 412f07c55b Call toString() within known class, during string concatenation type narrowing
^KT-53119 Improved

Merge-request: KT-MR-6755
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-07-28 14:57:28 +00:00
Alexander Korepanov caa1570e25 [JS IR] Fix clashes between bridge and delegated function call
The patch fixes the js function signature rules to avoid clashes
 between bridge and delegated call. Use overridden symbols dfs of
 JsName annotation in order to get the correct bridge name.

^KT-52968 Fixed
2022-07-28 14:41:47 +00:00
Alexander Korepanov 6525f7a7ac [JS IR] Fix a IC dependency building for class methods.
The patch fixes lost IC dependencies for inherited class or interface methods.
 Especially between a fake override function and its implementation.
 Since IrSymbolDeserializer doesn't provide all class methods,
 they are collected from the class definitions.

^KT-53063 Fixed
2022-07-28 12:39:39 +00:00
Pavel Punegov edbccd0add Revert "[K/N][perf] Use properties file to get TeamCity URL"
This reverts commit a961a93da7.
2022-07-28 12:39:08 +02:00
Victor Petukhov a61648651b [FE 1.0] Use original receivers for NI while DSL scope violation checking
Original receivers are already use in the near place

^KT-46969 Fixed
2022-07-28 08:51:42 +00:00
Dmitriy Novozhilov eee35af7f9 Advance bootstrap to 1.8.0-dev-1006 2022-07-28 07:00:34 +00:00
Ilya Kirillov 556add72ff [Analysis API FIR] fix KDoc reference resolve for aliased imports 2022-07-28 01:37:54 +02:00
Ilya Kirillov 24c9b8e006 [LL FIR] fix invalid designation collection in case of classpath conflict
^KTIJ-22323 fixed
2022-07-28 01:37:54 +02:00
Ilya Kirillov d9c4fda521 [Analysis API FIR] implement reference resolve inside KDoc
^KTIJ-22324 fixed
2022-07-28 01:37:53 +02:00
Dmitriy Dolovov b210e24b43 [Native][tests] Temporarily disable String codegen/box tests with "-opt" mode 2022-07-27 22:39:34 +00:00
Dmitriy Dolovov 5d234c0cdc [Native][tests] Ability to programmatically mute codegen/box & regular tests 2022-07-27 22:39:33 +00:00
Mikhail Glukhikh 91f3edc6a6 K1: add protection against exceptions possible in IDE partial resolve
IDE partial resolve allows to drop some statements from resolve,
in particular it can drop some lambda. However, this can lead to the
situation when we have no descriptor for lambda or to incorrect
type checks for its containing block. This commit protects about
this situation
2022-07-27 16:48:38 +00:00
Mikhail Glukhikh 3e58c54da9 Add docs to CandidateApplicability, remove DSL_SCOPE_VIOLATION 2022-07-27 15:29:48 +00:00
Mikhail Glukhikh d0c518013a Document&use CandidateApplicability.shouldStopResolve/isSuccess properly 2022-07-27 15:29:47 +00:00
Mikhail Glukhikh 010d5b76e5 Temporary fix for K2/JS tests 2022-07-27 15:29:46 +00:00
Mikhail Glukhikh 220a8e47f4 K2: de-prioritize invoke on dynamic receiver 2022-07-27 15:29:45 +00:00
Mikhail Glukhikh 766d873271 FIR2IR: fix case with extension called on dynamic 2022-07-27 15:29:45 +00:00
Mikhail Glukhikh 0611f3b8e7 CandidateApplicability: add K1/K2 prefixes when applicable 2022-07-27 15:29:44 +00:00