Commit Graph

201 Commits

Author SHA1 Message Date
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
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
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
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
67839b3676 java unchecked warning: narrow down highlighting to class/method reference (IDEA-203860)
GitOrigin-RevId: ee686cedeef7aa677445b5054c9e191ce1d15a77
2019-07-15 12:05:58 +03:00
Anna Kozlova
cf944efffb java: adjusted "Cannot resolve method" message (IDEA-206898)
GitOrigin-RevId: 40fc7d00d6bcc4792dc097dde63dd40d08864068
2019-07-10 23:02:59 +03:00
Artemiy Sartakov
642c65dd11 MethodReturnTypeFix: highlight only return statements when method return type doesn't match expected (IDEA-216275)
GitOrigin-RevId: d5f7dc3b03d68d249ba29532b0e8c0555cae60d6
2019-07-08 15:09:05 +03:00
Anna Kozlova
afa0706bfc java highlighting: provide better incompatible types message on failed inference
GitOrigin-RevId: 5f97ec808f753d9ca40c417704ec93a802512745
2019-07-08 12:04:21 +03:00
Artemiy Sartakov
42d733a694 MethodReturnTypeFix: updated fix to change method return type based on return statements in method body (IDEA-216275)
GitOrigin-RevId: e97990950039123c8c41921a71342b8ed60afdee
2019-07-04 09:02:24 +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
Aleksey Rostovskiy
185284cee6 get rid of intellij.build.toolbox.litegen parameter and use BuildOptions.TOOLBOX_LITE_GEN_STEP to skip it instead
GitOrigin-RevId: 9aac8ee4ed1ebf2a29de18a238825fafb1ab88f9
2019-05-27 15:08:08 +03:00
Alexandr Suhinin
9215f4240b [duplicates] enable duplicates analysis in PyCharm/WebStorm/PhpStorm/RubyMine
GitOrigin-RevId: 1545b79fdca4888f4b94f47f22703fd37694fa7a
2019-05-27 15:07:30 +03:00
Anna Kozlova
1cfa8a070d method ref highlighting: show error on container when functional interface is not fully inferred (IDEA-214550)
GitOrigin-RevId: 8bce63a76385161033d494d1fd2b5439daccaf6d
2019-05-21 13:21:56 +03:00
Anton Makeev
c105e26db3 Merge remote-tracking branch 'origin/master' into amakeev/gradle
GitOrigin-RevId: f9a633252daf311ecab19002c0f4757052eee9dc
2019-05-17 19:13:15 +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
7a61cdc1b7 inference: traverse to parent to get cached target type
GitOrigin-RevId: fb048adc50d2d112b951c87c0e6cf6f5fadc66a2
2019-05-15 21:06:39 +03:00
Dmitry Avdeev
83f21c7197 Merge remote-tracking branch 'origin/master'
GitOrigin-RevId: 211e84dab4063848c1d3d835a526271ee1466636
2019-05-07 17:03:19 +03:00
Dmitry Avdeev
f9664fc455 IDEA-211555 Freeze on completion in XML file
do not process xincludes in ExtensionDomExtender

