Commit Graph

1144 Commits

Author SHA1 Message Date
Anna Kozlova
636bbda18f java highlighting: give up check of @PolymorphicSignature methods (IDEA-251449)
GitOrigin-RevId: cf986ee46e52d6cabfc309776559481d42e6c5ce
2020-09-25 19:53:53 +00:00
Tagir Valeev
044abd82e1 [java-highlighting] Avoid TextRange computation until necessary
GitOrigin-RevId: 8d2b32d3b5353a1ff4b855acc779d69907f935af
2020-09-23 11:13:43 +00:00
Anna Kozlova
0faebe5de7 java redundant cast: no semantic serialization when expected type is also serializable (IDEA-249705)
GitOrigin-RevId: 7ffe4dc7ef44099630afe65d7fb545337d982f7b
2020-09-21 20:35:20 +00:00
Anna Kozlova
cdbae12245 java redundant cast: check conditional poly expression after cast is removed (IDEA-251055)
GitOrigin-RevId: 32c2f18de0725a517f1ceb746edc8fa468b6fafa
2020-09-21 20:35:18 +00:00
Anna Kozlova
34526b2b5c java error message: explicit method reference ambiguity (IDEA-250654)
GitOrigin-RevId: 1fc5f577f298a7f874a111866a394aa7a6c09cc0
2020-09-14 18:40:35 +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
Peter Gromov
0cb5839b13 IDEA-246339 Do not suggest stream methods on method reference completion
GitOrigin-RevId: a72a1bda98f47056b893c31b1d0f894df3ced82a
2020-07-22 15:09:00 +00:00
Peter Gromov
b8dc92e383 fix for EA-234762 - CCE: StreamConversion.generateStreamSuggestions (IDEA-CR-65315)
GitOrigin-RevId: 7c04c7efa0523bfeeb7fa2932ec7e9535ca23425
2020-07-22 15:08:59 +00:00
Peter Gromov
1182518e6b JavaFunctionalExpressionIndex: don't throw on invalid code with lambdas outside members
GitOrigin-RevId: b2fac86f104ebf9d7a79dfc8136a69e7343adbb4
2020-06-19 19:49:34 +03:00
Peter Gromov
112cdd0579 java completion: prefer method reference suggestions with exactly matching return type (IDEA-210581)
GitOrigin-RevId: 5522e5c103b72ea9d1a7c9ae860e504b6515b1da
2020-06-17 20:39:35 +03:00
Peter Gromov
1ab76a3b95 Skip some invalid/meaningless .stream().* completion suggestions (IDEA-243790)
GitOrigin-RevId: e02ac9f63fd6384ffe3f27f5c4825ddc3a5af58e
2020-06-17 19:18:12 +03:00
Peter Gromov
b9525d143e java completion: sort/filter suggestions after :: by their matching to the expected type (IDEA-166673)
GitOrigin-RevId: adaefc912e115826280976b23adee38483ca1f71
2020-06-17 17:01:52 +03:00
Peter Gromov
847bb51000 IDEA-188654 Stream API methods autocomplete
GitOrigin-RevId: c4e2caba222324726aad91148ab37c0acf4fd86a
2020-06-08 08:20:56 +00:00
Peter Gromov
29ef77afd0 IDEA-242422 ArrayIndexOutOfBoundsException in FunExprOccurrence
GitOrigin-RevId: d0b1b4e881c919d9e855f897452c371dd12f2a59
2020-06-03 15:56:48 +03:00
Anna Kozlova
0314adac6d java: redundant cast: don't check casts against non-denotable types
GitOrigin-RevId: ba1ac48a92057ae13f2694a6667e576ca1328134
2020-05-20 06:38:50 +00:00
Anna Kozlova
4b5272c14a java: redundant cast: check inference problems in cast operand
expected type (available after removing type cast) may add bounds for inference variables which would lead to errors after applying the fix

GitOrigin-RevId: 24a97411b7175cacabd8e81ed5711509195dfd4d
2020-05-15 20:27:18 +00:00
Anna Kozlova
2bc23faf05 java: redundant cast: preserve exact types for functional expressions
otherwise we may loose serialization or miss compilation errors in lambda body

GitOrigin-RevId: 180e0ee713a19c42abecf1228616bbd6754ea3b8
2020-05-15 08:33:44 +00:00
Anna Kozlova
c879ed4e4a java redundant cast: preserve multiple type casts around functional interface when if expected type is the same as cast
isAssignable check may fail otherwise

GitOrigin-RevId: d02c9d50645a2bbb0e957f077a4a66813c94afd6
2020-05-11 20:09:58 +00:00
Anna Kozlova
7f02ca14a9 java redundant cast: check conditional expression as call argument inplace
GitOrigin-RevId: ee7fa6ef4cac4e39e9dad97c7d5ace983bc81044
2020-05-11 08:33:17 +00:00
Anna Kozlova
e3bc888dc7 java redundant cast: cleanup checks for calls
GitOrigin-RevId: 2d999bc7356856ef7d2fea45f793d69f401f7256
2020-05-11 08:33:17 +00:00
Anna Kozlova
78891be4bb java redundant cast: cleanup: extract conditional
GitOrigin-RevId: ca95c0e70c197e27943596e91df8d526bbfbf1bb
2020-05-11 08:33:17 +00:00
Anna Kozlova
efc6106e02 java redundant cast: cleanup: avoid dbl cast registration for expressions with expected type
GitOrigin-RevId: a31b1d892b2e19bfaf556e85724eb244189111b4
2020-05-11 08:33:17 +00:00
Anna Kozlova
fdc80d017c java redundant cast: fixed multiple casts in synchronized stmt
GitOrigin-RevId: 49a7d8dbcd26a3aa905c57db97d386bcbd285464
2020-05-11 08:33:17 +00:00
Anna Kozlova
1c35803b4a java redundant cast: cleanup: extract foreach, instanceof, throws statements
GitOrigin-RevId: ac04ea8db453518f4c15d3e37e33d9a25a22ce35
2020-05-11 08:33:17 +00:00
Anna Kozlova
0a41902bda java redundant cast: normalize parenthesis
GitOrigin-RevId: 8069758686e0e76c3aed4d6851914315d29a493e
2020-05-05 21:49:48 +00:00
Anna Kozlova
c2ec0c2e78 java redundant cast: forbid changing of substitutor if cast is removed (IDEA-184330)
this way neighbour functional expressions can't be broken

