Commit Graph

994 Commits

Author SHA1 Message Date
Anna.Kozlova 686c13fd01 inference: fix index for non-proper captured wildcard bounds (IDEA-188487) 2018-03-19 17:48:41 +01:00
Anna.Kozlova e75b0faed2 inference: ensure erasure flag is pushed to the container expression
IDEA-185316
2018-03-14 17:39:04 +01:00
Anna.Kozlova 51f6813ee3 valid static method reference on class's inheritor (IDEA-187974) 2018-03-09 11:44:47 +01:00
Anna.Kozlova 36b1e622eb inference: skip bounds checking for captured fresh variables (IDEA-187943) 2018-03-08 19:06:30 +01:00
Anna.Kozlova 877b2424ce inference: don't process lambda return expressions for void return type
those lambda return expressions can't influence containing call inference according to lambda constraint; which means that no additional inference variables could be propagated during inference process hence exception constraints could operate with proper types which are in fact type parameters - which would lead to unhandled exceptions on the top level (IDEA-187930)
2018-03-08 11:53:52 +01:00
Anna Kozlova 424081efe0 interface static methods in method refs by subclass error (IDEA-187330) 2018-03-07 08:02:41 +01:00
Anna Kozlova f295742259 interface static methods in method refs by subclass error (IDEA-187330) 2018-03-07 08:02:41 +01:00
Anna.Kozlova bca21ba8c6 inference: substitution for captures (IDEA-186844) 2018-02-19 18:36:42 +01:00
Tagir Valeev 4234f0d140 EffectiveFinal tests reported in IDEA-154224, IDEA-163280, IDEA-171790 2018-02-08 13:21:31 +07:00
Anna.Kozlova be6d0a2981 false positive in redundant cast: applicable method with inference error (IDEA-186224) 2018-02-07 09:44:28 +01:00
Anna Kozlova f1536bb969 use lambda to avoid context remapping (IDEA-185448)
for anonymous class this expressions have to be encoded to point to outer class, for lambda expressions there is no need for that. Leave unchanged (array initializer) for old java versions
2018-01-30 19:38:53 +03: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 04b7efb5cd don't calculate substitution for overload resolution applicability checks 2018-01-22 17:07:38 +03:00
Anna Kozlova e037922937 applicability: get call expr from anonymous class (IDEA-184965) 2018-01-15 20:27:05 +01:00
peter 9c671df7d1 complete Collectors methods inside collect() call (IDEA-181449) 2018-01-08 18:52:37 +01:00
Anna.Kozlova 52bd45c9b2 reject functional expressions as conditional condition (IDEA-184667) 2018-01-08 17:05:50 +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 15020a138d enum constants resolution cached (IDEA-183841) 2017-12-18 10:23:01 +01:00
peter 9ad8c63df4 java completion: lambda items should be higher than recently selected items (IDEA-183824) 2017-12-15 20:12:49 +01:00
Anna.Kozlova 9e20e117d6 skip inference for incompatible method references
EA-103416 - assert: PsiMethodReferenceCompatibilityConstraint.getSubstitutor
2017-12-14 18:45:49 +01:00
Anna.Kozlova 1d6641db80 overload resolution: check method hiding for static only (IDEA-183712)
non-static methods should already be covered by same signatures check
2017-12-13 14:10:59 +01:00
peter beb4f6dba7 move completion suggestions before lambda only when they really match specific expected type (IDEA-183592) 2017-12-12 17:55:37 +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 e67bf2488b method references: do not prefer varargs from first search (IDEA-182018) 2017-11-13 16:41:50 +01:00
peter 76641748e0 java completion: prefer lambdas over method references (IDEA-181662) 2017-11-07 21:51:31 +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 c8f8341d2f don't treat static method as concrete in hierarchy (IDEA-180930) 2017-10-25 18:01:56 +02:00
Anna.Kozlova 6bb976899e overload resolution: resolve conflicts with static methods in super interfaces 2017-10-24 10:57:06 +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 bffca304b9 glb: ensure each super class processed once (IDEA-176779) 2017-10-17 11:48:38 +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 14cb19fa39 overload resolution: accept unqualified calls of static interface methods (IDEA-180236) 2017-10-09 15:00:48 +02:00
Anna.Kozlova 9728678ff4 method references: don't swallow errors during method ref inference (IDEA-179706) 2017-09-29 14:31:21 +02:00
Anna.Kozlova 643e046c85 EA-107704 - assert: InferenceSession.<init> 2017-09-26 14:33:30 +02:00
peter dd920e884e completion: place functional expressions after variables of expected type (IDEA-174428, IDEA-178600) 2017-09-15 22:04:11 +02:00
Anna Kozlova b9e2c4130d inference: allow capture during intersection type construction (IDEA-173900) 2017-09-13 15:33:56 +03:00
Anna Kozlova b0ccbdebcf exception inference: don't check non-applicable methods (IDEA-178762) 2017-09-12 21:05:35 +03:00
Anna Kozlova 8032558bec highlighting: don't check static methods for unrelated inheritance (IDEA-178539)
in class case, static methods must have signatures with different erasures, for interfaces, static methods
2017-09-06 19:42:01 +03:00
Anna Kozlova b23c6b026b can complete normally: break inside switch (IDEA-178304)
break inside switch when switch is selected should not lead to abnormal completion
2017-09-04 12:28:22 +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
Anna.Kozlova 3d1ba95725 unhandled exception: shrink the highlighted range (IDEA-177234) 2017-08-09 18:38:29 +02:00
Anna.Kozlova dec0d16597 overload resolution: adapt return types before comparing (IDEA-177065) 2017-08-07 18:28:03 +02: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 9e0394a757 lambda constraints: proceed with return expressions (IDEA-175426)
lambda with formal types won't lead to additional constraint after return type constraint processing, thus it need to be processed additionally
2017-07-05 16:48:52 +02:00
Anna.Kozlova 1699697000 testdata for IDEA-175280 2017-07-03 16:53:16 +02:00
Anna Kozlova 088510d098 skip warnings for constructor refs with varargs (IDEA-174074) 2017-06-27 19:47:53 +03:00
Anna Kozlova 0e5a7bca67 testdata for IDEA-174924 2017-06-23 18:19:42 +03:00