Victor Petukhov
90ea64a0e5
Don't report warning about changing execution order for varargs if it's inside an annotation
...
^KT-43110 Fixed
2020-11-05 13:18:00 +03:00
Victor Petukhov
f052bc341c
Don't report warning about implicitly inferred Nothing for call arguments if there is non-Nothing return type
...
^KT-43108 Fixed
2020-11-05 13:17:59 +03:00
Jinseong Jeon
1f1e1828a7
FIR CFG: reconfigure exception throwing paths in try expression
2020-11-04 16:35:42 +03:00
Jinseong Jeon
146036010c
FIR DFA: add tests about smartcasts in/after try-catch-finally
2020-11-04 16:35:42 +03:00
Mikhail Glukhikh
7b4f781ea8
[FIR] Split primary constructor parameter scope into two different
...
In init block or property initializers,
for `val x` declared in primary constructor,
`x` reference is now resolved to property, not to parameter.
So we need two different scopes for primary constructor,
one for 'pure' parameters and another one for all parameters,
including val/var ones.
#KT-42844 Fixed
2020-10-30 18:44:55 +03:00
Mikhael Bogdanov
21521aa397
Deprecate protected constructors call from public inline function
...
#KT-21177
2020-10-27 14:51:08 +01:00
Mikhail Glukhikh
09043fb98d
[FIR] JvmMappedScope: add mutable methods or not depending on a class
2020-10-27 10:27:06 +03:00
Mikhail Glukhikh
e9b51b42f9
[FIR] Add test for both KT-10240 and KT-19446
2020-10-26 14:09:36 +03:00
Victor Petukhov
4f06162446
Get a callable reference expression to report an error on it properly, taking into account possible wrapping
...
^KT-42620 Fixed
2020-10-23 15:12:08 +03:00
Mikhail Glukhikh
7f3d0af4f7
[FIR Java] Soften rules for matching types for may-be-special-builtins
...
This commit is workaround for cases like
MyJavaMap<KK : Bound, V> : java.util.Map<K, V>.
After signature changing and substitution we have
MyJavaMap.get(Object) declared and MyJavaMap.get(KK) from supertype,
which can't be otherwise matched as overriding one another.
2020-10-23 08:12:16 +03:00
Mikhail Glukhikh
abc2866902
[FIR] Fold flexible types after substitution if possible
2020-10-23 08:12:16 +03:00
Mikhail Glukhikh
d3e85dbce0
[FIR] Implement replacing Object with type parameters for specials builtins
...
#KT-42601 Fixed
2020-10-23 08:12:15 +03:00
Mikhail Glukhikh
ad12cc296b
[FIR] Expand type before adding equality constraint
2020-10-22 15:38:30 +03:00
Jinseong Jeon
46cc01602e
FIR2IR: add implicit NOT_NULL cast if needed
2020-10-22 10:51:20 +03:00
Victor Petukhov
84129098cb
Add equality constraints without subtyping
...
^KT-42195 Fixed
^KT-41741 Fixed
2020-10-21 21:23:13 +03:00
Jinseong Jeon
1c1e8f7beb
FIR CFG: revise edge kind between local func node and fun enter node
...
so that local function enter node can be visited by FIR CFA
#KT-42814 Fixed
2020-10-21 14:01:31 +03:00
Dmitriy Novozhilov
bf1a00c73a
[FIR] Rework resolution of declaration statuses
...
There is introduced algorithm of resolution with jumps: before
resolution of some class we resolve all status of members of its
supertypes, so we can properly determine inherited visibility
and modifiers
2020-10-21 11:53:10 +03:00
Dmitriy Novozhilov
9f5191f2a1
[FIR-IDE] Regenerate tests
2020-10-16 15:24:57 +03:00
Dmitriy Novozhilov
5f641a2552
[FIR] Add wrapping scopes with forced calculator in checkers and fir2ir
2020-10-16 15:24:57 +03:00
Dmitriy Novozhilov
fc23cf76d4
[FIR] Force calculation of return type of fake overrides in return type calculator
2020-10-16 15:24:57 +03:00
Dmitriy Novozhilov
f9faa5be64
[FIR] Don't force calculation of return type in substitution scope
2020-10-16 15:24:56 +03:00
Dmitriy Novozhilov
0b51fd03e2
[FIR] Add failing test for incorrect type calculation of implicit types
2020-10-16 15:24:56 +03:00
Pavel Kirpichenkov
d769ca06ab
Add test for KT-25114
2020-10-16 11:11:58 +03:00
Victor Petukhov
c6da2a1138
Reuse built functional types for postponed arguments by expected types and paths from a top level type variable
...
^KT-42221 Fixed
2020-10-16 10:46:22 +03:00
Mikhael Bogdanov
c8e84f82eb
Proper check NON_JVM_DEFAULT_OVERRIDES_JAVA_DEFAULT in new jvm-default modes
...
#KT-42699 Fixed
2020-10-15 16:26:00 +02:00
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