GitOrigin-RevId: c13823eca79157030f3dde53fa6a6d496be9c2b7
2020-05-05 21:49:48 +00:00
Anna Kozlova
349c96eaee java redundant cast: allow warnings in poly conditional when target type remains the same
GitOrigin-RevId: f953fc42882a1eaad0b0a8c65d1e94236f0ec99e
2020-05-05 11:29:06 +00:00
Anna Kozlova
462856d81c java: ensure that lambda parameters are available inside lambdabody.copy() (IDEA-222542)
GitOrigin-RevId: b31c6c8484d8e77e96dfad104b08ce13631ddeaa
2020-05-05 07:04:28 +00:00
Anna Kozlova
02d7164d3b java redundant cast: check erased context (IDEA-205885)
GitOrigin-RevId: 1dd464c7b8feba43181c9e60472170b2bbbaa72e
2020-05-04 20:49:32 +00:00
Tagir Valeev
3643ee6506 Fixes according to review IDEA-CR-61871
GitOrigin-RevId: 206247808adba050a5839ee8ac0be790bb53c8ac
2020-04-24 08:26:53 +00:00
Tagir Valeev
ec8510b0a6 PsiPolyExpressionUtil#isBooleanOrNumericType: do not check bounds
JLS 15.25 says: ...has return type boolean or Boolean. or ...is convertible to a numeric type.
JLS 5.1.8 says:
A type is said to be convertible to a numeric type if it is a numeric type (§4.2), or it is a reference type that may be converted to a numeric type by unboxing conversion.

Nothing about bounds
PolyConditionalExpressionWithTargetPrimitive test behavior matches Java 9+ now (with --release=8)

GitOrigin-RevId: fa14e909ad623a3ab6bb8355bbbe396003cd782c
2020-04-23 08:56:21 +00:00
Peter Gromov
0b3f27a0af java: make resolveAllQualifiers go through RecursionManager to take advantage of its memoization (IDEA-236961)
GitOrigin-RevId: 1bfe281cbfaa8c6423a12313daf6f72aae738846
2020-04-17 06:14:17 +00:00
Anna Kozlova
641ac74ad8 java inference: support nested constraints inside code blocks (IDEA-237446)
GitOrigin-RevId: e865db7a88560615b1abca31b3ceefeb1ae76573
2020-04-14 12:01:57 +00:00
Anna Kozlova
d439f31f50 failing performance test for IDEA-236961
GitOrigin-RevId: 37ffa237be6c2c6965d8ce72854ef2976c6c837d
2020-04-14 09:20:37 +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
4ad4e7d908 java overload resolution: fix NPE
found by property testing

GitOrigin-RevId: b45cb07402ad58a37886b7f1b5afb62bca2746fe
2019-12-04 09:38:15 +00:00
Anna.Kozlova
21e434894f java inference: stop when argument has no associated formal parameter
GitOrigin-RevId: cbc4e435f6e03bd06eac4dcf21196bdd61dc6c3d
2019-12-03 16:04:11 +00:00
Anna.Kozlova
c20dfc0165 java inference: ignore method reference constraints when starting from them
EA-209460 - IAE: ObjectUtils.$$$reportNull$$$

GitOrigin-RevId: 8476b832fcc1c85c10aed6ea56f65645bfd02b03
2019-11-28 10:38:15 +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
856ec460c6 overload resolution: detect qualifier of unqualified call by processDeclaration's source where candidate was found
conflict resolution for static methods of the interface found by inheritance and nesting

GitOrigin-RevId: b637b02de4f59010a138c66890d1efcbcd1d588d
2019-11-07 02:40:58 +00:00
Anna Kozlova
d6297185ce java resolve: don't stop on found static method of the interface (IDEA-225660)
if the call site' qualifier is incorrect

GitOrigin-RevId: 782629045050df08fed3cf554682b63db8c9e1a8
2019-11-07 02:40:58 +00:00
Anna.Kozlova
589b029a97 java method ref highlighting: don't mirror errors of not applicable methods of return type (IDEA-224306)
GitOrigin-RevId: 40b4293c754640445b9fac741eab24261e8060cc
2019-10-10 10:03:10 +00:00
Anna.Kozlova
87deef960c incompatible types: highlight parent call instead of lambda when the error isn't related to lambda (IDEA-218801)
GitOrigin-RevId: 17a2f1f62f7703930aa25a8cfd6dfd4a918e1fe7
2019-10-10 07:01:11 +00:00
Anna.Kozlova
8db821428d lvti: special highlight for self referencing variables (IDEA-224449)
assume that null as type of the left side of the assignment is not possible

GitOrigin-RevId: c407cdc11e991c8db24ffd683f3b8ea883d41244
2019-10-09 10:32:32 +00:00
Anna Kozlova
1768efa804 incompatible types: highlight only wrong arguments instead of full arg list (IDEA-220107)
GitOrigin-RevId: 38a12e4fa7ea27d156dae1fe6bc7bd6902db6251
2019-09-20 19:31:36 +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