Mikhail Pyltsin
bed8faeb52
[java-inspections] IDEA-328239 Casting with conjunction
...
- fix formatting
GitOrigin-RevId: 74955a0e5ddc5d5894455fcbfb3bec813d081b84
2023-08-30 13:11:27 +00:00
Mikhail Pyltsin
bdf1d8226d
[java-inspections] IDEA-328239 Casting with conjunction
...
- Check if SAM is implemented in conjunction
- check lambda Methods signature with generic from types
GitOrigin-RevId: 981b75d4417e08bb6e392a2ab78d6104de19b84f
2023-08-29 22:10:43 +00:00
Mikhail Pyltsin
320f621750
Revert "[java-inspections] IDEA-328239 Casting with conjunction"
...
This reverts commit 97e21dbacccd9382e48387295a911b127882e625.
GitOrigin-RevId: 572b3b40ac196132e233d044631ee27b565f0edc
2023-08-29 22:10:40 +00:00
Mikhail Pyltsin
3072396ff6
[java-inspections] IDEA-328239 Casting with conjunction
...
- Check if SAM is implemented in conjunction
- Created lambda Methods signature with generic from types
GitOrigin-RevId: 97e21dbacccd9382e48387295a911b127882e625
2023-08-29 18:57:55 +00:00
Mikhail Pyltsin
899e5292e5
[java-highlighting] IDEA-316141 incorrect resolving static reference to static method in interfaces
...
GitOrigin-RevId: d558946ecb71dd2edb475d96508b1965a1036d9a
2023-04-06 15:51:30 +00:00
Mikhail Pyltsin
7129c6a6e2
[java-completion] IDEA-314367. Completion for similar methods
...
GitOrigin-RevId: ccce34749357dbd8b01625cc4b8322ae50445cf4
2023-03-01 11:24:28 +00:00
Mikhail Pyltsin
ff51cc96fe
[java-completion] IDEA-314367. Completion for similar methods
...
GitOrigin-RevId: 7f12554a48a88920f81b093c58af55ed5c47ffc6
2023-02-28 20:05:18 +00:00
Tagir Valeev
b2dfb4c8a8
[java-highlighting] Do not report lambda return value error if its return type contains unsubstituted type variable
...
Fixes IDEA-310129 IDE hint a wrong position of Java method param compile error
Also: AdaptExpressionTypeFixUtil: try to determine wrong parameter even if several parameter types mention type parameter
Also: AdaptExpressionTypeFixUtil: new type mismatch fix to replace call with qualifier
GitOrigin-RevId: fbc63c0eb3415983ccf52ed5ade15b5895b65b21
2023-01-17 15:37:18 +00:00
Bas Leijdekkers
14a69c17fc
Java: offer quick-fix to implement abstract method in enum (IDEA-231187)
...
GitOrigin-RevId: d7ee95a34123b69ad5ad2b3f59a5da614412e074
2022-12-05 13:46:39 +00:00
Andrey Cherkasov
e7f7a140b7
[java-highlighting] Default method overrides a member of 'java.lang.Object': false negative
...
IDEA-306394
GitOrigin-RevId: 3a5938ae9de0d2d5e0e7c713fa86f4b672fec0d3
2022-11-29 17:01:35 +00:00
Roman Ivanov
ed25641608
[java, parser] more specific error in argument list IDEA-256731
...
GitOrigin-RevId: 66c114bf41f27833279eca995c831af0d43628bb
2022-11-18 14:57:51 +00:00
Tagir Valeev
a0bc3ee404
[java-highlighting] Better actual type definition; fixes for some type mismatch in collectors
...
GitOrigin-RevId: 3652f4511a067b86bc9138f492a2a88cded09de0
2022-08-08 13:59:57 +00:00
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
79200753fb
[java] fix spaces in test data
...
GitOrigin-RevId: d18a60e9f966bf88b2fc2504cc1386606a980941
2022-07-08 14:04:21 +00:00
Anna Kozlova
5a29d515fc
[java] skip diamond inference for constructor calls of static nested classes
...
EA-246216 - T: JavaMethodsConflictResolver.resolveConflict
GitOrigin-RevId: 5fc2f7118bf68a1d0b9f80bfcbbbfa768fc6bea8
2022-07-08 09:59:12 +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
Andrey.Cherkasov
071a2db306
[java-highlighting] Modifier 'final' not allowed at interface methods
...
IDEA-290172
IJ-CR-23088
GitOrigin-RevId: f93deff04def5d65e0fe0463d1f4d5ba8a8b29d9
2022-04-28 03:39:54 +00:00
Anna Kozlova
92c59dacba
[java] [inference] ease conflict detection in intersection types (IDEA-289929)
...
GitOrigin-RevId: aee88647f315474c421c31512f5edad3a4d07dfd
2022-03-04 15:44:51 +00:00
Anna Kozlova
8bb3536c11
[java] effectively final: ensure checks are performed on the same variable
...
GitOrigin-RevId: 77dc60e5a5119eecdd73268e192bd52390dff342
2022-02-10 14:42:24 +00:00
Anna Kozlova
4a300c672b
[java] don't include fully qualified name in unresolved call messages (IDEA-282207)
...
GitOrigin-RevId: 3f22a64e3ab3173157368140af5d072e3cad2654
2022-01-28 07:21:30 +00:00
Anna Kozlova
e3c0d74cb6
[java] don't propagate ellipsis type as target type for non-vararg calls (IDEA-286407)
...
GitOrigin-RevId: 3693373240012db841bffaca1a5f8765200acbc8
2022-01-17 18:21:45 +00:00
Anna Kozlova
724ed16f6f
[java] replace default catch block template (IDEA-161593)
...
`throw e` won't fix the compilation error, comment - is not really better than empty catch block.
GitOrigin-RevId: ea002c332900b032392e766f3dd13fe3258ad49c
2022-01-14 20:39:23 +00:00
Anna Kozlova
e6165048e8
[java] skip plain cannot infer diamond error (IDEA-283409); add ambiguous constructor call (IDEA-272115)
...
this unifies error messages with method calls and allows more specific tooltips and additional fixes
GitOrigin-RevId: 5ab4340d822bba3d6563da12a16e4c41216a8627
2021-11-29 19:27:48 +00:00
Anna Kozlova
0567932ab5
[java] junit 5 tests for fixture based highlighting tests
...
GitOrigin-RevId: a337b1d17a69bffb4df25f5e7c79bda973c5b4a2
2021-11-20 15:15:12 +00:00
Anna Kozlova
c266a5b737
[java] simplify error message
...
GitOrigin-RevId: 82e449029d1d03994dd6b4e68a5d280dd0f5b0b9
2021-11-17 12:03:12 +00:00
Anna Kozlova
846afc113d
[java] expand error message about incompatible lambda expression (IDEA-282399)
...
GitOrigin-RevId: 39b243021881564fea9e2b359433ab79632697f4
2021-11-16 08:08:51 +00:00
Anna Kozlova
1b3bddda3b
[java] [overload resolution] actively prune lambdas with wrong number of parameters (IDEA-279558)
...
GitOrigin-RevId: e6fdb4b920ec38c8f51cef14c33bc2c26321dd09
2021-10-05 19:12:50 +00:00
Anna Kozlova
8e5bc65c2a
[java] [inference] fix explicit type lambda pertinent to applicability check (IDEA-279477)
...
GitOrigin-RevId: f5249362b724b60a4cac5d3856f03f61743d7266
2021-10-04 16:13:22 +00:00
Anna Kozlova
227d48e08b
[java] highlighting: show interface.super error if interface is inherited through super class as well (IDEA-278862)
...
GitOrigin-RevId: fc0fd40caa806a4519f764bd055d6bcdbea0e75f
2021-09-27 07:41:51 +00:00
Anna Kozlova
dea5a38f11
[java] [inference] limit bound promotion per one parameter (IDEA-277612)
...
GitOrigin-RevId: 0ed133250f1c68c5c14b5e6c5683b03084592e1d
2021-09-14 06:40:42 +00:00
Anna Kozlova
f47a4e818b
[java] method references overload resolution (IDEA-276614; IDEA-276613)
...
check static conflicts between applicable methods vs most specific method of another search, as the spec says
GitOrigin-RevId: d11508968a88888c41f6d69e416ab8fa5e915e5d
2021-08-27 11:42:11 +00:00
trushev
7c1c056980
[java] method references overload resolution (IDEA-276614; IDEA-276613)
...
GitOrigin-RevId: a12beac2ccd0ecc2512c8b9feab5e04a868c3935
2021-08-27 11:42:08 +00:00
Anna Kozlova
f33a1f5426
[functional expressions search] check method equality when applicable (IDEA-276298)
...
otherwise unrelated lambdas/method references may land in results when intermediate inheritors contain default methods
GitOrigin-RevId: aa5baae37ff676ca477ca41d82b782c42d5fda6c
2021-08-18 15:11:51 +00:00
Anna Kozlova
d43848c086
[change signature] ensure base method is refactored in functional expression case (IDEA-276192)
...
don't reorder usages for no reason
GitOrigin-RevId: 2bdeee871d696c7351addc4a1a8e886d148f6186
2021-08-18 15:11:50 +00:00
Artemiy Sartakov
fb9bddf05c
MemberModel: do not suggest moving into class if there's enclosing class present (IDEA-274893)
...
GitOrigin-RevId: 8800ed4e42320a3df002be58955a8a02f6149c17
2021-08-09 06:52:21 +00:00
Anna Kozlova
07fe5de1ce
[java inference] treat intersection type in one more place (IDEA-274350)
...
GitOrigin-RevId: d31b30aab900748010f28b02c483c56982d26040
2021-07-27 06:56:28 +00:00
Anna Kozlova
4b7f896333
[java highlighting] skip anonymous class context for its expression list (IDEA-272378)
...
GitOrigin-RevId: 5d8e034a4c550aed057ad860bdbaf1645118e5b3
2021-06-30 14:01:18 +00:00
Artemiy Sartakov
88b4660169
MemberModel: fixed case when there is more than one member out of class (IJ-CR-6471)
...
GitOrigin-RevId: f84b1e8acee891a84ab637ad7fc48492674e5468
2021-06-07 06:15:27 +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
358f9086ce
java inference: allow unresolved type parameters during potential compatibility check (IDEA-268866)
...
GitOrigin-RevId: f38e13385d534b025f8072e29a3558b0f2ecf4e7
2021-05-24 17:22:45 +00:00
Anna Kozlova
8ccd8d71e4
java inference: tolerate raw upper bound (IDEA-229998)
...
GitOrigin-RevId: 90a888a80d9bd304fa908e5ae10a52ecc639752d
2021-05-06 08:45:13 +00:00
Anna Kozlova
e59155ed16
java: discard functional expressions with unbounded wildcards which type parameters depend on other type parameters (IDEA-267644)
...
old spec issue is still not resolved and most probably won't be resolved in the future as would lead to the incompatibilities
GitOrigin-RevId: be74d8ca83ce3c47d1e3dc9eb08de789fb881d2b
2021-04-29 21:40:00 +00:00
Anna Kozlova
89bf390fb1
java: highlight static import if interface method is not accessible (IDEA-262496)
...
GitOrigin-RevId: 8e45087f2b8a95b9333f835eb2779fac1b6fb764
2021-02-19 18:20:18 +00:00
Anna Kozlova
f355f4d8cd
java overload resolution: don't cache anonymous class hierarchies (IDEA-261747)
...
during overload resolution it may lead to caching of a wrong hierarchy, because type of anonymous class with diamonds depends on the surrounding method call
possible optimization: reject caching only for classes with diamonds or only during overload resolution
GitOrigin-RevId: ebdb068fb9052741b8bba2b50e5faefcc541438c
2021-02-10 09:36:31 +00:00
Anna Kozlova
b5ae17aeda
testdata for IDEA-250434
...
GitOrigin-RevId: 2971531084debcf848f19d970f9beec9b9f702ae
2021-01-21 21:46:43 +00:00
Anna Kozlova
ad18c7f009
java inference: setup initial constraints with respect of unchecked warning rules (IDEA-259701)
...
GitOrigin-RevId: e922b0cdfdecf6dfc3a50a334aa21e084aa1dd97
2021-01-18 14:29:55 +00:00
Anna Kozlova
0a73a79b70
diamonds: fix parent hunting inside anonymous class (IDEA-259666)
...
GitOrigin-RevId: 51f47646dbe68e9182b75e3058b0d1216ada92e6
2021-01-18 10:18:03 +00:00