Commit Graph

132 Commits

Author SHA1 Message Date
Victor Petukhov 982cbf1148 NI: clear calls info in coroutine inference before the second analysis of += right side
^KT-39376 Fixed
2020-06-16 18:26:59 +03:00
Mikhail Zarechenskiy f073e34926 Update forgotten test-data 2020-06-01 15:35:24 +03:00
Mikhail Zarechenskiy a5203428a4 Replace resolution error for suspend-conversion with call checker error 2020-06-01 10:19:34 +03:00
Mikhail Zarechenskiy 36f6ccffde Add test for obsolete issue
#KT-38667 Obsolete
2020-05-08 15:42:43 +03:00
Mikhail Zarechenskiy 11390d9de3 Add test for obsolete issue
#KT-38420 Obsolete
2020-04-27 01:55:39 +03:00
Mikhail Zarechenskiy 537a59d6ca Introduce basic suspend conversion in FE
#KT-15917 In Progress
2020-04-22 16:10:44 +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 38a719cb22 [NI] Fix trace manipulations for builder inference and ::-expressions
For a class literal Type::class we are resolving Type as a constructor,
 getting all diagnostics (about missing arguments, for example) and then
 just not committing this trace with errors

 #KT-37626 Fixed
2020-03-31 15:50:58 +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
Mikhail Zarechenskiy 14f7529c1b [NI] Reanalyze coroutine-block if there is inapplicable call
It's not clear how one should rollback _all_ resolution results if
 there is inapplicable call. Ideally, such calls should not be available
 in coroutine block but for now, to have backward compatibility, we'll
 just reanalyze coroutine block as a usual lambda if there is at least
 one such call.

 As a result, also remove diagnostic about non-applicable call as it
 become useless with current reanalysis

 #KT-37061 Fixed
 #KT-32097 Fixed
 #KT-32203 Fixed
 #KT-35306 Fixed
 #KT-36202 Fixed
 #KT-36220 Fixed
 #KT-32654 Fixed
2020-02-28 10:25:22 +03:00
Mikhail Zarechenskiy f2f95496e3 [NI] Complete contradictory candidates inside builder-inference
In this test `kotlin` was resolved to the extension
 `val Class<T>.kotlin` because it was saved in builder-inference.
 Usually, it's fine, but not for qualified expressions as they have
 fallback resolve in case of error
2020-02-21 17:39:50 +03:00
Mikhail Zarechenskiy 4542f3b720 [NI] Finish analysis for coerced last lambda expressions if needed 2020-02-17 10:29:45 +03:00
Ilya Chernikov 6356807997 Reapply "Only create descriptors for candidates with lambda args"
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01:00
Mikhail Zarechenskiy 319a38bd5c [NI-MIGRATE] Update diagnostic messages 2020-02-13 11:15:59 +03:00
Pavel Kirpichenkov 572dee6835 Revert "Only create descriptors for candidates with lambda args"
This reverts commits:
349d07ad43
2249c223fe

Revert due to differences in test data with NI enabled
^KT-36247 Open
2020-02-12 20:52:30 +03:00
Pavel Kirpichenkov c02dd720dc [NI] Restore missing call checker errors in coroutine inference
Reported diagnostics from the call checkers didn't get to a top-level
trace, if an intermediate wrapping call was a lambda call.
Use of the top-level trace in call completer is a workaround for
the unreliable commit order of common calls' temporary traces.
^KT-33542 Fixed
2020-02-12 12:27:02 +03:00
Ilya Chernikov 2249c223fe Only create descriptors for candidates with lambda args
#KT-36247 fixed
2020-02-10 14:21:02 +01:00
Mikhail Zarechenskiy e42f16c95c [NI] Fix construction of common system for builder inference 2020-01-29 11:43:15 +03:00
Mikhail Zarechenskiy 4f74515508 [NI] Fix CST calculation for covariant type projections 2020-01-16 17:18:20 +03:00
Dmitriy Novozhilov 7733611c47 [TEST] Replace Experimental with OptIn in testdata 2020-01-15 22:12:28 +03:00
Dmitriy Novozhilov 3428a17759 [NI] Postpone calls with not enough information in builder inference 2020-01-15 14:01:25 +03:00
Alexander Udalov 7742a3b697 Rename UseExperimental->OptIn, Experimental->RequiresOptIn in compiler tests 2020-01-14 21:04:42 +01:00
Mikhail Zarechenskiy 3840294f44 Add tests for obsolete issues
#KT-11979 Obsolete
 #KT-12898 Obsolete
 #KT-30657 Obsolete
 #KT-28446 Obsolete
