Commit Graph

134 Commits

Author SHA1 Message Date
Anna Kozlova 1193a54876 warn about unused parameter if method is used locally as method reference as it could be transformed to equivalent lambda (IDEA-157988) 2016-06-29 20:32:32 +03:00
Anna.Kozlova f64bd14441 method refs: site substitution should not replace session setup (IDEA-154722) 2016-04-14 12:28:44 +02:00
Anna.Kozlova d780e31bdf inference: ensure foreign variables do not participate in inference process, e.g. variables from method reference overload resolution (IDEA-154622) 2016-04-13 21:11:02 +02:00
Anna.Kozlova 9086115347 method ref: type parameter instantiation (IDEA-154645) 2016-04-13 12:30:54 +02:00
Anna.Kozlova f139c4cef4 new inference: check provided lower bounds on type parameters, in case of fresh variables they declare the type hierarchy and otherwise constrains won't agree (IDEA-153642) 2016-03-29 16:51:50 +02:00
Anna Kozlova 119449501b testdata for IDEA-152659 2016-03-09 14:23:53 +01: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 3434d9cc47 method reference: capture wildcards of new expressions (IDEA-152115) 2016-02-25 19:42:52 +01:00
Anna Kozlova ea9e4ba63c method reference on getClass: fix method reference constraint 2016-02-01 16:53:20 +03:00
Anna Kozlova e6357ca1dd method refs: fix getClass() return type in case of method references 2016-02-01 16:53:20 +03:00
Anna Kozlova 0d1cca1cd1 inference: force incorporation after reduce 2016-01-19 20:46:08 +01:00
Anna Kozlova 0926ee29c1 TypeName.super checks for classes fixed (IDEA-150141) 2016-01-14 18:42:40 +01:00
Anna Kozlova 88586f6ab9 method refs: captured wildcard at receiver position
EA-77434 - assert: PsiMethodReferenceCompatibilityConstraint.getParameterizedTypeSubstitutor
2016-01-04 19:25:03 +01:00
Anna Kozlova 105f33870f method references with qualifier with captured wildcard type: retrieve upper bound as it is done for method calls 2015-12-30 18:56:58 +01:00
Anna Kozlova 6aa61227df method reference: replace raw substitutor from second search with inferred substitutor and don't forget super class substitution (IDEA-149488) 2015-12-30 15:29:56 +01:00
Anna Kozlova 242cd356a7 method reference: additional diagnostics for invalid method references (IDEA-149688) 2015-12-29 16:46:58 +01:00
Anna Kozlova 132bb137a1 don't show error on method reference if functional expression is located inside invalid context without target functional type 2015-12-10 19:52:16 +01:00
Anna Kozlova 3f72d428a8 method references: show candidates if overload resolution failed (IDEA-148974) 2015-12-10 17:01:55 +01:00
Anna Kozlova 4768643b60 new inference: capture implicit param types (IDEA-132716) 2015-12-03 19:11:09 +01:00
Anna Kozlova 36ea2f9041 testdata for IDEA-148841 2015-12-03 15:27:26 +01:00
Anna Kozlova 5ac3bde398 testdata for IDEA-148093 2015-12-02 15:42:02 +01:00
Anna Kozlova 621795bbee isApplicability check based on pertinentToApplicability 2015-11-30 15:11:41 +01:00
Anna Kozlova e740dbe245 testdata for IDEA-148553 2015-11-27 18:04:56 +01:00
Anna Kozlova e43fad4277 captured wildcards: don't open unpredictably, treat as type, not type argument (IDEA-148348) 2015-11-26 19:23:09 +01:00
Anna Kozlova 61f120b30e new overload resolution: first check that collected methods are potentially compatible with args; for generic methods without specified type arguments this already means that they are applicable; for non generic methods (or raw method calls) expressions should be compatible with parameter types (formal parameter types = actual types as substitutor is known) (IDEA-147798) 2015-11-20 18:22:02 +01:00
Anna Kozlova b4396c8f98 new inference: register incompatible message if inference fails (IDEA-131882; to be extended); filter out candidates if inference had failed for them 2015-11-19 20:43:59 +01:00
Anna Kozlova e1f9d33a32 testdata for IDEA-147873 2015-11-13 16:07:17 +01:00
Anna Kozlova c29f92472e inferred type check for raw constraints (IDEA-147529) 2015-11-10 18:45:36 +01:00
Anna Kozlova a73d1238ff testdata for IDEA-147511 2015-11-06 16:21:29 +01:00
Anna Kozlova 2d21b7777e method reference: don't start containing class parameter type inference for receiver-reference; corresponding substitutor should be already known (IDEA-146604; IDEA-147223) 2015-11-03 17:10:58 +01:00
Anna Kozlova 010dd7c48d testdata for IDEA-136708 2015-10-05 11:51:32 +02:00
Anna Kozlova 75c14f25b6 testdata for IDEA-138752 2015-10-05 11:51:30 +02:00
Anna Kozlova 76c7aaf56e new inference inside enum constants (IDEA-145211) 2015-09-17 13:42:49 +03:00
Anna Kozlova f61de7a241 method refs: ensure inference from captured return type (IDEA-145152) 2015-09-16 18:53:31 +03:00
Anna Kozlova 4518420113 don't correct substitution if not applicable, e.g. for unresolved functional types 2015-08-18 19:15:37 +02:00
Anna Kozlova 3a9f429d3e method references on lambda parameters for incomplete code (EA-66008 - assert: InferenceSession.collectApplicabilityConstraints) 2015-07-22 12:34:09 +02:00
Anna Kozlova 024f917277 method refs: return type check fix for raw constructor (IDEA-142302) 2015-07-06 17:37:31 +03:00
Anna Kozlova fe400fc988 method refs: infer 'diamond' if constructor ref type is raw (IDEA-142142) 2015-07-02 20:08:10 +03:00
Anna Kozlova 74f9ac5a46 method ref: don't check method reference qualifier against functional interface (IDEA-141343) 2015-06-11 16:46:12 +03:00
Anna Kozlova f18948a3a2 testdata for IDEA-140586 2015-05-21 21:53:42 +02:00
Anna Kozlova db72cccc97 method refs: missed qualifier substitution for return type (IDEA-140539) 2015-05-21 14:11:26 +02:00
Anna Kozlova 1d5ff33cbe extend check for enclosing instance for java 8 default methods in interfaces (IDEA-140492) 2015-05-20 13:49:51 +02:00
Anna Kozlova 570a188199 method refs: non-raw receiver type should influence collected constraints (IDEA-140002) 2015-05-11 18:04:29 +02:00
Anna Kozlova dd1b0c2796 method reference: ignore already handled exceptions (IDEA-137694) 2015-03-18 14:09:58 +01:00
Anna Kozlova 80bc7dad79 preprocess substitutor for receiver type exact references during reduction (IDEA-137417)
(cherry picked from commit 8515ed9707c6a5a61a7d908024247e523b89f08f)
2015-03-11 20:31:42 +01:00
Anna Kozlova c0dee3fb75 method refs: ensure non-resolved method refs are not marked as exact (EA-59172 - assert: TypeConversionUtil.reportHierarchyInconsistency) 2015-02-25 20:34:39 +01:00
Anna Kozlova ab8c437a33 method refs: simplify if first parameter is a receiver for method reference (IDEA-136882) 2015-02-24 15:04:54 +01:00
Anna Kozlova ab09470050 method refs: missed super substitutor (IDEA-136717) 2015-02-19 20:40:49 +01:00
Anna Kozlova b06817081b new inference: reject to infer variables if it's upper bound doesn't agree with lower/equal bound (when present) 2015-02-19 18:07:55 +01:00
Anna Kozlova 106ba612ce new inference: ignore return type constraints during method reference conflict resolving; work around raw type received from constructor reference given on raw type to be treated as diamond 2015-02-18 17:18:46 +01:00