Mikhail Glukhikh
77dd0ad396
FIR: handle custom attributes more precise
2021-06-09 15:42:37 +03:00
Mikhail Glukhikh
4f70f47fa6
FIR2IR: convert annotations on type parameters #KT-46967 Fixed
2021-06-09 15:42:36 +03:00
Andrey Zinovyev
ddc9c1bd1b
[FIR] Fix extension property reference resolution
...
On type with star projection
#KT-44372 Fixed
2021-06-09 15:15:28 +03:00
Mikhail Glukhikh
2b4ea8e6e7
Add forgotten test data
2021-06-09 14:59:57 +03:00
pyos
ade8b0a7d3
JVM_IR: box bound receiver before calling the reference constructor
...
This is needed for the inliner: since the information about Kotlin type
of the bound receiver is nowhere in the output binary, the inliner will
have no clue how to box inline class values. Moving the boxing outside
the object means the inliner doesn't need to know about it; from its
point of view, the captured value has type `Any`.
2021-06-09 14:36:07 +03:00
Andrey Zinovyev
972cd9e9e7
[FIR] Fix PACKAGE_CANNOT_BE_IMPORTED diagnostic
...
Don't report it when there is a function/property with the same name as
package
2021-06-09 09:02:49 +03:00
Denis.Zharkov
2653565f56
FIR: Support exhaustive whens on subjects of intersection type
2021-06-08 18:59:48 +03:00
Mikhail Glukhikh
63bc3f9708
Forbid experimental markers on various targets #KT-45845 Fixed
...
In this commit we forbid experimental markers on:
- local variables
- value parameters
- fields, including delegate fields
- property getters
2021-06-08 11:37:34 +03:00
Mikhail Glukhikh
eb9c658c1c
OptIn: handle usages via type aliases properly
2021-06-08 11:37:33 +03:00
Mikhail Glukhikh
702d839c66
Forbid TYPE and TYPE_PARAMETER as possible OptIn targets
2021-06-08 11:37:31 +03:00
Mikhail Glukhikh
603afe89a2
Forbid using experimental markers on override declarations
...
#KT-45844 Fixed
2021-06-08 11:37:30 +03:00
Mikhail Glukhikh
bb9efab3c4
Forbid experimental markers on getter #KT-45845 Fixed
2021-06-08 11:37:29 +03:00
Mikhail Glukhikh
0a670bf055
Report EXPERIMENTAL_API diagnostics on various implicit usages
...
#KT-32443 Fixed
#KT-22852 Fixed
2021-06-08 11:37:28 +03:00
Mikhail Glukhikh
d8d38862d9
Introduce EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION diagnostic
...
#KT-22941 Fixed
2021-06-08 11:37:27 +03:00
Mikhail Glukhikh
7393465696
Don't report EXPERIMENTAL_OVERRIDE_ERROR on annotated local functions
...
#KT-31728 Fixed
2021-06-08 11:37:26 +03:00
Andrey Zinovyev
3572a96bb9
[FIR] Lookup in local sources in default imports based on the flag
...
Reuse ALLOW_KOTLIN_PACKAGE for that
2021-06-08 08:23:25 +00:00
Andrey Zinovyev
c507d1c938
[FIR] Implement OPERATOR_RENAMED_ON_IMPORT diagnostic
2021-06-08 08:18:56 +00:00
Andrey Zinovyev
7c669b65c3
[FIR] Implement CONFLICTING_IMPORT diagnostic
2021-06-08 08:18:55 +00:00
Andrey Zinovyev
14789cb9e5
[FIR] Implement CANNOT_BE_IMPORTED diagnostic
2021-06-08 08:18:54 +00:00
Andrey Zinovyev
bf153ab0f0
[FIR] Implement CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON diagnostic
2021-06-08 08:18:54 +00:00
Dmitry Petrov
81b09ca09f
KT-46267 JVM_IR don't generate unnecessary ATHROW in lateinit var read
2021-06-07 20:02:24 +03:00
Ivan Kylchik
cc169613c1
Drop result of finally block after interpretation
...
This change is needed due to using FIR as frontend for tests. In this
case finally block doesn't has coercion to unit so it's result must
be dropped manually.
2021-06-07 15:35:20 +03:00
Ivan Kylchik
5596e1e1e1
Properly support char and boolean arrays in interpreter
...
For now boolean array will expect proper Boolean instead of any value.
This change just unify logic of working with primitive arrays.
2021-06-07 15:35:18 +03:00
Ivan Kylchik
25989b36c5
Allow to create object in interpreter only if it is compile time
2021-06-07 15:35:16 +03:00
Ivan Kylchik
e28ab45c51
Add ir interpreter tests
2021-06-07 15:35:12 +03:00
Denis.Zharkov
592256976e
FIR: Fix inference of builder-inference function from expect type
...
Previously, such calls were being completed with FULL mode and incorrect
INFERENCE_NO_INFORMATION_FOR_PARAMETER has been reported
2021-06-07 15:25:57 +03:00
Denis.Zharkov
18e93b50d9
FIR: Fix loading read-only collection Java types with incorrect variance
2021-06-07 15:25:56 +03:00
Denis.Zharkov
5ade831665
FIR: Fix INFERENCE_NO_INFORMATION_FOR_PARAMETER on type alias with generic expansion
...
^KT-46996 Fixed
2021-06-07 15:25:55 +03:00
Denis.Zharkov
d76db0e011
FIR: Mute backend tests relevant to new INFERENCE_NO_INFORMATION_FOR_PARAMETER
...
See KT-46967 and KT-46996
2021-06-07 15:25:53 +03:00
Denis.Zharkov
d932d5b0a5
FIR: Support adding expect type to calls in foo() as R position
...
See https://kotlinlang.org/docs/whatsnew12.html#support-for-foo-as-a-shorthand-for-this-foo
2021-06-07 15:25:51 +03:00
Denis.Zharkov
6136526a3a
FIR: Avoid reporting inference errors from DelegatedPropertyConstraintPosition
...
All necessary diagnostics have already been reported through the checkers
2021-06-07 15:25:50 +03:00
Denis.Zharkov
0aca3a3737
FIR: Adjust test data after introduction of INFERENCE_NO_INFORMATION_FOR_PARAMETER
...
See previous commits for details
2021-06-07 15:25:47 +03:00
Denis.Zharkov
c420957eac
FIR: Report INFERENCE_NO_INFORMATION_FOR_PARAMETER diagnostic
2021-06-07 15:25:45 +03:00
pyos
0bd8d16fe2
JVM_IR: fix Result types in continuations & remove more codegen hacks
...
#KT-47129 Fixed
2021-06-07 09:57:42 +02:00
Dmitry Petrov
7fd033adae
JVM_IR KT-47073 use type parameter upper bound for default value
2021-06-04 20:54:01 +03:00
Victor Petukhov
2d3ed4b7da
Update FIR test data
2021-06-04 13:25:10 +03:00
Ivan Kochurkin
c4c2fbb5a0
[FIR] Implement RECURSIVE_TYPEALIAS_EXPANSION, CYCLIC_INHERITANCE_HIERARCHY diagnostics, fix stackoverlow exception in case if typealias points to type with type arguments
2021-06-03 20:41:58 +03:00
Mark Punzalan
d1531f9cdd
FIR: Choose a resolved candidate for augmented assignment when both
...
assign and operator candidates are unsuccessful.
2021-06-03 20:18:04 +03:00
Mark Punzalan
32bb64a225
FIR: Report UNSAFE_OPERATOR_CALL for augmented assignments (was
...
reporting UNSAFE_CALL).
2021-06-03 20:18:03 +03:00
Mark Punzalan
6de1000818
FIR: Report UNSAFE_INFIX_CALL for all infix-style calls, even if the
...
candidate is not an infix function.
This mirrors FE 1.0 (see
`AbstractTracingStrategy.reportUnsafeCallOnBinaryExpression()`) and
allows consistent handling for quickfixes on infix calls.
2021-06-03 20:18:01 +03:00
Victor Petukhov
1e5998e0ba
Add constraints between two different stub variables instead of creating constraint error due to T1 isn't subtype of T2
...
^KT-44241 Fixed
2021-06-03 19:18:09 +03:00
Ivan Kochurkin
da15f0ffe8
[FIR] Consider fullyExpandedType instead of original type in isSubtypeForTypeMismatch, consider lookupTag in isError method
2021-06-03 18:24:36 +03:00
Ivan Kochurkin
0b0a96a1d3
[FIR] Fix processing of nested type arguments, extract extractTypeRefAndSourceFromTypeArgument method to FirHelpers and use it from FirClassVarianceChecker and FirConflictingProjectionChecker
2021-06-03 18:24:35 +03:00
Ivan Kochurkin
f081a6b4fa
[FIR] Implement REDUNDANT_PROJECTION diagnostics, rename FirConflictingProjectionChecker -> FirProjectionRelationChecker, fix tests
2021-06-03 18:24:34 +03:00
Ivan Kochurkin
03e577bf98
[FIR] Implement CONFLICTING_PROJECTION_IN_TYPEALIAS_EXPANSION diagnostics, fix tests
2021-06-03 18:24:32 +03:00
Ivan Kochurkin
b85846c0c0
[FIR] Fix location for CONFLICTING_PROJECTION diagnostics, extend conflictingProjection.kt with test sample
2021-06-03 18:24:29 +03:00
Victor Petukhov
19c07e048a
Don't check suitability of a builder inference call if unrestricted builder inference is enabled
...
^KT-42139 Fixed
2021-06-03 17:28:40 +03:00
Mikhail Glukhikh
1294c8de53
FIR: don't get class symbol if it's unnecessary (Java type conversion)
2021-06-03 16:14:41 +03:00
Dmitry Petrov
107e71acb0
Minor: fix Android tests
2021-06-03 13:05:23 +03:00
pyos
4128d27510
JVM_IR: do not use invokedynamic for inline fun references
2021-06-03 13:05:23 +03:00