Commit Graph

73 Commits

Author SHA1 Message Date
Dmitriy Novozhilov da0fd7cc15 [FIR2IR] Approximate non-denotable types when converting ConeType to IrType 2021-03-02 19:11:21 +03:00
Victor Petukhov 6f64fd2fec Propagate inference session into declaration analyzers
It prevents missing inference session for local declaration (local functions, local classes or objects)

^KT-44801 Fixed
2021-02-15 11:12:58 +03:00
Victor Petukhov f797ee7803 Substitute captured types with inner intersection one (NewTypeSubstitutor)
^KT-44651 Fixed
2021-02-11 14:20:14 +03:00
Mikhail Glukhikh a6534c4653 [FIR] Fix completion of synthetic call arguments 2020-12-29 17:48:15 +03:00
Victor Petukhov 30a5eee481 Don't approximate abbreviation during substitution it as it can't be projected at top-level
^KT-42036 Fixed
2020-12-29 16:08:38 +03:00
Victor Petukhov 37473ad640 Substitute lambda's receiver type during completion including the builder inference stub variables substitution
^KT-42175 Fixed
2020-12-25 21:33:37 +03:00
Victor Petukhov 50a388aec1 Mute wasm tests around builder inference and callable references 2020-12-25 11:53:21 +03:00
Victor Petukhov 0dde5ddd7e Fail calls constraints of which contain uninferred type parameter
^KT-44055 Fixed

It's possible only if there is a callable reference among subcalls which go though the old type inference (and the error for uninferred type parameter wasn't reported)
2020-12-25 11:53:16 +03:00
Victor Petukhov 4c56962678 Report errors on callable references which contains postponed type variables in the receiver type 2020-12-25 11:53:15 +03:00
Victor Petukhov 1926434b18 Report error about uninferred type parameter for some special call' subcalls 2020-12-25 11:53:14 +03:00
Victor Petukhov 0b472f858b Don't create DONT_CARE type for CR and lambdas within builder inference calls
It leads to leak such type to the back-end. Calls within a builder call should be updated without marking CR and lambdas with DONT_CARE type.

^KT-43845 Fixed
^KT-43956 Fixed
^KT-42622 Fixed
2020-12-25 11:53:14 +03:00
Victor Petukhov b4d8adeeb4 Don't clean type info for containment operator if the resolution was unsuccessful, but all diagnostics were about only input types and non-strict only input types check was enabled 2020-12-25 11:53:09 +03:00
Victor Petukhov 954c9cecca Compute type for callable references and lambdas inside not null assertion if couldn't get already recorded type 2020-12-25 11:52:59 +03:00
Victor Petukhov 39e579db91 Move tests for builder inference into the corresponding directory 2020-12-25 11:25:39 +03:00
Jinseong Jeon 6239301f4e FIR: no constraint for coerced-to-Unit last expression of lambda 2020-12-15 17:52:49 +03:00
Jinseong Jeon 3d7d87ace5 FIR: keep nullability of lambda return type 2020-12-05 12:25:50 +03:00
Svyatoslav Kuzmich fdd7fa5aea [Wasm] Mute codegen box tests 2020-11-09 16:04:43 +03:00
pyos 12bec7cca2 JVM_IR: when convering references to lambdas, bind the receiver
instead of storing it into a captured temporary.

This makes the resulting lambdas equivalend to adapted function
references produced by PSI2IR or FIR2IR.

 #KT-42492 Fixed
2020-10-21 15:21:01 +02:00
Pavel Kirpichenkov 9dd3d8fb14 [NI] Fix extension function check after commonization
`isExtensionFunction` property is false for suspend functions
2020-10-13 11:00:21 +03:00
Pavel Kirpichenkov c53011dd04 [FIR] mute builder inference test
^KT-42591 Open
2020-10-13 11:00:21 +03:00
Pavel Punegov a439860e12 Replace IGNORE_BACKENDs to TARGET_BACKEND for the Java test 2020-10-07 12:18:09 +03:00
Mikhail Glukhikh cebbd21a1e FIR2IR: simplify analysis of companion' callable references 2020-09-29 11:51:21 +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
Dmitriy Novozhilov 0d29d6d361 [FIR] Transform when conditions with boolean expected type
#KT-42130 Fixed
2020-09-24 14:59:35 +03:00
Victor Petukhov c1ebd33833 Capture flexible intersection types properly: take into account both bounds and use the same captured arguments for them
^KT-41693 Fixed
2020-09-09 14:52:12 +03:00
Mikhail Zarechenskiy 9c217e3d99 Reuse revised variables during lambda analysis against type variables
#KT-41400 Fixed
2020-09-01 13:04:53 +03:00
Mikhail Zarechenskiy 23f87d413a Use initial system for completion if common one is effectively empty
Otherwise we can get unsubstituted type variables as expected types and
 then write wrong information for assertions

 #KT-41470 Fixed
