47 Commits

Author SHA1 Message Date
Anna Kozlova
205ff84754 testdata for EA-443617 T: PsiDiamondTypeImpl.resolveInferredTypesNoCheck
fixed by 5fc2f7118bf68a1d0b9f80bfcbbbfa768fc6bea8

GitOrigin-RevId: 93cfc70499f4f9cc5d8d4ccdbde1df985f1b313f
2022-07-11 13:21:20 +00:00
Anna Kozlova
4dc5c9a5b0 [java] fix assertion condition
https://web.ea.pages.jetbrains.team/#/issue/396705
if method call provides explicit type arguments then no inference happens and there is no need in protection

GitOrigin-RevId: 062e4f6591bbdce03ed7ee8d666bea191bf1ba15
2022-07-06 12:28:57 +00:00
Anna Kozlova
3db82d3846 [java] inference: completely ignore expressions over which overload resolution is started
logging for EA-241551 - NPE: MethodReferenceResolver$0$0.inferTypeArguments, as there is no reproducible example, still

GitOrigin-RevId: 46216cd8171479d14af2283cf9cd4a35e68d9b48
2022-07-04 12:06:22 +00:00
Anna Kozlova
665998b55c [java] don't check poly rExpression from assignment to avoid poly expression type calculation during overload resolution
EA-434232 - T: PsiMethodCallExpressionImpl$TypeEvaluator.fun

GitOrigin-RevId: f8eca5cf007c2d453cafbcc5f72215f7c91daf39
2022-06-30 08:13:27 +00:00
Anna Kozlova
37e5457c2d [psi] ensure that cache in PsiExpressionsList#getExpressions is not corrupted during highlighting (IDEA-296766)
safer it would be to return array.clone() but there is a suspicion that it would to too expensive

GitOrigin-RevId: 9fd84fa2c3ff2d1d982d5747ec0f8f22fa220d5c
2022-06-28 15:34:01 +00:00
Anna Kozlova
e287fd7576 [java] [inference]: avoid recursion guards in clients as they may prevent engine code to complete normally (IDEA-268120)
here highlighting got guarded and inference was unable to walk up to the containing call and failed because of that. Guard is needed for the case when the same code may be invoked *during* inference itself, corresponding guard exists already and mentioned in javadoc

GitOrigin-RevId: bdb8ba5056884d1b6869bd0d31c8482f77adb3a7
2021-05-27 23:14:57 +00:00
Anna Kozlova
056ee5b158 java overload resolution: check constructors by name of the containing class (IDEA-249525)
GitOrigin-RevId: 30fe9e5615f36361bba40b740719a274c9f6786b
2020-08-31 17:41:11 +00:00
Anna Kozlova
0580ad0043 don't prohibit caching if overload resolution is impossible (IDEA-221094)
exactly one candidate is available

GitOrigin-RevId: 4c6d5b4eef79fb60af46d8d9db9f7e49adb2f8c4
2019-12-04 19:31:48 +00:00
Anna.Kozlova
d4ff582489 assert no type execution under overload lock for diamonds
IDEA-CR-55327

