Commit Graph

1338 Commits

Author SHA1 Message Date
Mikhail Glukhikh fea224749b FIR: introduce symbolProvider.getNestedClassifierScope to choose lazy/non-lazy
For some reason this breaks two old FE based tests with member type aliases.
It's not very interesting because member aliases aren't supported.
2019-12-16 10:50:52 +03:00
Mikhail Glukhikh 663d545d79 FIR: get rid of symbolProvider.getClassDeclaredMemberScope at all 2019-12-16 10:50:52 +03:00
Mikhail Glukhikh af87a183c2 FIR: get rid of symbolProvider.getClassDeclaredMemberScope usages in compiler 2019-12-16 10:50:52 +03:00
Mikhail Glukhikh f497231acd FIR: try to use JavaSymbolProvider directly in lazy nested classifier scope 2019-12-16 10:50:52 +03:00
Denis Zharkov 34e1ab4e7a FIR: Leave single implementation of ConeInferenceContext 2019-12-13 14:39:06 +03:00
Denis Zharkov 28f4d62ccf FIR: Add different extension for FirSession.inferenceContext 2019-12-13 14:39:06 +03:00
Denis Zharkov b33d0c2594 Minor. Reformat ConeInferenceContext 2019-12-13 14:39:06 +03:00
Denis Zharkov 0baf1e8fa7 Minor. Get rid of UniversalConeInferenceContext 2019-12-13 14:39:06 +03:00
Denis Zharkov bbc9927bce Minor. Get rid of DataFlowInferenceContext 2019-12-13 14:39:06 +03:00
Denis Zharkov 0064429339 Avoid using TypeSystemInferenceExtensionContextDelegate in FIR
It's only needed in old FE to avoid clashes when initializing DI

The main idea is gettind rid of intermediate interfaces because
each of them adds another intermediate DefaultImpls call
2019-12-13 14:39:06 +03:00
Victor Petukhov 07269661b4 NI: Allow to resolve to functions with SAM conversion and passing array without spread as vararg (with warning)
^KT-35224 Fixed
2019-12-12 23:46:16 +03:00
Simon Ogorodnik fe875d628d Revert "[FIR] Fix outputs for logs of modularized test"
This reverts commit ae15fa76
2019-12-12 21:23:27 +03:00
Simon Ogorodnik 60cc9fa6f5 Revert "[FIR] Fix outputs for logs of modularized test"
This reverts commit ae15fa76
2019-12-12 20:55:13 +03:00
victor.petukhov 71cb65c064 NI: Add flexible Nothing to trivial constraints to filter it 2019-12-12 18:45:11 +03:00
Dmitriy Novozhilov f1f2e1830b [FIR-TEST] Fix incorrect testdata 2019-12-12 16:11:47 +03:00
Dmitriy Novozhilov 4faa2c0c2c [FIR] Replace static cone types for integers with default classIds in ILT 2019-12-12 16:11:47 +03:00
Dmitriy Novozhilov c6b9593157 [FIR-TEST] Add identity checker of old frontend and fir testdata to old FE diagnostics tests 2019-12-12 16:11:47 +03:00
Dmitriy Novozhilov 579cb5014a [FIR-TEST] Add !FIR_DUMP directive to diagnostics tests from old frontend 2019-12-12 16:11:47 +03:00
Dmitriy Novozhilov e9c02a1cca [FIR-TEST] Add fir diagnostics test based on diagnostics tests from old frontend 2019-12-12 16:11:46 +03:00
Dmitriy Novozhilov e7f8c8e155 [TEST] Regenerate tests after previous commit 2019-12-12 16:11:45 +03:00
Dmitriy Novozhilov ae15fa7676 [FIR] Fix outputs for logs of modularized test 2019-12-12 16:11:42 +03:00
Alexander Udalov 5f367278c1 Psi2ir: support generic properties in class delegation
Since property accessor descriptors (unlike corresponding IR elements)
do not have type parameters, we need to take them from the corresponding
property to ensure the correct IR for delegated property accessors.
2019-12-12 15:02:32 +03:00
Simon Ogorodnik ebc1562b32 Filter out non-xml model files in modularized test 2019-12-11 17:21:02 +03:00
Simon Ogorodnik 48a05e3688 Support prefixed modularized test-data installation 2019-12-11 17:21:01 +03:00
Mark Punzalan 4777dd652b [FIR] Add tests to catch issues with smartcasting of accesses to functions
and properties (type information is stored for the symbol and ALL accesses
to the same symbol are smartcasted).
2019-12-11 16:57:41 +03:00
Mark Punzalan f031b47363 [FIR] Fix issue with multiple smartcasts of this. 2019-12-11 16:57:41 +03:00
Mark Punzalan 91f97fa611 [FIR] Support FirCheckNotNullCall in HTML dump. 2019-12-11 16:54:15 +03:00
Mark Punzalan 6e00df06e8 [FIR] Add data flow analysis for FirCheckNotNullCall. 2019-12-11 16:54:15 +03:00
Mark Punzalan 692a83f7bb [FIR] Add FirCheckNotNullCall converted to CHECK_NOT_NULL intrinsic
function call.
2019-12-11 16:54:15 +03:00
victor.petukhov a92f58b1ac Revert "NI: Prefer nullable lower bound to flexible one when substitution of type variable is performed ^KT-32435 Fixed"
This reverts commit 09c2b92b
2019-12-11 15:32:46 +03:00
Mikhail Glukhikh 038ec8edcf Rethrow ProcessCanceledException in FIR resolve
Before this commit, we catched all exceptions at some points
and wrap them. For ProcessCanceledException it's incorrect,
because IDE logic does not expect wrapping of ProcessCanceledException
2019-12-11 13:01:38 +03:00
Victor Petukhov 09c2b92b1d NI: Prefer nullable lower bound to flexible one when substitution of type variable is performed
^KT-32435 Fixed
2019-12-11 12:15:02 +03:00
Mikhail Glukhikh 344bc33096 [FIR TEST]: add problematic test with WeakHashMap.get ambiguity 2019-12-10 16:25:01 +03:00
Denis Zharkov f0298aad77 FIR: Refine SAM support for methods with names from j.l.Object 2019-12-10 14:21:21 +03:00
Denis Zharkov e89c777fc6 FIR: Create DefinitelyNotNull only for annotated types 2019-12-10 14:21:21 +03:00
Mikhail Glukhikh edf5675415 [FIR TEST]: add problematic test with covariant array as receiver 2019-12-10 12:58:40 +03:00
Mikhail Glukhikh 7d62e3ce56 FIR: fix hasTopLevelClassOf optimization in deserialized provider
Before this commit, we answered 'no top level class' if Java class finder
could not calculate known class names. However, it's incorrect,
because this situation means 'don't actually know'.

