Commit Graph

136 Commits

Author SHA1 Message Date
Anna Kozlova
c16a53a9fb do not open capture when method call type is calculated 2015-12-03 12:18:25 +01:00
Anna Kozlova
3a669178f5 do not open captured wildcards on substitution; don't capture wildcards on getExtendsTypes for type parameters and their consequences 2015-12-02 10:17:29 +01:00
Anna Kozlova
621795bbee isApplicability check based on pertinentToApplicability 2015-11-30 15:11:41 +01:00
Anna Kozlova
49dfdded70 new inference: don't push resolved vars in case of failed substitution 2015-11-24 10:30:21 +01:00
Anna Kozlova
138bd5a034 new inference: provide diagnostics on failed inference (strict subtyping constraints); don't resolve vars before incorporate - this way captures won't be opened too early 2015-11-24 10:30:21 +01:00
Anna Kozlova
e7d095d85f new inference: provide diagnostics on failed inference (checked exceptions) 2015-11-24 10:30:21 +01:00
Anna Kozlova
be2db1f940 new inference: report inference errors of containing call for lambdas 2015-11-20 21:47:13 +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
773e192f1a recursive getLambdaParameterType problem: don't check nested lambda body for unchecked exceptions, that's impossible anyway (IDEA-146161) 2015-10-09 17:17:09 +02:00
Roman Shevchenko
32a6761ede Cleanup (i18n; text corrected) 2015-07-20 12:06:25 +03:00
Anna Kozlova
30a12275a2 lambda: highlight containing method ambiguity on method name: this avoids lots of lines of lambda body to be highlighted and it would show errors even if lambda body contains errors actually caused by the ambiguity on the parent level (IDEA-141580) 2015-06-18 17:54:23 +03:00
Anna Kozlova
553ad77e46 overload resolution: reject java 8 varargs methods when they are checked by fixed arity and number of parameters doesn't match 2015-04-24 20:33:40 +02:00
Anna Kozlova
9fc640a8f0 ensure correct expression is checked during read before write variable check (IDEA-135937) 2015-02-20 21:37:28 +01:00
Anna Kozlova
925e9d1610 pertinent to applicability: reject nested lambdas if they target non proper type 2015-02-13 18:54:02 +01:00
Anna Kozlova
af7da7a8f4 incompatible parameter types in lambda expression message expanded (IDEA-134941) 2015-01-07 17:10:09 +01:00
Anna Kozlova
8ce9831489 bad return type in lambda expression: requited type added; range corrected (IDEA-134942) 2015-01-07 16:07:27 +01:00
Anna Kozlova
145f701bc1 new overload resolution: integrate isPotentiallyCompatible in isApplicable checks 2014-11-26 17:42:30 +01:00
Anna Kozlova
ddbaef9462 fix message for final locals used inside local/anonym classes in java 8 (IDEA-131949) 2014-10-29 18:05:52 +01:00
Anna Kozlova
33f7cb51f2 new inference: most specific check according to spec, fixed testdata after JDK-8043734 2014-09-04 13:45:03 +04:00
Anna Kozlova
83c2d36544 testdata for assignment to final vars inside lambda 2014-09-03 16:54:32 +04:00
Anna Kozlova
44253d03be forbid assignment to final variable inside lambda 2014-09-03 16:54:31 +04:00
Anna Kozlova
457091952f effectively final check (IDEA-128196) 2014-08-04 15:08:27 +02:00
Anna Kozlova
53cf6f6905 wording: warn about self references instead of "forward" ones 2014-07-02 12:26:17 +02:00
Max Medvedev
319bbf28a0 IDEA-125909 Groovy: trait methods accessed via 'super' are not resolved.
Use LinkedHashSet for PsiIntersectionType for order forcing.
2014-06-18 14:02:40 +04:00
Anna Kozlova
896c488a2f testdata to expression lambda 2014-05-01 15:33:11 +04:00
Anna Kozlova
8bad8079f6 lambda: do not skip generic method when non-generic method exist in the same class 2014-04-22 20:02:52 +02:00
Anna Kozlova
b49d8e753f testdata 2014-04-22 20:02:40 +02:00
Anna Kozlova
f1f6fcf53b functional interfaces: ignore methods with type parameters during abstract method choosing 2014-04-22 20:02:38 +02:00
Anna Kozlova
a55db18089 lambda: accept intersection type when exactly one conjunct is functional 2014-04-22 20:02:37 +02:00
Anna Kozlova
76a9293609 testdata 2014-04-22 20:02:34 +02:00
Anna Kozlova
552dfe92a9 lambda: intersection type produces conjunction of abstract methods 2014-04-22 20:02:30 +02:00
Anna Kozlova
bd9dbfc7d5 testdata 2014-04-22 20:02:29 +02:00
Anna Kozlova
9914757d15 warn about underscore identifier 2014-04-22 20:02:28 +02:00
Anna Kozlova
565b28a089 check for assignment to final field inside lambda (IDEA-123308) 2014-04-02 20:54:08 +02:00
Anna Kozlova
d33575878b new inference: substitute resolved vars which e.g. did not participate in initial session (IDEA-123248) 2014-04-01 14:17:06 +02:00
Anna Kozlova
60acb4b9b2 IDEA-122616 2014-03-21 18:28:36 +01:00
Anna Kozlova
465325a6a6 new inference: nested varargs
(cherry picked from commit 0d293e439ffcbe97db98c1a1b8072e798d94323e)
2014-03-12 10:17:10 +01:00
Anna Kozlova
10760d9bbf new inference: process varargs as separate method candidate/separate phase
(cherry picked from commit fdd6f66268d29bb996a103f69180851b92947d21)
2014-03-12 10:15:03 +01:00
Anna Kozlova
5029b3fc55 new inference: do not prefer specifics based on void return type for both void and value compatible lambdas 2014-03-06 10:15:22 +01:00
Roman Shevchenko
b9b76dca15 java: type annotations 2014-03-04 10:53:04 +01:00
Bas Leijdekkers
7b58b81761 IDEA-121215 (Java 1.8: "Interface may be annotated with @FunctionalInterface" inspection should not report @interfaces) 2014-02-26 21:01:13 +01:00
Anna Kozlova
f1b256f416 forbid lambda in conditional inside cast context 2014-02-24 18:59:42 +01:00
Anna Kozlova
2f80e7d9c0 new inference: reject partial computation 2014-02-21 18:55:54 +01:00
Anna Kozlova
bd681beb26 new inference: 18.5.2 adjustments 2014-02-19 09:46:15 +01:00
Anna Kozlova
19ba9d8c8d new inference: resolve 2014-02-19 09:46:05 +01:00
Alexey Kudravtsev
c7b78f76a2 IDEA-120784 "Class is public should be declared in a file named <Classname>.java" for inner interface 2014-02-18 13:55:52 +04:00
Anna Kozlova
31aba54296 new inference: choosing the most specific method inference 2014-02-13 16:41:20 +01:00
Anna Kozlova
b16df9509f new inference: lift type parameters; stop inference after false appears in bounds 2014-02-12 12:55:47 +01:00
Anna Kozlova
0072e05c02 testdata fixed 2014-02-11 09:54:31 +01:00
Anna Kozlova
4889751ded new inference: exclude return constraints/non pertinent to applicability argument constraints from overload resolution process 2014-02-11 09:40:00 +01:00