Andrey Zinovyev
03215f4e0a
[FIR] Add TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER check
2021-04-14 18:11:13 +03:00
Andrey Zinovyev
470993ac07
[FIR] Add TYPE_PARAMETERS_NOT_ALLOWED check
2021-04-14 18:11:12 +03:00
Andrey Zinovyev
5ff82addc9
[FIR] Add REIFIED_TYPE_PARAMETER_NO_INLINE check
2021-04-14 18:11:10 +03:00
Andrey Zinovyev
14fe570a00
[FIR] Add more type params checks
...
VARIANCE_ON_TYPE_PARAMETER_NOT_ALLOWED
BOUND_ON_TYPE_ALIAS_PARAMETER_NOT_ALLOWED
2021-04-14 18:11:09 +03:00
Andrei Klunnyi
fb1b253d1e
KT-46063 Quick fix: remaining when branches for 'expect' sealed
...
'List<WhenMissingCase>.hasUnknown' property was changed in 4222bb9a .
As a result quickfix's AddWhenRemainingBranchesFix.Companion.isAvailable
started responding 'no'.
This commit restores original property and provides a separate one for
compiler needs.
^KT-46063 Fixed
2021-04-14 15:57:15 +02:00
Alexander Udalov
005aa57f6d
Remove obsolete module cli-js-klib
...
It's no longer used anywhere in the build.
2021-04-14 13:47:02 +02:00
Alexander Udalov
988d1365a8
Remove dependency of backend.wasm on ir.tree.impl and ir.tree.persistent
2021-04-14 13:47:02 +02:00
Alexander Udalov
643c3f26c1
Remove dependency of backend.js on ir.tree.impl
...
By taking the instance of IrFactory either from SymbolTable, or passing
it from cli-js which depends on both ir.tree.impl and
ir.tree.persistent, and can choose the appropriate implementation.
2021-04-14 13:47:02 +02:00
Alexander Udalov
9aed55a1f4
IR: minor, improve toString for IrBasedTypeParameterDescriptor
...
The motivation is that in the "Unbound symbols are not allowed" error
message like the one in KT-46069, the type parameter is rendered via
`render()`, and that contains only its name/variance, and doesn't help
in finding where the member with that type parameter is declared.
2021-04-14 13:16:05 +02:00
Ting-Yuan Huang
6c989bfd4b
Support array of annotation in KotlinJvmBinaryClass
...
KotlinJvmBinaryClass.AnnotationArrayArgumentVisitor didn't cover the
case when the element type is an Annotation. Therefore, when the
compiler read an array of annotations from JVM binary classes built from
Kotlin sources, it got an empty array regardless of what was written in
the bytecode.
For example, Foo.value below is read as an empty array when SomeClass
resides in another Kotlin module.
@Foo(
value = [Bar(1), Bar(2)]
)
class SomeClass
2021-04-14 13:14:26 +02:00
Dmitriy Dolovov
5e392a511f
[K/N][IR] Generate missing return when using Nothing-returning safe call as lambda result or function expression body
...
^KT-42832
2021-04-14 13:20:41 +03:00
Ilya Kirillov
b4813d31e6
Mute FirKotlinHighlightingPassTestGenerated.Checker.testResolveTypeInAnnotationArgumentRuntime as flaky
2021-04-14 11:48:41 +02:00
Ilmir Usmanov
74b1fdcc60
Minor. Add regression test
...
#KT-45991
2021-04-14 10:48:59 +02:00
Ilmir Usmanov
29c975fc43
Minor. Add regression test
...
#KT-45539 Obsolete
2021-04-14 10:48:57 +02:00
Ilmir Usmanov
19b1b48e87
Minor. Add tests to check returning inline class from default method
...
#KT-45539 Obsolete
2021-04-14 10:48:54 +02:00
Andrey Zinovyev
8c464b4de5
[KAPT] Bring back properties resolution in light analysis
...
Because kapt fails on evaluation constant expressions of SomeType::class
2021-04-14 07:50:22 +00:00
Nikolay Krasko
9bbfe5a7a2
Add dependencies verification for prepareSonatypeStaging.gradle
...
File is applied conditionally when sonatype publication is enabled.
2021-04-14 00:53:02 +03:00
Steven Schäfer
7a9ff15d73
JVM IR: Handle suspend interface default methods with generic types (KT-45166)
2021-04-13 23:04:32 +02:00
Dmitry Petrov
7d62f0b5aa
JVM_IR KT-45187 use Arrays.copyOf to copy an array in spread operator
...
Creating a new array (and copying data into it with System.arraycopy)
doesn't work in generic case, because the actual array class depends on
call site.
2021-04-13 22:27:37 +03:00
zadorotskas
334d0a8b5a
FIR: introduce three diagnostics for const val
2021-04-13 21:36:46 +03:00
Mikhail Glukhikh
cc106085e2
FIR: add minor TODO / comments to mismatch checkers
2021-04-13 21:36:44 +03:00
Mikhail Glukhikh
b8af3d79d4
FIR: minimize explicit use of <destruct> name
2021-04-13 21:36:43 +03:00
Mikhail Glukhikh
78fc87ffb1
FIR: apply minor test data fixes around type mismatch problems
2021-04-13 21:36:41 +03:00
Mikhail Glukhikh
9accd8c9ad
FIR: use unsafe .coneType in type mismatch checkers when possible
2021-04-13 21:36:40 +03:00
Mikhail Glukhikh
b58e5b182c
FIR: add test fixing builder inference case
2021-04-13 21:36:38 +03:00
Mikhail Glukhikh
f7147dc6f3
CoroutineTransformerMethodVisitor: fix potential type mismatch
...
The fixed code compiles properly only due to null smart cast.
Without it, e.g. in FIR, we'd have type mismatch error for this return.
2021-04-13 21:36:37 +03:00
Mikhail Glukhikh
69d1ef423a
FIR initializer: don't report type mismatch on incompatible extensions
...
This commit suppresses type mismatch error from KT-45989
2021-04-13 21:36:36 +03:00
Mikhail Glukhikh
fa4d664a18
FIR initializer: don't report type mismatch in SomeInt = Int case
2021-04-13 21:36:34 +03:00
vldf
57d2eb5da2
Introduce FirFunctionReturnTypeMismatchChecker
2021-04-13 21:36:33 +03:00
vldf
24f1f1221e
Introduce FirInitializerTypeMismatchChecker
2021-04-13 21:36:31 +03:00
Ilya Chernikov
7ed35e5c2b
FIR: Introduce smart containers in supertypes search
...
assuming that we may have quite many searches resulting
in a single supertypes, smart containers here reduce
allocations.
2021-04-13 16:18:41 +02:00
Ilya Chernikov
038a8af80e
FIR: convert some hot void visitors to any
...
reduces call indirection (Nothing -> Void bridges) and therefore
callstack depth
2021-04-13 16:18:41 +02:00
Ilya Chernikov
34694cbec5
FIR: get rid of transformSingle in the generated code
...
further reduce of the callstack depth
2021-04-13 16:18:40 +02:00
Ilya Chernikov
9d557c8b79
FIR: reduce visitor/transformer indirection
...
performance: do not route transform calls via
visitors, reduce call stack depth on transformations
2021-04-13 16:18:40 +02:00
Ilya Chernikov
dfd5e80ce9
FIR: Get rid of CompositeTransformResult
2021-04-13 16:18:39 +02:00
Yahor Berdnikau
00df2c4a9e
Fix failing non-JUnit5 tests.
...
They have failed due to migration to new plugin api in test projects.
^KT-45744 Fixed
2021-04-13 16:48:20 +03:00
Yahor Berdnikau
9ef5817f8b
Update SimpleKotlinGradleIT.kt tests to use new DSL.
...
^KT-45744 In Progress
2021-04-13 16:48:19 +03:00
Yahor Berdnikau
aabb05104e
Extract common versions to the separate file.
...
^KT-45744 In Progress
2021-04-13 16:48:18 +03:00
Yahor Berdnikau
8db67ec24b
Add file system watching option to build options.
...
Default build option value - disabled.
In Gradle 7 it is enabled by default, and I suspect it causes flaky
build failure when 'TempDir' tries to delete test project.
^KT-45744 In Progress
2021-04-13 16:48:17 +03:00
Yahor Berdnikau
81621a79a6
Add flag to enable Gradle process debugging.
...
^KT-45744 In Progress
2021-04-13 16:48:16 +03:00
Yahor Berdnikau
9ae47004d0
Append by default heap dump options.
...
^KT-45744 In Progress
2021-04-13 16:48:15 +03:00
Yahor Berdnikau
ffa11eacca
Add task to run only JUnit 5 KGP tests.
...
^KT-45744 In Progress
2021-04-13 16:48:14 +03:00
Yahor Berdnikau
34f1c58f1e
Add Gradle task to clean test kit cache dir.
...
Always run it on CI when tests will finish.
^KT-45744 In Progress
2021-04-13 16:48:13 +03:00
Yahor Berdnikau
644882df61
Set default max Gradle version to '7.0'.
...
^KT-45744 In Progress
2021-04-13 16:48:11 +03:00
Yahor Berdnikau
93230d72f5
Add build option to control Gradle parallelism.
...
Limit workers count, so when running tests parallel, they will not
compete over CPU usage.
^KT-45744 In Progress
2021-04-13 16:48:10 +03:00
Yahor Berdnikau
3c78c94fb1
Add configuration cache support to the default build options.
...
^KT-45744 In Progress
2021-04-13 16:48:08 +03:00
Yahor Berdnikau
8b393910d3
Add support for tests mute-in database in JUnit 5.
...
^KT-45744 In Progress
2021-04-13 16:48:07 +03:00
Yahor Berdnikau
7ffdafe791
Enable forwarding successful Gradle test output on demand.
...
^KT-45744 In Progress
2021-04-13 16:48:05 +03:00
Yahor Berdnikau
5b218bdad2
Set tests lifecycle to be 'PER_CLASS'.
...
Usually Gradle tests should be pretty isolated between each other to use
'PER_METHOD' lifecycle.
^KT-45744 In Progress
2021-04-13 16:48:03 +03:00
Yahor Berdnikau
40c525c4a6
Add '.testKitDir/' to '.gitignore' file.
...
^KT-45744 In Progress
2021-04-13 16:48:02 +03:00