Jinseong Jeon
6fc3f7e776
FIR CFG: label edges from try-enter through finally block to exit target
2020-10-15 14:22:39 +03:00
Jinseong Jeon
43852ad7ab
FIR CFG: add edges from try/catch to finally
2020-10-15 14:22:39 +03:00
Jinseong Jeon
ea2f773e54
FIR checker: reproduce KT-42350
2020-10-15 14:22:38 +03:00
Ilya Kirillov
dc467f7d6c
FIR: add test which checks that we do not access lazy bodies & lazy expressions till contract phase
2020-10-14 22:11:04 +03:00
Pavel Kirpichenkov
ef44077cb7
[FIR] Restore variable fixation direction in call completion
...
Several tests are affected by the usage of fixation direction calculator in FIR.
Restored to mimimize test data changes.
It is unnecessary in FE10 because a type variable with unknown type
is inferred into an error type, but affects test data in FIR where
Nothing/Any is selected by direction (as a temporary measure).
CR candidate in spec test is Unresolved in FIR because top-level CRs are resolved as call arguments.
Resolution ambiguity is also present in FE10 when CR is wrapped into an id call.
2020-10-13 11:00:21 +03:00
Pavel Kirpichenkov
712a2ce1ab
[FIR] Improved lambda completion: initial implementation
...
Repeat the logic of KotlinConstraintSystemCompleter in ConstraintSystemCompleter.
Implement additional context operations required for updated lambda completion algorithm.
2020-10-13 11:00:21 +03:00
Dmitriy Novozhilov
f794ced888
[FIR] Fix incorrect cluster creating in CFG dumps
2020-10-12 11:55:05 +03:00
Mikhail Glukhikh
64fb114c30
FIR Java annotations: create vararg or Array depending on parameter name
...
#KT-42346 Fixed
2020-10-06 12:13:58 +03:00
Mikhail Glukhikh
f6b49a2c9a
FirAnnotationArgumentChecker: handle conversion calls properly
2020-10-06 12:13:58 +03:00
Mikhail Glukhikh
6f432ea5dd
[FIR] Add problematic test for KT-42346 (double vararg in annotation)
2020-10-06 12:13:57 +03:00
Jinseong Jeon
a154cf4c45
FIR checker: reproduce KT-42348
2020-10-05 19:48:11 +03:00
Victor Petukhov
6c1dc43d25
Add check already fixed variables in PostponedArgumentInputTypesResolver during adding constraints on them and using inside a functional type
...
^KT-42374 Fixed
2020-10-02 18:31:54 +03:00
Denis Zharkov
28c536e511
FIR: Add temporary workaround to avoid changes in test data
...
CallableId for intersection overrides has been changed in previous commits
and many rendered FIR test data needs to be changed
But, we're going to get rid of callableId's/or fix them back for intersection overrides soon
2020-10-01 17:49:02 +03:00
Victor Petukhov
d02432cf93
Introduce warning for the changing arguments execution order for named varargs (KT-17691)
2020-10-01 12:15:13 +03:00
Victor Petukhov
fcfabb70d5
Report invisible setter error if it's resolved to synthetic property of base class with public getter and protected setter
...
^KT-11713 Fixed
2020-09-30 14:35:43 +03:00
Victor Petukhov
8f333aef3a
Introduce warning about forbidden referencing to underscore named parameter of the catch block in a future release (KT-31567)
2020-09-29 10:23:45 +03:00
Victor Petukhov
09f1764f82
Introduce warning for private inline functions which return anonymous objects without specified supertypes (KT-33917)
2020-09-29 10:23:45 +03:00
Victor Petukhov
63d825fa24
Introduce warning for secondary constructor in enums without delegation to primary constructors (KT-35870)
2020-09-29 10:23:45 +03:00
Dmitriy Novozhilov
cc4f72e032
[FIR] Capture type from type parameter upper bound when needed
2020-09-29 10:17:43 +03:00
Dmitriy Novozhilov
9e4623c52b
[FIR] Fix resolution of calls on super to avoid resolve to interface methods
...
#KT-38400 Fixed
2020-09-29 10:17:42 +03:00
Dmitriy Novozhilov
fb871a55a3
[FIR] Don't create backing field for property without explicit type
...
#KT-41977 Fixed
2020-09-29 10:17:42 +03:00
Dmitriy Novozhilov
0c0a8f9849
[FIR] Properly pass type attributes for inference of lambda with type variable as expected type
...
#KT-41989 Fixed
#KT-37317 Fixed
2020-09-29 10:17:42 +03:00
Victor Petukhov
076eacb3d1
Check implicitly inferred Nothing inside special calls properly: compare constructors instead of types
...
^KT-41176 Open
2020-09-28 13:27:02 +03:00
Mikhail Glukhikh
fe8e3e99ab
[FIR Java] Hide function in scope in case it's an accessor by fact
...
#KT-42116 Fixed
2020-09-25 14:44:09 +03:00
Dmitriy Novozhilov
4ef57c120f
[FIR] Consider variance of type parameters during java type enhancement
...
#KT-41940 Fixed
2020-09-24 15:43:20 +03:00
Victor Petukhov
25ea3df5ca
Put fix in 9123c4f73baf77f8a50dede6c890c46f5ffafd6c under the inference compatibility flag
2020-09-23 17:15:58 +03:00
Victor Petukhov
bfb46befa5
Mark projection of a nullable captured type as not null during simplification constrains with it and a nullable type variable
...
^KT-41913 Fixed
2020-09-23 17:15:57 +03:00
Dmitriy Novozhilov
4d5e54cab6
[FIR] Unwrap definitely not null when matching overrides
...
#KT-41984 Fixed
2020-09-23 14:05:11 +03:00
Dmitriy Novozhilov
896103b94b
[FIR] Properly resolve implicit invoke calls
...
#KT-41990 Fixed
2020-09-23 14:05:11 +03:00
Dmitriy Novozhilov
40a9bb6eac
[FIR] Assume nullable types as good types for ILT approximation
...
#KT-41982 Fixed
2020-09-23 14:05:10 +03:00
Dmitriy Novozhilov
0e91c8f048
[FIR] Create synthetic properties for members of java annotations
...
#KT-41939 Fixed
2020-09-23 14:05:10 +03:00
Dmitriy Novozhilov
4374c06537
[FIR] Approximate all integer literals which resolved in independent mode
...
#KT-42016
2020-09-23 14:05:10 +03:00
Dmitriy Novozhilov
5efd533f55
[FIR] Desugar unary plus and minus as part of integer literal
...
#KT-42016
2020-09-23 14:05:09 +03:00
Dmitriy Novozhilov
a274216f14
[FIR] Check that expected lambda type is extension function using cone expected type
...
#KT-41991 In progress
2020-09-23 14:05:09 +03:00
Dmitriy Novozhilov
57a57d10da
[FIR] Add rendering for attribites of cone types
2020-09-23 14:05:07 +03:00
Mikhail Glukhikh
b64b32e06b
FIR: keep captured types in substitution scope
2020-09-23 09:00:57 +03:00
Mikhail Glukhikh
b7059a3eeb
FIR: perform type approximation when completion isn't required
2020-09-23 09:00:57 +03:00
Pavel Kirpichenkov
896fbbd1a3
[NI] Add extra ordering for ready-for-fixation variables
...
Helps fixing to more specific type in the following situations:
Type1 <: Var1
Var2 <: Var1
Var2 <: Type2
Type1 and Type2 may also be nullable and non-nullable versions of the same type.
Note that no additional constraints can be inferred from such constraints before fixation.
Resulting types for variables will always Type1 and Type2 may also be nullable and non-nullable versions of the same type.
Fixing Var1 first will make Var2's type more specific while fixing Var2 first
will make Var1's type less specific. The first is preferrable in general.
2020-09-22 15:06:12 +03:00
Dmitriy Novozhilov
a666eee67b
[FIR] Properly deserialize annotations on typealias and underlying type
2020-09-17 17:23:26 +03:00
Dmitriy Novozhilov
73c8059884
[FIR] Properly deserialize arrays in annotation arguments
2020-09-17 17:23:25 +03:00
Лихолетов Михаил
cfc1ebb4be
[FIR] Support several annotation argument diagnostics
2020-09-16 16:53:31 +03:00
Mikhail Glukhikh
0c13d3197c
[FIR] Fix non-serializable type argument at the end of resolve
2020-09-16 16:53:29 +03:00
Victor Petukhov
17db188b0e
Add regression test for already fixed issue KT-41396
2020-09-16 14:02:32 +03:00
Victor Petukhov
8cabfda832
Add regression test for already fixed issue KT-41885
2020-09-15 19:03:16 +03:00
Mikhail Glukhikh
e4aaae9ae7
FIR call completion: approximate type argument types
...
This commit removes some captured / ILT types at the end of resolve
2020-09-14 18:08:28 +03:00
Mikhail Glukhikh
4605a65f41
[FIR] Good test data fixes (around captured types)
2020-09-14 17:56:39 +03:00
Dmitriy Novozhilov
def647c094
[FIR] Don't constraints for return expressions of lambda if it has Unit return type
2020-09-14 10:57:09 +03:00
Dmitriy Novozhilov
3b941a8f43
[FIR] Complete types of array literals in annotations
2020-09-14 10:57:09 +03:00
Dmitriy Novozhilov
1dc3c93efa
[FIR] Don't assume types with not found symbol as error types
2020-09-11 12:13:33 +03:00
Victor Petukhov
bcd33da6f8
Don't check an argument type during passing it to vararg in the named form to avoid false positives if the argument type is type variable yet
...
^KT-41144 Fixed
2020-09-10 19:38:26 +03:00