Commit Graph

1082 Commits

Author SHA1 Message Date
Anna.Kozlova e55fbf3f1d isEffectivelyFinal: disallow effectively final variables to be initialized twice (IDEA-165060) 2016-12-06 17:54:19 +01:00
Anna.Kozlova 382b78aeca unrelated defaults: check if current class contains explicit method (IDEA-164732) 2016-12-02 11:51:07 +01:00
Anna.Kozlova 936294e05d allow functional expressions in nested conditional expressions (IDEA-164828) 2016-12-01 16:52:02 +01:00
Anna.Kozlova a17be30b79 include package local methods into method hierarchy (IDEA-164557) 2016-12-01 10:39:31 +01:00
Anna.Kozlova 049a253fdf inference: don't erase types when target type is parameterized with unbounded wildcards only, in this case no unchecked warning would be generated and the types won't be affected by unchecked warning clause 2016-11-23 11:53:29 +01:00
Anna.Kozlova becb6c7387 inference: mark call unchecked required when proper types are compared (IDEA-164243) 2016-11-21 19:33:20 +01:00
Anna.Kozlova ec82847b4e resolve for method reference qualifier should prefer classes in case of constructor refs (IDEA-164165) 2016-11-18 17:58:54 +01:00
Anna.Kozlova ccb61093af overload resolution: don't choose most specific method based on boxing property for vararg position (IDEA-163597) 2016-11-17 17:10:53 +01:00
Anna.Kozlova 39aa837db3 inference: don't distinguish parameterizations with 2 different interfaces (IDEA-163950) 2016-11-15 18:11:31 +01:00
Anna.Kozlova b8e4985205 don't erase method invocation type iff unchecked conversion was required during additional constraints processing (IDEA-163503) 2016-11-03 16:38:40 +01:00
Anna.Kozlova bf259fed79 unrelated defaults when one interface overrides 2 unrelated (IDEA-163469) 2016-11-02 15:51:14 +01:00
Anna.Kozlova 80a5866b23 super expression rules should not apply to this expressions (IDEA-163303) 2016-10-28 18:23:21 +02:00
Anna.Kozlova 9bcbdb68cb inference: register inference error when nested inference don't start as cached session already had errors 2016-10-21 18:07:07 +02:00
Anna.Kozlova 3797d3ea1c ensure ambiguity error presentation doesn't depend on previous calls to getSubstitutor() 2016-10-21 18:07:07 +02:00
Anna.Kozlova 12554167e7 inference on incomplete code (EA-90195 - AIOOBE: PsiTypesUtil.getParameterType) 2016-10-20 19:04:25 +02:00
Anna.Kozlova 41c2429966 new inference: postpone unresolved variables in favor to variables with proper equals bound 2016-10-11 10:27:29 +02:00
Anna.Kozlova 98094c72de lambda: ensure deep nested lambdas get target types from top level inference (IDEA-157314) 2016-10-07 13:55:01 +02:00
Anna.Kozlova b560ee5910 lambda highlighting: if return statement has problem, try to highlight only corresponding return even if containing inference failed 2016-10-07 13:55:01 +02:00
Anna.Kozlova 62d25f9d05 new inference: provide incomplete inference results for lambda (IDEA-162035; IDEA-155230) 2016-10-06 16:21:05 +02:00
Anna.Kozlova 031f71c5b3 redundant cast: don't highlight conditional with functional branches (IDEA-161971) 2016-10-04 18:45:14 +02:00
Anna.Kozlova 3332a677a6 allow functional interfaces in conditionals inside assignment or invocation contexts only 2016-10-04 18:45:14 +02:00
peter 53867e057f IDEA-161862 Lambda Expressions not showing as implementations of an interface 2016-09-29 11:31:20 +02:00
Anna Kozlova c95ba9968d testdata 2016-09-22 17:25:47 +03:00
Anna Kozlova 926d7063f5 fix testdata 2016-09-19 18:50:55 +03:00
Anna Kozlova b8f0e626b9 java 8 diamonds: include constructor's type parameters in inference constraints (IDEA-160918) 2016-09-19 17:43:55 +03:00
Anna Kozlova f4dae32d7f overload resolution: prefer candidates with functional formal type if lambda is passed; this way conflict would be resolved and nested error would be shown instead 2016-09-16 08:34:15 +03:00
peter d408fdc798 IDEA-161250 Semicolon added in the middle of code 2016-09-15 12:03:42 +02:00
Anna Kozlova 2ec75e05a1 method refs: prefer unhandled exception to wrong return type error (IDEA-160251) 2016-08-25 17:36:03 +03:00
Anna Kozlova 1bece25b95 inference: when unchecked conversion was applied, resolve variables against raw substitutor 2016-08-17 13:53:02 +03:00
peter 9776d5a28d speedup functional expression search (IDEA-159107)
* filter inapplicable expressions without loading AST if possible, via approximate resolve
* for that, store the approximate call chains in index
* iterate over files once, not for each empty marker Runnable interface separately
* don't rely on generic method parameter index: it's huge, memory-hungry and works only in Java
2016-08-13 12:12:19 +02:00
peter e8ea2598f3 fun expr search: minor improvements after reviews 2016-08-13 12:12:19 +02:00
Anna.Kozlova 369c9a24b4 diamonds: fix conflicting names between constructor and class type parameters (rename the constructor type parameters) 2016-08-09 15:52:11 +02:00
Anna.Kozlova 0e3d077bfe fix inheritance of abstract and default methods when multiple defaults are present 2016-08-09 15:52:11 +02:00
Anna Kozlova 8ac15c13de check context for functional expressions once (IDEA-159362) 2016-08-08 08:35:27 +02:00
Anna Kozlova ccf3beba42 check diamond applicability over static factory underneath (IDEA-159287) 2016-08-08 08:35:27 +02:00
peter 522e0b9c2d don't visit jdk Stream API usages when searching for unrelated functional interface implementations 2016-08-03 12:49:11 +02:00
peter c71a1e7136 IDEA-158267 Parameter completion overwrites the following lambda declaration ' () -> {}' 2016-07-27 12:15:56 +02:00
peter 22b9dc61a6 fin functional expressions of SAM interfaces related to the given one 2016-07-23 23:05:56 +02:00
peter 2a93e063bd rewrite functional expression search to use stub index 2016-07-22 17:41:21 +02:00
Anna.Kozlova 035b6d9d1f lambda return type inconsistency: highlight all found errors (IDEA-158853) 2016-07-21 19:03:45 +02:00
peter 1c451db9ad a test that lambdas in constructor calls are found 2016-07-21 12:16:42 +02:00
peter 0a4f995460 find lambdas passed into vararg methods 2016-07-21 12:16:41 +02:00
Anna.Kozlova 3ee60dba1d method ref: ensure top substitutor is not overridden with raw replacement from second method ref search (IDEA-158636) 2016-07-18 14:57:04 +02:00
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 3cfd5be8c0 bombed test for resolution with cycle 2016-06-29 16:18:27 +03:00
Anna Kozlova 7968b2bbbb apply capture conversion for captured wildcard bound according to the direct supertype of parameterized type specification (IDEA-157586) 2016-06-22 15:24:15 +03:00
Anna Kozlova 3805d51554 subtyping constraint: apply capture conversion for captured wildcard bound according to the direct supertype of parameterized type specification 2016-06-22 15:24:15 +03:00
Anna Kozlova a330f9c2f7 inference: treeWalkUp if overload is done under current argumentList caused by lambda parameter type inference (IDEA-157676) 2016-06-22 15:24:15 +03:00
Anna Kozlova 1fcb534fcb highlight diamonds as type parameter list (IDEA-156859) 2016-06-06 17:52:24 +03:00
Anna Kozlova 3e7b1dca62 conditional: treat nulls separately and accept them as numeric/boolean branches (IDEA-157025) 2016-06-03 15:28:58 +03:00