Mikhail Glukhikh
1812b490a1
FIR: set anonymous object constructor return type properly
2020-03-11 16:01:57 +03:00
Pavel Kirpichenkov
04f9a03796
[NI] Fix isNullableType for definitely not null type parameter
...
Consider type parameter with nullable bound not null
if it is inside of a definitely not null type.
2020-03-11 13:55:25 +03:00
Pavel Kirpichenkov
88ae9bc7d5
minor: rename test
2020-03-11 13:55:24 +03:00
Dmitriy Novozhilov
dd7ac1343e
[FIR] Unwrap when subject expression recursively in DFA variable storage
...
#KT-37327 Fixed
2020-03-10 15:05:05 +03:00
Alexander Udalov
d668808b44
Migrate Experimental->RequiresOptIn in project sources
2020-03-10 12:07:15 +01:00
Alexander Udalov
795d6ab407
Migrate UseExperimental->OptIn in project sources
2020-03-10 12:07:14 +01:00
Denis Zharkov
15a0157c42
FIR: Support proper loading of Map.merge
2020-03-09 12:56:02 +03:00
Denis Zharkov
4a1302e385
FIR: Add problematic test case
...
^KT-37318 Open
2020-03-09 12:56:02 +03:00
Denis Zharkov
b2ff4d7f9a
FIR: Support expansion of flexible type-alias-based types in inference
2020-03-09 12:56:02 +03:00
Victor Petukhov
92a0ddfe71
NI: discard def not null types if they appear in return positions, in inv or in variance
...
^KT-37343 Fixed
2020-03-08 19:00:27 +03:00
simon.ogorodnik
bfa371ea73
[FIR] Rewrite casts to reduce performance dispersion
2020-03-06 18:13:00 +03:00
Dmitriy Novozhilov
63a1e7c6ff
[FIR] Add test for #KT-37321
2020-03-06 18:10:52 +03:00
Dmitriy Novozhilov
92449d6d9b
[FIR] Organize code for postponed arguments
2020-03-06 18:10:52 +03:00
Dmitriy Novozhilov
1c0fd7342f
[FIR] Support completion of lambdas with type variable as expected type
...
#KT-37310 Fixed
#KT-37304 Fixed
2020-03-06 18:10:52 +03:00
Dmitriy Novozhilov
643d7be12d
[FIR] Add base class for PostponedResolvedAtomMarker to FIR
2020-03-06 18:10:51 +03:00
Dmitriy Novozhilov
2a58fc238f
[FIR-TEST] Move stdlib tests for delegates to separate directory
2020-03-06 18:10:51 +03:00
Dmitriy Novozhilov
3655f0c499
[FIR-TEST] Move fixed test from problems directory
2020-03-06 18:10:51 +03:00
Dmitriy Novozhilov
af67aff303
[FIR] Support Clonable
...
#KT-36762 Fixed
2020-03-06 10:44:14 +03:00
Dmitriy Novozhilov
83d01fbaaa
[FIR-TEST] Move fixed test from problems directory
2020-03-06 10:44:14 +03:00
Pavel Kirpichenkov
ac5c255c20
[NI-TESTS] Add regression tests
...
^KT-33638 Obsolete
Add test for case mentioned in KT-33629.
Used to be runtime failure instead of error diagnostic.
2020-03-05 20:20:47 +03:00
Pavel Kirpichenkov
dc42b20ae3
[NI] Use alternative to intersection type in public declarations
...
The new inference uses inferred intersection types normally, unlike the old inference.
However, intersection types in public declarations are approximated to supertype, which
potentially may give a less presice type, then it would be with the OI.
For non-related T1, T2 the NI approximates {T1 & T2} to Any in public declarations,
and if the OI was inferring T1 instead of the intersection type, it may lead to
less precise declaration type and related errors.
The solution is to remember an alternative for an intersection type when present.
Before approximation the alternative replaces the intersection type.
^KT-36249 Fixed
2020-03-05 20:20:47 +03:00
Dmitriy Novozhilov
2bce279a9e
[FIR] Support smartcasts from lhs of boolean operator with jump in rhs
2020-03-05 16:48:48 +03:00
Dmitriy Novozhilov
e3e7b40f85
[FIR] Fix determining coercion to Unit
2020-03-05 16:48:48 +03:00
Dmitriy Novozhilov
770dfb69ba
[FIR] Analyze all statements in block except last one in independent mode
...
Some broken tests will be fixed in next commit
#KT-37176 Fixed
2020-03-05 16:48:47 +03:00
Dmitriy Novozhilov
1c728e8184
[FIR] Fix return expressions calculator
...
There was a problem that if las statement of lambda was a return
expression from that lambda then result of return counted twice
2020-03-05 16:48:47 +03:00
Dmitriy Novozhilov
5f9876479e
[FIR] Add saving of local context in anonymous functions for further resolve
...
#KT-37066 Fixed
2020-03-05 16:48:47 +03:00
Dmitriy Novozhilov
8023d04c61
[FIR] Add separate local scope for init blocks
2020-03-05 16:48:47 +03:00
Dmitriy Novozhilov
50742a4686
[FIR] Move local scopes immutable
2020-03-05 16:48:47 +03:00
Dmitriy Novozhilov
25dc9f948a
Revert "[FIR] Support deserialization of annotations on JVM"
...
This is needed because of that commit tragically decreases performance,
so this changes will be delayed for now
2020-03-05 16:48:47 +03:00
Mikhail Glukhikh
211411a920
Fix FIR test data according to last changes of demiurg
2020-03-04 16:55:30 +03:00
Mikhael Bogdanov
32bcab2867
Switch rest of test to new scheme with configuration kind processing
2020-03-04 14:51:21 +01:00
Mikhael Bogdanov
e3efab5765
Remove FULL_JDK from AbstractFirResolveTestCaseWithStdlib tests
2020-03-04 14:51:17 +01:00
Mikhael Bogdanov
7040857d77
Convert KotlinMultiFileTestWithJava.java to Kotlin
2020-03-04 14:51:14 +01:00
Mikhael Bogdanov
999b762288
Merge 'getTestJdkKind' and 'getJdkKind' and move to base class
2020-03-04 14:51:12 +01:00
Mikhael Bogdanov
a795c38eb7
Introduce base class for codegen and diagnostic tests
...
Extract base TestFile and TestModule classes.
Move coroutinePackage related logic to base class
2020-03-04 14:51:10 +01:00
anastasiia.spaseeva
401023a893
[FIR] Add test for object inner class KT-37120
2020-03-03 23:40:11 +03:00
anastasiia.spaseeva
1ce96b7433
[FIR] Add tests for KT-37091 , KT-37081
2020-03-03 23:40:11 +03:00
anastasiia.spaseeva
9a352ad7b0
[FIR] Add tests for KT-37070 , KT-37066
2020-03-03 23:40:11 +03:00
anastasiia.spaseeva
97007ae6c5
[FIR] Add tests for companionObjectCall
2020-03-03 23:40:11 +03:00
Pavel Kirpichenkov
23ed6c4a1f
[NI] Narrow nullability constraint check in incorporator
...
This commit is a hotfix rather then proper solution.
The source of the issue is that currently type variable fixation result
may change due to fixation order alteration for variables with the same priority.
For instance, having variables V1, V2, and proper types Type1, Type2, such that:
V1 <: Type1
V1 <: V2
Type2 <: V2
both variables will be fixed either to Type1, if V1 will be fixed first,
or to Type2 otherwise.
Since this limitation cannot be easily overcome, the taken approach is to remove
incedental constraint added after 2d5a0546 by restricting nullability constraint check
to `Nothing?` constraints only, thus postponing problematic variable fixation.
To clearify, additional constraint is correct and should cause no harm (in ideal world),
but currently its presence changes fixation order.
So without the restriction the previously used constraint from fixed outer variable
is no longer available by the time problematic variable type is being selected.
^KT-37043 Fixed
2020-03-03 12:57:25 +03:00
Dmitriy Novozhilov
ec01893237
[FIR] Resolve return expressions in independent context
2020-03-03 09:57:45 +03:00
Dmitriy Novozhilov
54e7c79257
[FIR] Safe implicit receiver stack in lambda atom for resolve of inner lambdas
...
#KT-36887 Fixed
2020-03-03 09:57:42 +03:00
Dmitriy Novozhilov
c7f5a2cba2
[FIR] Make ImplicitReceiverStack persistent
2020-03-03 09:57:41 +03:00
Dmitriy Novozhilov
7ee125e1ad
[FIR] Add receiver for lambda in position of default argument
...
#KT-36905 Fixed
2020-03-03 09:57:41 +03:00
Dmitriy Novozhilov
c12fb1e069
[FIR] Fix determining type of when subject in exhaustiveness checker
...
#KT-37091 Fixed
2020-03-03 09:57:41 +03:00
Victor Petukhov
51749b9747
NI: don't try to infer visible lambda parameters, if there is single one – extension parameter
...
^KT-37038 Fixed
2020-03-02 20:28:59 +03:00
Dmitriy Novozhilov
70ee51d88c
[FIR] Add anonymous objects to CFG
2020-03-02 09:49:29 +03:00
Dmitriy Novozhilov
e3f1f18ca3
[FIR] Add empty member scope for type variables
2020-03-02 09:49:29 +03:00
Dmitriy Novozhilov
985311d9f0
[FIR] Implement delegate inference
2020-03-02 09:49:29 +03:00
Dmitriy Novozhilov
1003b81c93
[FIR] Introduce inference session
2020-03-02 09:49:28 +03:00