2019-12-20 12:06:20 +03:00
Dmitriy Novozhilov 7fed7a840b [NI] Update some testdata broken in NI 2019-12-20 11:17:47 +03:00
Dmitriy Novozhilov aa8578b675 Allow null operators for result and using Result as return type with enabled InlineClasses 2019-12-19 10:22:45 +03:00
Dmitriy Novozhilov 61c337588b Revert testdata accidentally committed in 665405c4 2019-11-07 10:41:15 +03:00
Dmitriy Novozhilov 665405c435 [FIR] Add discriminating generics into ConeOverloadConflictResolver 2019-11-06 15:05:06 +03:00
Pavel Kirpichenkov 87b88a738e [Minor] Update test data for NI 2019-10-25 19:37:06 +03:00
Pavel Kirpichenkov d886d48cf0 Record resolution results for ambiguous callable references
#KT-34282 Fixed
2019-10-23 18:52:53 +03:00
Pavel Kirpichenkov 02fc921eed Report diagnostics about callable reference resolution ambiguity
Found diagnostics were not reported before.
#KT-32862 In Progress
2019-10-22 13:50:59 +03:00
Mikhail Zarechenskiy 80fa591f10 Fix failing test because of slightly different diagnostics for LV=1.2
There are no `DEBUG_INFO_MISSING_UNRESOLVED` diagnostics for this test
 if one runs it under LV=1.2. These diagnostics are not crucial
 for the test (especially for version 1.2), so use it only with
 the latest stable version

 Plus, reuse test-data to check behavior in new inference
2019-08-21 18:41:13 +03:00
Mikhail Zarechenskiy 6eefea6715 Add tests for obsolete issues
#KT-32395 Obsolete (fixed in 42a5c488)
 #KT-32388 Obsolete (fixed in f3e4c9cd)
 #KT-32271 Obsolete (fixed in 60a0cf1)
2019-07-06 10:06:04 +03:00
Mikhail Zarechenskiy a26cf86af7 [NI] Fix exception: callable reference is used with an unresolved LHS
#KT-32187 Fixed
2019-06-25 14:09:38 +03:00
Mikhail Zarechenskiy fe0282809e [NI] Skip fake call for descriptor from object in builder-inference
This call have interesting rules for resolution, see
 `KtQualifiedExpression.elementChain` function and it's usages:
 resolution results for such call can be omitted and be replaced with
 some other information, while diagnostics will be reported from
 builder-inference.

 To mitigate this problem, we'll just skip this call from builder-inference
 as such calls can't have type parameters anyway

 #KT-32094 Fixed
2019-06-21 11:56:09 +03:00
Mikhail Zarechenskiy bebdf6fcef [NI] Added test for KT-32094 2019-06-21 11:52:44 +03:00
Mikhail Zarechenskiy 5cf7c7e5bf [NI] Fix composite substitution for stubbed type in builder-inference
#KT-32038 Fixed
2019-06-18 19:38:04 +03:00
Dmitriy Novozhilov 0f7e91ff6d [NI] Update testdata for stdlib diagnostic tests 2019-05-29 10:53:34 +03:00
Mikhail Zarechenskiy 8bef345f0f Duplicate test for NI and OI to avoid mismatch of diagnostics
There is a problem with different order of diagnostics for NI and OI,
 so, in order to fix this test, it was duplicated
2019-05-27 17:32:24 +03:00
Mikhail Zarechenskiy cc29ca02f8 [NI] Don't loose inference session during property resolve
#KT-31620 Fixed
2019-05-26 21:31:54 +03:00
Dmitriy Novozhilov ffc0276215 Fix compiler testdata broken in 95544b0 2019-05-23 17:46:16 +03:00
Dmitriy Novozhilov 95544b0970 Add wrappers on KotlinType in EffectSystem
Also that commit removes usages of builtins inside
  effect system and starts refactoring of functor
  composition via composition instead of inheritance.

There are some changes in testdata related to inference of recursive
  functions with implicit return types.

After this commit they all are marked as unresolved. It happens because
  those functions have DeferredType as return type, and computing this
  type produces recursive exception, which provides “typechecker
  recursive problem” diagnostic.

Before this commit, function call was completed successfully, because
  call completer didn’t computed that type, and computation of DeferredType
  were triggered only in `DataFlowAnalyzer.checkType`.
Now, effect system tries to compute that type while wrapping KotlinTypes
  into ESTypes, and effect system itself is triggered in in call completer,
  so, call completion doesn’t finish and function call is marked as unresolved.

#KT-31364
2019-05-23 12:23:22 +03:00
victor.petukhov d4515031de Report warning about implicitly inferred nothing only for return position
^KT-31535 Fixed
2019-05-22 15:45:59 +03:00
Mikhail Zarechenskiy 1fecd15355 [NI] Fix exception on capturing stub type from coroutine-inference
#KT-30853 Fixed
2019-05-06 18:05:02 +03:00
Mikhail Zarechenskiy 1e3db9ee7c [NI] Update test data for diagnostic tests 2019-04-25 16:19:37 +03:00
Dmitriy Novozhilov e70bdb51c5 [NI] Automatically squash equal diagnostics in OI and NI in testdata 2019-04-19 10:53:19 +03:00
Mikhail Zarechenskiy bdab7a88f6 [NI] Add test for obsolete issue
#KT-28658 Obsolete
2019-04-12 15:22:39 +03:00
Mikhail Zarechenskiy a4cbec64b7 [NI] Remove failing codegen tests and add similar diagnostic one
These tests were added for suspend-conversions, it worked only
 with new inference, but implementation was incorrect and had other
 bugs, which were fixed in 1ac25259.
 Support of suspend-conversions will be addressed later with a different
 implementation (#KT-30703)
2019-04-01 01:36:15 +03:00
Mikhail Zarechenskiy 1ac25259e8 [NI] Support callable references to suspend functions
#KT-30658 Fixed
2019-03-29 12:32:01 +03:00
Mikhail Zarechenskiy 017f9aea35 [NI] Builder-inference: fix unresolved reference for variable calls 2019-03-29 12:32:01 +03:00