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
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
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
8b393910d3
Add support for tests mute-in database in JUnit 5.
...
^KT-45744 In Progress
2021-04-13 16:48:07 +03:00
Ivan Kochurkin
847ab40707
[FIR] Implement DIVISION_BY_ZERO diagnostics, fix tests
2021-04-13 16:22:08 +03:00
Ivan Kochurkin
964bba3530
[FIR] Implement FLOAT_LITERAL_OUT_OF_RANGE diagnostics, fix tests
2021-04-13 16:22:06 +03:00
Ivan Kochurkin
4cf30cd1fa
[FIR] Implement INT_LITERAL_OUT_OF_RANGE diagnostics, fix tests
2021-04-13 16:22:05 +03:00
Ivan Kochurkin
fb06da2d75
[FIR] Implement WRONG_LONG_SUFFIX diagnostics, fix tests
2021-04-13 16:22:03 +03:00
pyos
cc7187e49b
JVM_IR: cast argument of enumValueOf to String in bytecode
...
Generic functions and implicit casts may return a supertype instead.
#KT-45865 Fixed
2021-04-13 13:24:24 +02:00
Anton Bannykh
afaf3b5e28
JS PIR: replace deprecated toLowerCase with lowercase
2021-04-13 14:20:00 +03:00
pyos
85b4668b7c
JVM_IR: optimize more if-null chains
...
1. consider reads of fields from the same file "stable" just like
functions, i.e. assume their nullability information is correct
2. apply if-null fusion repeatedly until the subject is no longer a
nested if-null expression
2021-04-13 11:48:36 +03:00
Denis.Zharkov
0b0a6d6ede
Fix false positive ENCLOSING_SUSPEND_FUNCTION_FOR_SUSPEND_FUNCTION_CALL
...
Previously added additional processing at findEnclosingSuspendFunction
seems unnecessary anymore
^KT-43258 Fixed
2021-04-13 11:47:05 +03:00
Dmitriy Novozhilov
803d47daaa
Distinguish classes from different sourcesets in SealedInheritorInSameModuleChecker
...
#KT-45848 Fixed
#KT-46031
2021-04-13 11:21:58 +03:00
Dmitriy Novozhilov
66e4d5664a
[Test] Properly setup KtFile.isCommonSource in tests
2021-04-13 11:21:57 +03:00
Jinseong Jeon
619360fe4d
FIR checker: report UNINITIALIZED_ENUM_(ENTRY|COMPANION)
2021-04-13 08:25:16 +03:00
Ivan Kochurkin
ad9b962536
[FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE)
2021-04-12 23:49:55 +03:00
Ivan Kochurkin
4ffab5fe5a
[FIR] Add new test argParamTypeMismatch.kt for ARGUMENT_TYPE_MISMATCH diagnostics
2021-04-12 23:49:54 +03:00
Ivan Kochurkin
a09b836334
[FIR] Add new ARGUMENT_TYPE_MISMATCH diagnostics and related classes, throw it in corresponding cases
2021-04-12 23:49:52 +03:00
Dmitry Petrov
7e03f8ea80
JVM_IR KT-45853 include return type into Java method IdSignature
...
This is a hack required to accept [potentially] incorrect input
provided by the front-end; see KT-46042.
2021-04-12 22:52:08 +03:00
Matthew Gharrity
5ce746f1ec
ULC field has null nameIdentifier
...
KtUltraLightFieldForSourceDeclaration implements PsiField, for which
getNameIdentifier() is marked @NonNull, so some clients expect a
non-null return value.
#KT-45629 Fixed
2021-04-12 21:41:54 +03:00
Jinseong Jeon
9af108df77
FIR LT: set source for destructured value parameter of lambda
2021-04-12 19:20:03 +03:00
Dmitry Petrov
f59b49db68
JVM_IR KT-45967 generate accessor for argument of indy intrinsic
...
TODO handle inaccessible constructors gracefully
2021-04-12 17:36:24 +03:00
Alexander Udalov
e9a969875c
Minor, fix typo in the issue reference in comment
2021-04-12 15:43:35 +02:00
Dmitry Petrov
162363a324
JVM: CHECK_BYTECODE_TEST directive + use it in INVOKEDYNAMIC tests
2021-04-12 16:43:15 +03:00
Ilya Chernikov
ca352c9556
Fix jvm method reading when descriptor and signature do not match
...
#KT-38325 fixed
2021-04-12 16:23:53 +03:00
Mikhail Glukhikh
c75331bf2a
Implicit nothing type argument: handle nullable case properly
...
#KT-41620 Fixed
2021-04-12 15:51:46 +03:00