To precise semantics, function name was also inverted
2019-12-10 12:58:39 +03:00
Mikhail Glukhikh 83ccd7dd1c FIR: implement separate diagnostic collector/reporter for IDE 2019-12-10 12:58:38 +03:00
Mikhail Glukhikh fbf1dbf2da FIR: introduce error message renderer 2019-12-10 12:58:38 +03:00
Mikhail Glukhikh e07b85ff34 FIR Java providers: insert some protection against ProcessCanceledException 2019-12-10 12:57:57 +03:00
Dmitriy Novozhilov 00112d4227 [FIR] Copy receiver of delegateProvider in fir building
There was a problem that receiver of `delegateProvider` and `expression` field
  of `FirWrappedDelegateExpression` was the same object, so after some changes in
  FirCallCompletionResultsWriterTransformer (where call was partially completed and then
  copied) there was a problem with resolve of `delegateProvider`, because reference of it's
  receiver had resolved reference, but type arguments were unsubstituted (see
  `testCommonCaseForInference`).

Maybe there is a better solution. E.g. we can transform type arguments in completion, so we don't need coping of function call at all
2019-12-10 12:25:42 +03:00
Dmitriy Novozhilov 51560f2f17 [FIR] Fix order of resolving children of FirProperty 2019-12-10 12:25:42 +03:00
Dmitriy Novozhilov a89e9966e6 [FIR] Fix call completion of complex constant expressions with integer contants 2019-12-10 12:25:42 +03:00
Dmitriy Novozhilov b76c984b26 [FIR] Support IntegerLiteralTypes 2019-12-09 17:24:26 +03:00
Dmitriy Novozhilov 5577f0f8cb [TMP] Make context in inference components universal 2019-12-09 15:28:24 +03:00
Dmitriy Novozhilov 4f3ff84d30 [FIR] [TMP] Complete lambdas that are not part of some call 2019-12-09 15:02:41 +03:00
Dmitriy Novozhilov e560a67a89 [FIR] Resolve this reference in delegating constructors 2019-12-09 15:01:54 +03:00
Dmitriy Novozhilov 583e07b3e4 [FIR] Don't analyze properties twice 2019-12-09 13:31:39 +03:00
Dmitry Petrov c83f68151c Support @EnhancedNullability in psi2ir 2019-12-06 11:03:07 +03:00
Dmitry Petrov 20fb519f1a PSI2IR: Generate IMPLICIT_NOTNULL casts for platform type values 2019-12-06 11:03:06 +03:00