Commit Graph

954 Commits

Author SHA1 Message Date
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
Anna Kozlova d9145615c7 testdata 2017-06-22 21:46:30 +03:00
Anna Kozlova cbe6eb48ed take into account container class type parameters: return type
detection if return type mentions type parameters should include types specified on outer class
2017-06-22 15:54:30 +03:00
Anna Kozlova 605dfb1c3c redundant cast: ensure cast type compared with ground type (IDEA-174369)
remove attempts to emulate that and reuse getGroundTargetType api
2017-06-13 20:27:13 +03:00
Anna Kozlova fb928f72c6 lambda inference: conditional expressions in returns (IDEA-174301)
skip conditionals and parenthesis during find top expression
2017-06-13 16:12:45 +03:00
Anna Kozlova 634a945b0f apply unifying substitutor to compare return types (IDEA-174292)
attempt to apply incompatible return types in method hierarchy due to method type parameters used in return types
2017-06-13 16:12:44 +03:00
peter 03a663c63e IDEA-165006 Support chained completion for method references in Java 8+ 2017-06-05 19:20:02 +02:00
Anna Kozlova 12c350758d Interface.super method calls: ensure valid qualifier (IDEA-173888)
forbid calls to super methods which are overridden in direct superinterfaces
2017-06-05 14:34:18 +03:00
Anna Kozlova 377520ade5 intersection type validation fixed (IDEA-173900)
take type parameter bounds into account
2017-06-05 14:34:18 +03:00
Anna Kozlova 51bcfcecf9 inference: don't traverse up through lambda bounds when parent inference was already started, in this case it's exception inference which should work without top level node (EA-83073 - assert: LambdaUtil.treeWalkUp; IDEA-173467) 2017-05-26 13:36:45 +03:00
Anna Kozlova 011b8e4e10 checked exception constraints: ensure ground type (IDEA-173200) 2017-05-22 11:25:29 +03:00
Anna Kozlova d31ca80cac testdata for IDEA-158047 2017-05-10 20:35:34 +03:00
Anna Kozlova 728ed62ed0 testdata for IDEA-157350 2017-05-10 20:35:34 +03:00
Anna Kozlova d3b899c7a9 static factory detection for top level method call (IDEA-172566) 2017-05-10 09:14:16 +03:00
Anna Kozlova ee0e90d92c provide applicability substitutor when inference fails for parent expression 2017-05-08 22:58:02 +03:00
Anna Kozlova 77f4894aae inference errors: make applicability error thread safe so multiple threads can perform overload resolution of parent method calls independently, save presentable error when substitutor cached only 2017-05-08 12:12:13 +03:00
Anna Kozlova 7fcea68298 diamonds: copy throws list to static constructors to ensure correct unhandled exceptions, etc 2017-05-05 12:35:43 +03:00
Anna Kozlova 1d36b86e0c lambda: ensure static factory is used when diamonds 2017-05-04 20:29:52 +03:00
Anna Kozlova 5516110b50 lambda: don't hide raw substitutions in functional types hierarchies (IDEA-172301) 2017-05-04 20:29:52 +03:00
peter 24e81df27c IDEA-172186 Autocomplete for interface method does not work if prefixed with 'default' keyword 2017-05-03 16:55:49 +02:00
Anna.Kozlova bdd3f7f3d6 pertinent to applicability: process return statements inside block lambda 2017-04-28 20:23:23 +02:00
Anna.Kozlova b893701408 overload resolution: same signatures should not check return types, etc already processed in hierarchical signatures (IDEA-172129) 2017-04-28 20:23:23 +02:00
Anna.Kozlova ee750f165b ensure array is not accepted as functional interface (IDEA-172048) 2017-04-28 20:23:23 +02:00
Anna.Kozlova 541921d315 testdata for fresh variables during applicability check (javac infers Object and fails) 2017-04-28 10:03:16 +02:00
Anna.Kozlova fbf500d2d4 inference: skip standalone expressions in lambda returns (IDEA-171922) 2017-04-26 16:28:04 +02:00
Anna.Kozlova c4d213ba26 method references: don't infer Object when no constraint exist for 'raw' reference (IDEA-171922) 2017-04-26 16:28:04 +02:00
Anna.Kozlova e2ceb575a2 testdata on javac issue 2017-04-26 16:28:04 +02:00
Anna.Kozlova 58fcabfd2b functional interfaces: allow intersection with 2 independent abstract methods with same signature (IDEA-171622) 2017-04-21 20:03:27 +02:00
Anna.Kozlova 16b0cce4f6 overload resolution: don't skip static method conflicts in classes in hierarchy (IDEA-171617) 2017-04-19 14:01:07 +02:00
Anna.Kozlova c322dd3807 method reference: registry option to skip unsound capture conversion specified in the spec but ignored by the javac, to be changed in the next spec version (IDEA-171488) 2017-04-18 15:03:44 +02:00
Anna.Kozlova a3dca1423c method references: exclude type parameter used in return types only (IDEA-171480) 2017-04-18 15:03:44 +02:00
Anna.Kozlova c917f02b47 testdata for javac resolution order: to be merged in java 9 update 2017-04-11 16:22:35 +02:00
Anna.Kozlova b2ecf6e674 inference: don't fix the lambda return type for nested lambda processing (IDEA-169161) 2017-04-05 18:28:48 +02:00
Anna.Kozlova faa4c93b47 skip errors in case of diamond inference with type parameters on constructor 2017-04-03 13:52:13 +02:00
Anna.Kozlova 51d4e9936a static imports: don't compare with expected type when it depends on unresolved reference (IDEA-163072) 2017-03-31 18:01:29 +02:00
Anna.Kozlova 3da240cba6 method reference: distinguish captured wildcards by target parameters (IDEA-170340) 2017-03-28 10:09:30 +02:00
Anna.Kozlova 9f3dfc8629 check that inferred intersection type doesn't contain same generic type with different type arguments (IDEA-170325) 2017-03-28 10:09:30 +02:00
Anna.Kozlova 95226c21c5 explicit right to left side assignment failure when inference breaks on return type (IDEA-152677) 2017-03-27 10:34:43 +02:00
Roman Shevchenko 6bd1b92c6e [tests] prepares Java tests for the language level raise 2017-03-24 13:19:01 +01:00
Roman Shevchenko 1abffecba5 Cleanup (warnings, formatting) 2017-03-24 13:18:59 +01:00
Anna.Kozlova 9dfdd49e17 find class or interface to search the method: stop when accessible method is found even with static problem (IDEA-169504) 2017-03-15 10:41:42 +01:00