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
Mikhail Glukhikh
f82fe20d43
[FIR] fix test data according to last commits
2019-12-05 18:27:47 +03:00
Mikhail Glukhikh
53935db992
[FIR] fix compilation error (arose due to commit conflict)
2019-12-05 18:25:17 +03:00
Dmitriy Novozhilov
6f222edb88
[FIR] Add unresolved type counter to html dump
2019-12-05 18:17:13 +03:00
Mikhail Glukhikh
2f3618041b
FIR resolve: eliminate CallInfo.containingDeclaration as unused
...
This also fixes potential KNPE during its calculation
2019-12-05 18:02:04 +03:00
Mikhail Glukhikh
c1789a0ecc
FIR IDE: synchronous creation/registration of sessions
2019-12-05 18:02:04 +03:00
Mikhail Glukhikh
70fa12d9d2
Extract FirDiagnosticsCollector to have creation logic in one place
2019-12-05 18:02:03 +03:00
Mikhail Glukhikh
9782ec1b1e
FIR resolve phases: set BODY_RESOLVE phased properly
...
Before this commit, we never set this phase to declaration or file
2019-12-05 18:02:03 +03:00
Mikhail Glukhikh
26ee02ed02
FIR: replace resolve phase in FirFile properly
2019-12-05 18:02:03 +03:00
Mikhail Glukhikh
1539ee30ff
FIR IDE: fix local class containing file search
2019-12-05 18:02:03 +03:00
Mikhail Glukhikh
74a7a8c881
FIR resolve (minor): provide source element for resolved qualifier
2019-12-05 18:02:02 +03:00
Mikhail Glukhikh
8808c775a4
Introduce FirResolvedTypeRef.delegatedTypeRef to see children types in IDE
...
This is needed to have access to resolved children types (e.g. type arguments) from IDE
2019-12-05 18:02:02 +03:00
Dmitriy Novozhilov
38c1a50c1d
[FIR] Resolve delegating constructor calls
2019-12-05 17:47:15 +03:00
Dmitriy Novozhilov
de77bd526b
[FIR] Change default visibility for sealed class constructors from private to public
2019-12-05 17:47:15 +03:00
Dmitriy Novozhilov
d840671620
[FIR] Don't create delegating super constructor call to kotlin.Enum for enums
2019-12-05 17:47:14 +03:00
Dmitriy Novozhilov
a0d8e5bde7
[FIR] Don't create delegating constructor call to kotlin.Annotation
2019-12-05 17:47:14 +03:00
Dmitriy Novozhilov
25720e20f4
[FIR] Fix bug in defining of completion mode
2019-12-05 17:46:59 +03:00
Dmitriy Novozhilov
088a949403
[FIR] Add implicit type counter to html dump
2019-12-05 17:46:59 +03:00
Denis Zharkov
e58711cde3
FIR: Select most specific members from supertypes scope
2019-12-05 17:35:33 +03:00
Denis Zharkov
e5166e0e7d
FIR: Extract common parts in FirSuperTypeScope
2019-12-05 17:35:33 +03:00
Denis Zharkov
43aa1f87df
FIR: Optimize supertypes scope structure
2019-12-05 17:35:33 +03:00
Denis Zharkov
91fce215d2
FIR: Simplify super type scopes related code
...
- Get rid of unnecessary subclass
- Use more abstract type where possible
2019-12-05 17:35:33 +03:00
Denis Zharkov
b8984d154b
FIR: Do not copy type parameters from class to constructors
...
Use the same instances from class declaration instead
Otherwise, primary constructor value parameter types when used
in the class body are considered as different from types
based on the class type parameters
See the test genericConstructors.kt, before this commit
"id" call was reported in inapplicable
2019-12-05 13:08:51 +03:00
Denis Zharkov
be5b7adb5a
FIR: Support captured types for sub-arguments
2019-12-04 10:52:19 +03:00
Denis Zharkov
3634d80cae
FIR: Order type variables for fixation
...
Otherwise there are subtle issues with captured types
(see FirDiagnosticsSmokeTestGenerated$Inference.testDependantOnVariance)
2019-12-04 10:52:19 +03:00
Pavel Kirpichenkov
3de6289c6c
[NI] Run completion on subatoms of error calls
...
Call transformer previously ran completion of argument atoms
only for non-error candidates. This led to missing diagnostics,
i.e. from collection literal resolver.
Now arguments of calls resolved to error descriptor are completed,
with exception to not found provideDelegate calls.
provideDelegate's subatoms are not completed after failure, because
it is a part of delegate competion, which does not end with
unresolved provideDelegate.
Completing after provideDelegate failure removes constraint system
from resolved arguments, which breaks resolve for get/setValue.
^KT-33592 Fixed
2019-12-03 18:19:32 +03:00
Denis Zharkov
fa7bd3dd2e
FIR: Support SAM constructors for type aliases
2019-12-03 15:49:22 +03:00