Mikhail Glukhikh
63b7fa70f9
FIR2IR: add extension receiver parameters to functions
2019-07-25 09:46:29 +03:00
Dmitriy Novozhilov
b99efb9a2b
[NI] Look for type variables in captured flexible types
...
#KT-32434 Fixed
2019-07-22 11:08:39 +03:00
Dmitriy Novozhilov
58b4ab35f0
[NI] Fix passing callable references to suspend functions as functional parameter
...
#KT-32452
2019-07-22 11:06:19 +03:00
Dmitry Petrov
127be9be03
psi2ir: Fix KT-30796 ErrorType for '?:' in OI
2019-07-22 09:46:21 +03:00
Dmitry Petrov
ffd9b45ef3
IrFunctionExpression: add 'origin'
...
This is actually either a LAMBDA or an ANONYMOUS_FUNCTION.
Not quite sure if it's really required, but some tools such as IR-based
decompiler might require this information.
2019-07-19 11:36:19 +03:00
Dmitry Petrov
41b59f9b9a
IrFunctionExpression: update fir2ir tests
2019-07-19 11:36:19 +03:00
Nikolay Krasko
c14f842aa0
Fix dependency between idea core environment and jdom
2019-07-17 23:50:32 +03:00
victor.petukhov
6a679d86ab
Support non-parenthesized annotations on functional types without receiver
...
^KT-31734 Fixed
2019-07-17 16:18:15 +03:00
Mikhail Glukhikh
7ccf21c5c8
FIR resolve: fix vararg parameter types
2019-07-17 10:45:07 +03:00
Mikhail Glukhikh
592cf4f4e8
Make FirNamedReferenceWithCandidate not resolved, fix receiver completion
...
Counting it as resolved provokes a lot of difficult to discover errors
2019-07-17 10:45:06 +03:00
Mikhail Glukhikh
08f44d4f14
FIR resolve: add early protection against cyclic property resolve
2019-07-17 10:45:06 +03:00
Simon Ogorodnik
1222449dc8
FIR resolve: perform inference completion for property access
2019-07-17 10:45:06 +03:00
Mikhail Glukhikh
99680a2ad7
FIR: refactor & simplify invoke resolve a bit
2019-07-17 10:45:06 +03:00
Mikhail Glukhikh
fff954ed3f
FIR: skip extra non-valid groups during candidate resolve
2019-07-17 10:45:06 +03:00
Mikhail Glukhikh
b813f22cfe
Extract part of utility FIR transformers into TransformUtils
2019-07-17 10:45:05 +03:00
Mikhail Glukhikh
0ac23eef93
Minor (FIR resolve): replace session with fileSession
2019-07-17 10:45:05 +03:00
Simon Ogorodnik
3da11cc85b
Use no-op substitutor instead of substitutor with empty map
2019-07-17 10:45:05 +03:00
Mikhail Glukhikh
2d74dac4f2
FIR: set constructor parameter scope correctly for designated transformer
2019-07-17 10:45:05 +03:00
Dmitry Petrov
6ea33986fa
psi2ir: Provide substituted descriptor for property references
2019-07-11 15:32:43 +03:00
Mikhail Glukhikh
43c6049f02
FIR2IR: set origin correctly for synthetic property accesses
2019-07-11 12:46:48 +03:00
Mikhail Glukhikh
c6a09dba4e
FIR: consider Java default constructors as primary ones
2019-07-11 12:40:29 +03:00
Mikhail Glukhikh
2ceffa241b
FIR: make Java default constructor visibility same with class visibility
2019-07-11 12:38:53 +03:00
Mikhail Glukhikh
c35d7eab70
Refactor FIR symbols to make them and their FIR element types more clear
...
This commit also fixes work with Java synthetic properties
2019-07-11 12:37:32 +03:00
Simon Ogorodnik
dfd0042a5b
Do not create single element list if only one candidate
2019-07-08 16:59:50 +03:00
Mikhail Glukhikh
f434248cb7
FIR property getter: take return type from property even if it's error
2019-07-08 16:59:45 +03:00
Mikhail Glukhikh
d96c66adac
FIR: partially implement invoke resolution
2019-07-08 16:59:37 +03:00
Mikhail Zarechenskiy
6eefea6715
Add tests for obsolete issues
...
#KT-32395 Obsolete (fixed in 42a5c488 )
#KT-32388 Obsolete (fixed in f3e4c9cd )
#KT-32271 Obsolete (fixed in 60a0cf1 )
2019-07-06 10:06:04 +03:00
Mikhail Zarechenskiy
515e666733
[NI] Fix exception on incomplete try/catch block
...
There was an inconsistency on creating PSI call and corresponding
descriptor. See variable `catchBlocks` from visitor, it's created
only if PSI elements are not null, but for descriptor parameters
there wasn't such check
#KT-32134 Fixed
#EA-139748 Fixed
2019-07-01 12:59:37 +03:00
Igor Chevdar
1e8f7c2b7d
Removed IrCallWithShallowCopy
2019-06-27 19:04:01 +03:00
Alexander Udalov
cf6ff8c6b3
Simplify implementation of TypeSystemCommonSuperTypesContext.typeDepth
2019-06-27 16:43:07 +02:00
Alexander Udalov
331f0291ce
Minor, remove TypeSystemContext.isNotNullNothing
...
Use equivalent isNothing instead
2019-06-27 16:43:07 +02:00
Alexander Udalov
c452934f5b
Pull isNullableType and related extensions up into TypeSystemContext
2019-06-27 16:43:07 +02:00
Dmitry Petrov
b3b7e26985
Make InsertImplicitCasts work with Descriptors and KotlinTypes again
...
This is a temporary change to make sure IrType infrastructure work is in
master.
It causes some of irText tests to work incorrectly (as in master).
2019-06-26 10:07:13 +03:00
Dmitry Petrov
8da5f6b955
IR: fixes after rebase
2019-06-26 09:39:17 +03:00
Dmitry Petrov
7a44b0f951
IR: IrTypeOperatorCall.classifierSymbol can be computed from typeOperand
2019-06-26 09:39:16 +03:00
Dmitry Petrov
1d9cb39915
psi2ir: fix nullability assertion generation for platform types
...
Incorporate PR from Steven Schäfer into IrType-based implicit cast
insertion (commit 17b925636e8717e7648c5d7b792c6ab4d18f776d).
NB this still uses originalKotlinType to determine if the type was
nullability flexible. It is somewhat error-prone and something we want
to get rid of. However, it boils down to some design questions related
to implicit null checks in Kotlin - e.g., it might be Ok to just treat
nullability flexible type `T!` as `T?` in IR, generate null checks for
all usages of type `T?` where a non-null type is expected, and later
eliminate the null checks that are redundant according to the (quite
conservative) criterion in the redundant null check elimination.
2019-06-26 09:39:16 +03:00
Dmitry Petrov
ab38430ded
psi2ir: irText/.../types: NI vs OI
2019-06-26 09:39:15 +03:00
Mikhail Zarechenskiy
c77f18fbe6
[NI] Support callable references on qualified types with generics
...
#KT-32154 Fixed
2019-06-26 00:23:12 +03:00
Mikhail Zarechenskiy
60a0cf1fcc
[NI] Fix exception: don't try to compute type depth on null type
...
#KT-32184 Fixed
2019-06-25 14:09:42 +03:00
Mikhail Zarechenskiy
a26cf86af7
[NI] Fix exception: callable reference is used with an unresolved LHS
...
#KT-32187 Fixed
2019-06-25 14:09:38 +03:00
Mikhail Zarechenskiy
bc0773b219
[NI] Capture receiver of invoke-based call
...
#KT-32133 Fixed
2019-06-25 14:09:34 +03:00
Nikolay Krasko
beb1bc09d4
Update to 192.5118.30
2019-06-25 11:48:59 +03:00
Simon Ogorodnik
9d4fbf8cbd
FIR: reuse scopeSession in call resolver & implicit typed ref resolution
2019-06-24 18:51:15 +03:00
Simon Ogorodnik
bc7c822b74
FIR resolve: stop visiting receiver hierarchy during call completion
2019-06-24 18:51:14 +03:00
Mikhail Glukhikh
046c82ab60
FIR: remove unused utility function
2019-06-24 18:51:13 +03:00
Simon Ogorodnik
0e60af95bf
Optimization: make every FIR node extend FirPureAbstractElement
2019-06-24 18:51:12 +03:00
Mikhail Glukhikh
d41c50d6cf
FIR: support type inference for assignments, fix related lambda inference
2019-06-24 18:51:03 +03:00
Mikhail Glukhikh
48cea4b800
FIR: take expected type into account during inference
...
NB: this commit provokes some inference problems,
which are fixed by next commit about type inference for assignments
2019-06-24 18:42:52 +03:00
Mikhail Glukhikh
1e1f4d4472
ConeTypeContext: handle "recursive type alias" situation
2019-06-24 18:42:51 +03:00
Mikhail Glukhikh
152abbfb4c
ConeTypeContext: handle star projection more correctly
...
See substitutionSupertypePolicy & testInnerTP in FIR smoke diagnostics
2019-06-24 18:42:29 +03:00