GitOrigin-RevId: e2b1043a41b9548df3c2eb263a27da6d6c22b6be
2019-11-19 09:12:58 +00:00
Tagir Valeev
3fa35e0750 testResolveDiamondBeforeOuterCall simplified (TreeSet ctor overloads don't matter here)
GitOrigin-RevId: 6b303239bed1ffcfd94cbd54f781541e38dc5837
2019-11-15 10:05:32 +00:00
Tagir Valeev
85f72bfc0f testResolveDiamondBeforeOuterCall (fails if new expression type is requested before highlighting)
GitOrigin-RevId: b01abb3fbbebe28e3115aa109005851b62a02e7b
2019-11-15 08:03:12 +00:00
Anna Kozlova
eb79bfc3d3 java inference: ease assertion for lambdas in non-generic calls (EA-143883)
GitOrigin-RevId: 0e5ff0aa54375926c8ea5e2140458457250034dc
2019-11-08 21:03:13 +00:00
Anna Kozlova
fb5f755910 java inference: prevent recursive conflict resolution when it isn't prevented by ResolveCache guard
advanceResolve(incomplete=true) prevents guard to work

GitOrigin-RevId: 437ec02af808a89c8339909411bec6d95ff225dc
2019-09-13 07:12:19 +00:00
Anna Kozlova
d829a7c8f4 java inference: ensure that applicability check is not re-entered
this fixes assertion
	at com.intellij.util.ObjectUtils.assertNotNull(ObjectUtils.java:84)
	at com.intellij.psi.infos.MethodCandidateInfo.inferTypeArguments(MethodCandidateInfo.java:453)
caused by including expression compatibility constraints for expressions inside lambdas for which parameter types are calculated

GitOrigin-RevId: 0588bff4a719fb73ff49a51bc86635e56cd8d146
2019-09-05 19:19:32 +00:00
Anna Kozlova
55426d88a9 java resolve: ensure cached all qualifiers do not lead to cached types based on ThreadLocalTypes values
fixes failed check for different types returned on different threads (see JavaResolveCache#reportUnstableType)

GitOrigin-RevId: a5efd5e5a9657ad55c74e413185959c517e341e8
2019-09-01 17:03:16 +00:00
Anna Kozlova
8777687e32 java inference: proceed with nested inference for lambda parameter type detection (IDEA-219330)
GitOrigin-RevId: f0a4862b94f9cff4c88b1f56425663bbd8659d7a
2019-08-07 00:03:21 +03:00
Rustam Vishnyakov
123242c4b2 EditorConfig documentation test
GitOrigin-RevId: fd52ace3d7a32ecd02c2c5ab90e077967604c15e
2019-06-16 04:03:21 +03:00
Egor Zhdan
c1813cfb52 Cleanup: NotNull/Nullable
GitOrigin-RevId: b8e892f32ea84c2115973155dba7127b892cc36e
2019-06-16 04:02:08 +03:00
Anna Kozlova
91f7445298 constructor reference: don't ignore constructor parameters during method reference inference (IDEA-185578)
GitOrigin-RevId: e836468e05db28157713e9edd3c70382f8ecdebc
2019-06-13 03:15:49 +03:00
Egor Zhdan
39d2d77155 Cleanup: NotNull/Nullable
GitOrigin-RevId: b8e892f32ea84c2115973155dba7127b892cc36e
2019-06-13 03:14:35 +03:00
Julia Beliaeva
3fee046d20 [vcs-log] cleanup RootCellRenderer
GitOrigin-RevId: bba216626193ac756cd133b8ae9bc4e577abea42
2019-06-10 04:10:14 +03:00
Eldar Abusalimov
dcaeb8f8c7 OC-4061: ApplicationUtil: Make runWithCheckCanceled() return result
GitOrigin-RevId: 3aa9f23cc5097e644eddf82a4faca669759b4760
2019-06-10 04:09:35 +03:00
Anna Kozlova
bff61142a8 testdata for IDEA-211775
GitOrigin-RevId: d3001a3ef0d439c9701c7d6bf83e9363065477f0
2019-06-05 11:11:42 +03:00
Anton Makeev
aa103fd53c Merge branch 'master' into amakeev/gradle
# Conflicts:
#	community/plugins/gradle/src/org/jetbrains/plugins/gradle/service/settings/IdeaGradleProjectSettingsControlBuilder.java

GitOrigin-RevId: d931e798108685731bf185f7c2e3221680b8e5a2
2019-05-17 19:11:16 +03:00
Anton Makeev
b54aaf7e4e IDEA-210281 Cleanup Gradle settings: separate Runner configurable removed
GitOrigin-RevId: adbc39121fe91beb633e125b4cf39bfe0a422e4b
2019-05-17 19:02:16 +03:00
Anna Kozlova
e7f9f733dd inference testdata: error message should not depend on evaluation order
GitOrigin-RevId: 5de0efc888c6627537d55f7544eb5af96e716ab6
2019-05-11 00:06:26 +03:00
Anna.Kozlova
8b768f2e94 inference: skip constraints and everything dependant above overload resolution 2018-11-15 16:31:25 +01:00
Anna.Kozlova
c4393bfa0e inference: skip constraints that depend on ignored constraints
when type of lambda parameter is calculated, the containing lambda doesn't end in the constraints set; if some other constraints depend on it's output variables, inside those constraints e.g. method calls may be cached based on incomplete inference results which would lead to blinking of highlighting
2018-11-14 15:18:08 +01:00
Anna.Kozlova
6112ab8bb8 inference: avoid side effects from lambda parameter types calculation
process lambda siblings (IDEA-175947)
2017-07-17 15:17:53 +02:00
Anna Kozlova
51bcfcecf9 inference: don't traverse up through lambda bounds when parent inference was already started, in this case it's exception inference which should work without top level node (EA-83073 - assert: LambdaUtil.treeWalkUp; IDEA-173467) 2017-05-26 13:36:45 +03:00
Anna Kozlova
a330f9c2f7 inference: treeWalkUp if overload is done under current argumentList caused by lambda parameter type inference (IDEA-157676) 2016-06-22 15:24:15 +03:00
Anna Kozlova
9c95fa5524 don't try to infer from top if overloaded flag is on (IDEA-156937) 2016-06-02 17:01:51 +03:00
Anna.Kozlova
f36501444c clear diamond inference errors when overload resolution fails 2016-04-28 11:39:38 +02:00
Anna.Kozlova
c35fa1891b if client iterates through candidates of call resolve results and start inference for one of them, then cached top level session should be rejected if it corresponds to another candidate 2016-04-06 12:51:57 +02:00
Anna.Kozlova
cd9c406260 don't cache substitutors during processing of all candidates (blinking red code) 2016-04-05 21:03:27 +02:00
Anna Kozlova
1e764c9961 inference: skip lambda content and all its dependants when lambda type parameter type is calculated 2016-03-03 11:39:53 +01:00
Anna Kozlova
952a9be315 additional testdata for nested lambda inference 2015-11-24 20:00:29 +01:00
Anna Kozlova
773e192f1a recursive getLambdaParameterType problem: don't check nested lambda body for unchecked exceptions, that's impossible anyway (IDEA-146161) 2015-10-09 17:17:09 +02:00
Anna Kozlova
2a27f86b79 new inference: don't clear foreign caches - remove only expressions which were added 2015-10-02 20:32:07 +02:00
Anna Kozlova
f1919cf246 testdata for IDEA-144386 2015-09-03 17:22:25 +03:00
Anna Kozlova
3893b9f6d4 new inference: collect additional constraints from lambda return expressions when lambda parameters are already fixed; process constraints without input variables before others, so their 'return' expressions could influence next rounds; testdata (IDEA-144596) 2015-09-03 17:22:22 +03:00
Anna Kozlova
9a7d951e1e new inference: caching resolve result during getTargetType inference (IDEA-142733; IDEA-140035; IDEA-133385) 2015-09-02 17:04:29 +03:00
Anna Kozlova
6b08a2da04 testdata for IDEA-140035 2015-08-19 12:34:39 +02:00
Anna Kozlova
9bc2885c4c new inference: collect during inference substitutor from inference variables and replace them with type parameters at the very end, excluding foreign variables so e.g. no essential dependency would get overridden by type parameter from sibling call (IDEA-140387) 2015-06-03 22:26:28 +02:00
Anna Kozlova
e86c7dcb25 new inference: assert that no resolve is performed on the "inference-in-progress" reference 2015-04-30 09:47:12 +02:00
Anna Kozlova
3c5b94f461 testdata to check additional constraints 2015-04-29 19:18:19 +02:00
Anna Kozlova
c08649b355 new overload resolution: avoid second conflict resolution for the same conflicts, e.g. because resulted array would be available inside guard of ResolveCache (IDEA-138596) 2015-04-02 18:06:39 +02:00