Previously, constraint wasn't added if bound was ErrorType. That could
cause TypeVariable to be inferred to Any?/Nothing instead of ErrorType,
which could influence other parts of analysis (in particular, inferring
Nothing instead of ErrorType can cause bogus UNREACHABLE_CODE diagnostics)
Because of that fix, intersection type can be added to CS as supertype,
which provokes AssertionError. This commit also relaxes this assertion,
as it seems that it's valid that supertype is an intersection type.
This commits introduces testdata changes, where NI behaviour strictly
improved, after several previous fixes.
For some tests, just WITH_NEW_INFERENCE directive was added. It
indicates, that some of previous commits first introduced error in that
test, and then some other commit fixed it (netting no overall testdata
change). It is preferrably to keep those annotations until we will
migrate to NI completely, to prevent unexpected regressions.
Check if ConstrainSystem has any contradiction in 'isSuccessful'.
Otherwise we may erroneously think that there are some successful
candidates in 'TowerResolver.SuccessfullResultCollector.pushCandidates()'
and clear other unsuccessful ones (while they actually may have higher
applicability).
- During final phase of resolution (i.e. converting NI-results to
OI-results), make call into EffectSystem to record all necessary
effects-related information.
- To be able to enhance resulting dataFlowInfo for call at that stage,
introduce internal method 'updateResultingDataFlowInfo' in
NewResolvedCallImpl.
For some reason gradle processes "testJar" task differently and collects
artifacts for it during configuration phase. This helps Idea project
configurator understand that there's no need to attach test jar as separate
binary library dependency.
Having compiled module in dependencies results IDEA finds both compiled and
source version of classes. This may cause bad navigation and reindexing.
Fixes nondeterministic Default Method Order under existance of generic
type parameters.
SubstitutingScope did not respect source code method order by not using
a LinkedHashSet