Commit Graph
3813 Commits
Author SHA1 Message Date
Anna.Kozlova 3cd2baac99 switch expression: correct enhanced old-style result expression calculus
IDEA-CR-40239
2018-12-04 10:44:23 +01:00
Anna.Kozlova 569d069304 fix testdata 2018-12-03 15:27:44 +01:00
Anna.Kozlova d2042376d2 overload resolution: erase type of parameter when site substitutor is raw (IDEA-203450)
similar to erasure of call type when inferred substitutor is raw
2018-12-03 15:21:12 +01:00
Anna.Kozlova a9fe383ced anonymous -> lambda: stop on calls to j.l.Object methods of anonym classes (IDEA-203343) 2018-11-30 19:11:52 +01:00
Anna.Kozlova 9080b35751 switch expression: support old syntax without braces
IDEA-CR-40239
2018-11-30 16:28:02 +01:00
Tagir Valeev 0d96d61986 IDEA-203119 Unwrap switch statement: support expressions 2018-11-28 19:00:05 +07:00
Tagir Valeev 81c9810bde IDEA-203119 Unwrap switch statement: support rule-cases and multiple expression cases 2018-11-28 19:00:04 +07:00
Anna.Kozlova ec5c0c4a60 variable already assigned: ensure second assignment is raised, simplification (IDEA-202897) 2018-11-27 16:23:53 +01:00
Tagir Valeev 67f783a00f SurroundWithRequireNonNull testdata fixed after precise nullability reporting 2018-11-27 17:30:20 +07:00
Tagir Valeev 01b72f856a DFA: branch-specific reporting (IDEA-203016) 2018-11-27 16:57:29 +07:00
Anna.Kozlova 1658b14f3c switch expressions: check old style breaks & switch chains during compatibility checks
IDEA-CR-40239
2018-11-22 18:31:25 +01:00
Pavel Dolgov 153535ef9a Java: Highlight switch expressions that don't produce the result on some execution path (IDEA-202621) 2018-11-22 16:13:48 +03:00
Roman Shevchenko 5a14893607 [tests] extends value breaks highlighting test case 2018-11-21 19:26:03 +01:00
Anna.Kozlova a7eefcd5ae switch expressions: report bad result expression types
if they are not convertible to poly expression target type
2018-11-21 18:51:47 +01:00
Pavel Dolgov 9fc8a64cd6 Java: Extend control flow analysis to support enhanced switch & switch expression, including break-with-value (IDEA-202131) 2018-11-21 18:49:01 +03:00
Anna.Kozlova c7ce9a1a8c switch expressions: inference for value breaks, correct lambda context in result expressions 2018-11-21 15:54:15 +01:00
Anna.Kozlova b015644d7a get rid of redundant space in error message 2018-11-21 15:54:15 +01:00
Roman Shevchenko d50cffbf0f [java] value breaks: basic highlighting (IDEA-196643) 2018-11-20 18:57:22 +01:00
Anna.Kozlova f32caada92 switch expression: inference for result expression fixed; more testdata on overload resolution 2018-11-20 10:56:11 +01:00
Pavel Dolgov cdee0f85e5 Java: Extend control flow analysis to support enhanced switch & switch expression. No break-with-value yet (IDEA-202131) 2018-11-19 17:26:28 +03:00
Anna.Kozlova c3bc7e3461 switch expression type: initial 2018-11-19 11:25:18 +01:00
Tagir Valeev 1f800bf982 ReplaceWithTernaryOperatorFix: use template instead of selection (IDEA-202345) 2018-11-18 16:26:42 +07:00
Tagir Valeev 882322a5bf InferenceSession#isOverloadCheck: take parentheses into account 2018-11-17 14:48:24 +07:00
Tagir Valeev 6bc07438c6 Support of enhanced Java 12 switch statements in DFA (IDEA-202132, no expressions yet) 2018-11-16 12:06:16 +07:00
Anna.Kozlova 8b768f2e94 inference: skip constraints and everything dependant above overload resolution 2018-11-15 16:31:25 +01:00
Anna.Kozlova c4393bfa0e inference: skip constraints that depend on ignored constraints
when type of lambda parameter is calculated, the containing lambda doesn't end in the constraints set; if some other constraints depend on it's output variables, inside those constraints e.g. method calls may be cached based on incomplete inference results which would lead to blinking of highlighting
2018-11-14 15:18:08 +01:00
Roman Shevchenko 2b84e80868 [java] switch expressions: basic highlighting (IDEA-196643) 2018-11-13 13:28:15 +01:00
Roman Shevchenko 193aa1f2cf [tests] more cases for enhanced switch statements highlighting tests 2018-11-13 13:27:30 +01:00
Tagir Valeev 8545659a0a StreamToLoop test: ternary in return is supported now 2018-11-11 18:05:27 +07:00
Roman Shevchenko 35ca6e9efd [java] validates container annotation "concreteness" (IDEA-201354) 2018-11-09 22:09:35 +01:00
Roman Shevchenko 14bc258e3f [java] restores multifaceted switch labels support (parser/PSI + basic highlighting) 2018-11-09 18:22:32 +01:00
Roman Shevchenko 5740f632e6 [java] reverts multifaceted switch labels support 2018-11-08 21:24:31 +01:00
Roman Shevchenko fdf6239bfc Cleanup (formatting) 2018-11-08 17:12:29 +01:00
Roman Shevchenko dca9f4a33d [java] multifaceted switch labels: basic highlighting (IDEA-196643) 2018-11-08 17:11:20 +01:00
Tagir Valeev eda6bb3c28 FunctionHelper#registerReusedElements: pass qualifier only
Because ::xyz part is not actually reused, comments from there are not preserved.
2018-11-08 17:30:50 +07:00
peter 1c50ca6d08 java completion: remove irrelevant suggestions after Unresolved:: (IDEA-201798)
to enable chain completion, which only works when there are no other suggestions
2018-11-08 09:22:18 +01:00
Anna.Kozlova c8dc243d71 redundant suppression (fall through switch stmt): ensure suppressed will be reported by inspection (IDEA-201885) 2018-11-07 17:58:39 +01:00
Anna.Kozlova 7334c6e736 suggest to create class with lower case first letter if ref is located in type element/ref list (IDEA-201744) 2018-11-07 13:51:27 +01:00
Tagir Valeev 2c7124b0b0 ExpressionUtils#getTopLevelExpression; used in SurroundWithTryCatchFix
Fixes EA-131551 - NPE: EnsureCodeBlockImpl.splitIf
We need to avoid custom logic for processing && chains, etc. in RefactoringUtil#ensureCodeBlock.
2018-11-07 10:45:38 +07:00
Anna.Kozlova 316f8bfc63 change extends <-> implements: ensure resulted list is formatted (IDEA-201751)
lists are created from light elements which are created from canonical texts and they just do not contain whitespaces
2018-11-06 19:04:10 +01:00
Anna.Kozlova df236e8c91 check compiler version (IDEA-163104)
compiler will be chosen as max(module compiler, project compiler)
2018-11-06 10:47:58 +01:00
Anna.Kozlova 4be054181c testdata for IDEA-171701 2018-11-06 10:47:57 +01:00
Tagir Valeev 11e73d577f RedundantStringOperation: id changed, merger updated (IDEA-CR-34351) 2018-11-04 10:54:34 +07:00
Roman Shevchenko 5d10b37246 [java] enhanced 'switch' statements: basic highlighting (IDEA-196643) 2018-11-02 18:22:34 +01:00
Roman Shevchenko 95b4898527 Cleanup (formatting) 2018-11-02 18:09:05 +01:00
Anna.Kozlova 2ef3685dd6 don't suggest casts for assignable types (IDEA-201457) 2018-10-30 16:09:23 +01:00
Pavel Dolgov e6e432446a Java: Highlight unreachable assignment of array element (IDEA-199556) 2018-10-26 13:11:13 +03:00
Anna.Kozlova 382cf50470 ignore type arguments on calls on raw types (IDEA-201219) 2018-10-25 16:20:57 +02: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
Tagir Valeev 2e36108630 SimplifyBooleanExpressionFix: support always-false last disjunct in if
Fixes IDEA-200961 Simplification of "!list.add(type) is always false" may change code semantic
2018-10-23 17:44:26 +07:00