Anna Kozlova
ca1d8a348c
postpone highlighting on conditions when errors occur on containing call
...
poly conditional expression receives type from context, if context contains errors, it's better to highlight those first (IDEA-185540)
2018-01-30 11:33:49 +03:00
Anna Kozlova
e037922937
applicability: get call expr from anonymous class (IDEA-184965)
2018-01-15 20:27:05 +01:00
Anna.Kozlova
20ea015d3e
inference: ensure to distinguish new fresh variables of the same node
2017-12-22 10:05:44 +01:00
Anna.Kozlova
1fc76eb779
calc types by applicability constraints if inference fails
...
include all inference variables for resolve and ignore additional constraints checks if the inference is going to failure; this way if (expr()) would get type of the 'standalone' expression instead of expression with boolean as expected type
2017-12-07 15:51:06 +01:00
Anna.Kozlova
6180b5b337
inference: check substituted intersection type during resolution
2017-12-06 14:54:24 +01:00
Anna.Kozlova
a2e13fee96
inference: check glb conflicts after flatten in intersection type(IDEA-181017)
2017-10-25 18:01:56 +02:00
Anna.Kozlova
2658d37da0
inference: don't remember captured wildcard with non-proper bound (IDEA-180042)
...
later check could fail e.g. if bound was created inside one of nested session
2017-10-17 17:58:55 +02:00
Anna.Kozlova
465458db4d
method references: don't fall to raw substitutor with second search (IDEA-180615)
2017-10-17 11:48:38 +02:00
Anna.Kozlova
250956f8b0
report inference error if resolution failed (IDEA-179978)
...
in the issue, non-vararg overload candidate was chosen cause it was not filtered as inapplicable
2017-10-13 10:47:47 +02:00
Anna.Kozlova
2f1a299401
captured of non-proper wildcard can't be used as solving bound (IDEA-180042)
2017-10-12 19:38:49 +02:00
Anna Kozlova
b9e2c4130d
inference: allow capture during intersection type construction (IDEA-173900)
2017-09-13 15:33:56 +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
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
377520ade5
intersection type validation fixed (IDEA-173900)
...
take type parameter bounds into account
2017-06-05 14:34:18 +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
bdd3f7f3d6
pertinent to applicability: process return statements inside block lambda
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
c917f02b47
testdata for javac resolution order: to be merged in java 9 update
2017-04-11 16:22:35 +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
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
Roman Shevchenko
6bd1b92c6e
[tests] prepares Java tests for the language level raise
2017-03-24 13:19:01 +01:00
Anna.Kozlova
bb7868f450
diamonds: don't infer raw type when inference of a staticFactory failed
...
avoid blinking tests on overload resolution: make outer method call not applicable by inferring incomplete results like it's done for method calls
2017-03-13 14:16:44 +01:00
Anna.Kozlova
770bd344ea
ensure assignability for standalone expressions during applicability check (IDEA-159086)
2017-02-13 18:30:53 +01:00
Anna.Kozlova
4290a37a08
new inference: check intersection type of upper bound to detect substitution (IDEA-165011)
2016-12-07 18:44:34 +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
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
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
41c2429966
new inference: postpone unresolved variables in favor to variables with proper equals bound
2016-10-11 10:27:29 +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
1bece25b95
inference: when unchecked conversion was applied, resolve variables against raw substitutor
2016-08-17 13:53:02 +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
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
Anna.Kozlova
d85c70d870
invocation type inference: don't create fresh variables for all type parameters but only for those where wildcards are used in return type (IDEA-155627; IDEA-151220; IDEA-151387)
2016-05-06 18:00:16 +02:00
Anna.Kozlova
5d6351b1ec
diamonds: don't accept inferred types when error appeared during inference (IDEA-154619)
2016-04-21 18:39:23 +02:00
Anna.Kozlova
c09caae28e
treat conditional expressions with new expressions with diamonds inside as poly
...
EA-76546 - assert: InferenceSessionContainer.treeWalkUp
2016-04-19 19:05:54 +02:00
Anna.Kozlova
abf32b50d5
don't calculate type of method expression which is located on the left side of assignment - assignment is invalid anyway
...
(EA-77049 - assert: PsiMethodCallExpressionImpl$TypeEvaluator.fun)
2016-04-19 19:05:54 +02:00
Anna.Kozlova
1466b0155e
bad code green: reject return type constraint if unchecked conversion was applied during applicability check and return type is type parameter
2016-04-11 21:51:18 +02:00
Anna.Kozlova
3966e55bbf
testdata for IDEA-154278
2016-04-06 21:17:37 +02:00
Anna.Kozlova
cc72bd0319
inference: restore probably partial raw inference as this way expected raw types are preserved and Objects won't be inferred in place where raw types were expected
2016-03-30 12:15:25 +02:00
Anna.Kozlova
d5613fae7f
testdata for IDEA-153632
2016-03-29 21:17:55 +02:00