2020-08-28 17:47:08 +03:00
Mikhail Zarechenskiy cba13c3c35 Take into account captured types with variables during fixation
#KT-41202 Fixed
2020-08-27 11:06:14 +03:00
Mikhail Zarechenskiy 06a592c018 Fix SOE when recursive type argument is used with star projection
#KT-41043 Fixed
2020-08-26 19:23:21 +03:00
Mikhail Zarechenskiy 674e9e455f Fold lower constraints like (T!!..T) and (T..T?) into the latter one
#KT-41149 Fixed
2020-08-26 19:23:20 +03:00
Mikhail Zarechenskiy 567e6ca9ca Fix OOM when there are several lambdas with extension function types
#KT-41335 Fixed
2020-08-26 19:23:18 +03:00
Mikhail Zarechenskiy ced151f3af Add test for KT-41254
It was fixed along with #KT-41005
2020-08-20 15:45:32 +03:00
Mikhail Zarechenskiy 6ed13ef1b6 Fix unresolved reference to catch parameter from lambda expression
#KT-41140 Fixed
2020-08-19 12:52:16 +03:00
Mikhail Zarechenskiy aafe41cf7a Do not force coercion to Unit for nullable lambda return type
#KT-41005 Fixed
2020-08-13 10:40:51 +03:00
Mikhail Zarechenskiy 2e131b870a Add tests for obsolete issues
#KT-38804 Obsolete
 #KT-38801 Obsolete
 #KT-38835 Obsolete
 #KT-38737 Obsolete
 #KT-38664 Obsolete
 #KT-38549 Obsolete
 #KT-38766 Obsolete
 #KT-38714 Obsolete
2020-08-11 12:34:02 +03:00
Victor Petukhov f45de9d8fb NI: approximate not top-level captured types during code generation
^KT-40693 Fixed
2020-08-05 10:36:36 +03:00
Mikhail Zarechenskiy 100a6f70ca Relax rules about inferring to Nothing for special calls
#KT-37388 Fixed
 #KT-38427 Fixed
 #KT-39953 Fixed
 #KT-38899 Fixed
2020-07-16 09:56:46 +03:00
Mikhail Zarechenskiy 032fdd63d9 Ignore codegen test for Android
There is no such method as java.util.List.stream
2020-06-29 15:26:20 +03:00
Mikhail Zarechenskiy bc34f7f7f5 Add test for obsolete issue
#KT-26345 Obsolete
2020-06-26 07:45:25 +03:00
Mikhail Zarechenskiy 684ca5029f Add tests for obsolete issues
#KT-37734 Obsolete
 #KT-39824 Obsolete
2020-06-26 06:24:59 +03:00
Dmitriy Novozhilov be2ac3bb4f [FIR] Fix completing bodies of property setters with delegates 2020-06-22 12:29:26 +03:00
Victor Petukhov ece61915de NI: clean calls in coroutine inference before the second analysis of += only for right side
^KT-39660 Fixed
2020-06-18 17:09:59 +03:00
Ilya Gorbunov 2fe222e8e7 Add SKIP_DCE_DRIVEN directive in JS-IR tests
Otherwise they fail with a compiler exception:
"An operation is not implemented: SAM conversion"
2020-06-17 19:45:15 +03:00
Jinseong Jeon 615636ed55 FIR2IR: apply SAM conversion to arguments of functional type. 2020-05-15 15:08:43 +03:00
Mikhail Glukhikh e7e80be34a [FIR2IR] Populate overridden symbols even for !isOverride
Before this commit we considered !isOverride as a sign that
function / field / accessor has no overridden symbols.
However, it's false for deserialized, because isOverride
is always false there.

This commit fixes 68 BB tests but breaks 25 BB tests (not yet muted)
2020-05-14 13:40:36 +03:00
Jinseong Jeon c26adf53dd FIR: resolve suspend lambda properly 2020-04-20 17:05:30 +03:00
Mikhail Zarechenskiy befa1e114c Add tests for obsolete issues
#KT-38092 Obsolete
 #KT-38179 Obsolete
 #KT-35105 Obsolete
 #KT-36696 Obsolete
 #KT-36947 Obsolete
 #KT-37337 Obsolete
 #KT-37309 Obsolete
 #KT-37727 Obsolete
 #KT-37735 Obsolete
 #KT-37853 Obsolete
 #KT-37920 Obsolete
 #KT-37709 Obsolete
 #KT-37706 Obsolete
2020-04-20 04:10:37 +03:00
Mikhail Zarechenskiy 4ffcbc0c2f [NI] Properly support UnsafeVariance annotation
#KT-38134 Fixed
 #KT-34433 Fixed
 #KT-31823 Fixed
2020-04-16 13:55:47 +03:00
Mikhail Glukhikh c0f8be5d4e [FIR2IR] Generate setter call for assignments, if any 2020-03-18 17:09:35 +03:00
Alexander Udalov d668808b44 Migrate Experimental->RequiresOptIn in project sources 2020-03-10 12:07:15 +01:00