GitOrigin-RevId: d631dcd52d5bf500b61960473e16237008ad02a3
2019-05-07 17:02:41 +03:00
Anna Kozlova
0374b5f49c conditional expression: use target type for overload cases when assignable
GitOrigin-RevId: 2be5da156f1726f8536e6fc6447ae847629b0001
2019-05-06 11:04:24 +03:00
Anna.Kozlova
bb01072eb6 fix code to compile under java 11 as well 2019-02-11 18:43:21 +01:00
Anna.Kozlova
4c48f0c2b0 inference: check lower bounds to eqBound assignability explicitly (IDEA-204125) 2019-01-22 13:45:02 +01:00
Anna.Kozlova
1f24e30346 inference: process supertypes starting from self to find valid parameterization (IDEA-204125) 2019-01-22 13:45:02 +01:00
Anna.Kozlova
b015644d7a get rid of redundant space in error message 2018-11-21 15:54:15 +01:00
Anna.Kozlova
af3e15a689 highlight method call: don't ignore args with applicable calls as they may still cause parent call incompatibility
IDEA-201175
2018-10-25 16:20:56 +02:00
Anna.Kozlova
9aa64b30d9 inference: allow child session inference if containing method is not generics 2018-10-19 17:52:43 +02:00
Anna.Kozlova
779291d906 ensure fresh variables for the same context don't conflict by names (IDEA-196642) 2018-08-06 19:35:12 +02:00
Anna.Kozlova
fbb178fb85 inference: check intersection type for raw conversion separately (IDEA-196523) 2018-08-01 11:52:03 +02:00
Anna Kozlova
dc43909e2c ensure no inference from not inferred var (IDEA-193828) 2018-06-13 21:00:17 +03:00
Anna Kozlova
ab271fcb5b inference: partially resolve before erasure for target type inference
IDEA-192208
2018-05-28 18:54:01 +03:00
Anna.Kozlova
51a2d549b2 highlight only method name on unhandled exception (IDEA-190912) 2018-04-25 21:11:38 +02:00
Anna.Kozlova
686c13fd01 inference: fix index for non-proper captured wildcard bounds (IDEA-188487) 2018-03-19 17:48:41 +01:00
Anna.Kozlova
bca21ba8c6 inference: substitution for captures (IDEA-186844) 2018-02-19 18:36:42 +01:00
Anna Kozlova
ca1d8a348c postpone highlighting on conditions when errors occur on containing call
poly conditional expression receives type from context, if context contains errors, it's better to highlight those first (IDEA-185540)
2018-01-30 11:33:49 +03:00
Anna Kozlova
e037922937 applicability: get call expr from anonymous class (IDEA-184965) 2018-01-15 20:27:05 +01:00
Anna.Kozlova
20ea015d3e inference: ensure to distinguish new fresh variables of the same node 2017-12-22 10:05:44 +01:00
Anna.Kozlova
1fc76eb779 calc types by applicability constraints if inference fails
include all inference variables for resolve and ignore additional constraints checks if the inference is going to failure; this way if (expr()) would get type of the 'standalone' expression instead of expression with boolean as expected type
2017-12-07 15:51:06 +01:00
Anna.Kozlova
6180b5b337 inference: check substituted intersection type during resolution 2017-12-06 14:54:24 +01:00
Anna.Kozlova
a2e13fee96 inference: check glb conflicts after flatten in intersection type(IDEA-181017) 2017-10-25 18:01:56 +02:00
Anna.Kozlova
2658d37da0 inference: don't remember captured wildcard with non-proper bound (IDEA-180042)
later check could fail e.g. if bound was created inside one of nested session
2017-10-17 17:58:55 +02:00
Anna.Kozlova
465458db4d method references: don't fall to raw substitutor with second search (IDEA-180615) 2017-10-17 11:48:38 +02:00
Anna.Kozlova
250956f8b0 report inference error if resolution failed (IDEA-179978)
in the issue, non-vararg overload candidate was chosen cause it was not filtered as inapplicable
2017-10-13 10:47:47 +02:00
Anna.Kozlova
2f1a299401 captured of non-proper wildcard can't be used as solving bound (IDEA-180042) 2017-10-12 19:38:49 +02:00
Anna Kozlova
b9e2c4130d inference: allow capture during intersection type construction (IDEA-173900) 2017-09-13 15:33:56 +03:00
Anna.Kozlova
07fa74c8b5 inference: restore captured wildcard from fresh type parameter (IDEA-165871; IDEA-176592)
register return type constrain replaces wildcard parametrization with fresh variables aka custom capture conversion. When the specification would deal with these fresh type parameters further, IDEA expects them like PsiCapturedWildcards. Let's restore captured wildcards when inference failed to add any new constraints for fresh variables but initial upper bound of captured wildcard
2017-08-18 19:07:17 +02:00