Simon Ogorodnik
32a80bf38e
FIR: Add fast-path for getOrderedAllTypeVariables if no synthetics
2021-12-15 22:23:16 +03:00
Simon Ogorodnik
8cf97127fe
Add util for safe registration of type variables in constraint system
2021-12-15 22:23:16 +03:00
Simon Ogorodnik
1593dd2514
FIR: Remove recursive processAllContainingCallCandidates
2021-12-15 22:23:14 +03:00
Simon Ogorodnik
bb13583862
FIR: Rename stub type for builder inference
2021-12-15 22:23:13 +03:00
Simon Ogorodnik
1a288fcdcd
FIR: Lookup contained postponed atoms recursively in delegate inference
2021-12-15 22:23:13 +03:00
Simon Ogorodnik
951eebcd68
FIR: Do not invert order of synthetic variables
2021-12-15 22:23:11 +03:00
Simon Ogorodnik
df9da371cb
FIR: Fix synthetic type variables to independent stub types
2021-12-15 22:23:11 +03:00
Simon Ogorodnik
580410863f
FIR: Allow to create synthetic variables during stub creation
2021-12-15 22:23:10 +03:00
Simon Ogorodnik
c3c4404bc5
FIR: Use only successful calls for constraints in delegate inference
2021-12-15 22:23:10 +03:00
Simon Ogorodnik
64944a1247
FIR: Register type variables properly in builder inference
2021-12-15 22:23:09 +03:00
Simon Ogorodnik
0d9ed6990e
FIR: Build currentConstraintStorage for delegate inference incrementally
2021-12-15 22:23:08 +03:00
Simon Ogorodnik
8f9fd76254
FIR: Remove unused FirInferenceSession.addErrorCall
2021-12-15 22:23:06 +03:00
Simon Ogorodnik
11ec23e5dc
FIR: Make synthetic type variables fix to self-stub type if no info
2021-12-15 22:23:05 +03:00
Mikhail Glukhikh
8ae37a3dd2
FIR: Attempt to cache constraint storage in delegate inference
2021-12-15 22:23:04 +03:00
Mikhail Glukhikh
1e41ec7d22
FIR: replace ConeComposedSubstitutor with ChainedSubstitutor
2021-12-15 22:23:03 +03:00
Simon Ogorodnik
52145e0623
FIR: Respect nullability when substituting stub types
2021-12-15 22:23:02 +03:00
Simon Ogorodnik
b45b624945
FIR: Fix integrating DeclaredUpperBound positions in builder inference
2021-12-15 22:23:01 +03:00
Simon Ogorodnik
0d81e14904
FIR: Remove default constraint stub type == synthetic variable
2021-12-15 22:22:59 +03:00
Simon Ogorodnik
bb411cbba7
FIR: Try to implement delegate inference by using stub types chain
2021-12-15 22:22:56 +03:00
Simon Ogorodnik
196be93d42
FIR: Add separate type constructor to stub types
2021-12-15 22:22:54 +03:00
Mikhail Glukhikh
4d9e919f7e
FIR: preliminary refactoring of delegate resolve
2021-12-15 22:22:51 +03:00
Mikhail Glukhikh
df50a8141f
FirCallCompleter: unwrap definitely not-null type properly
...
#KT-50180 Fixed
2021-12-13 16:24:59 +03:00
Ivan Kochurkin
fa41e0f5a9
[FIR2IR] Minor: reuse calculated expression
2021-12-09 12:31:25 +00:00
Ivan Kochurkin
f68c8f8f01
[FIR] Fix visibility issues with private members within inner and anonymous scopes ^KT-49992 Fixed
2021-12-09 12:31:24 +00:00
Mikhail Glukhikh
a6d4f9c3b0
FIR: don't change explicitly given anonymous function type
2021-12-09 13:26:40 +03:00
Mikhail Glukhikh
f8b3eb0801
FIR: introduce helpers to get resolved reference / symbol
2021-12-07 23:17:34 +03:00
Mikhail Glukhikh
de783ad51f
FIR: clarify some calls around lookupTag.toSymbol
2021-12-06 18:07:20 +03:00
Mikhail Glukhikh
2ba2453062
ConeFlexibleType: statically require to have simple bounds
2021-12-06 18:07:19 +03:00
Tianyu Geng
58067e0a1e
FIR checker: carry original candidate in ConeDiagnosticWithCandidates
...
This is needed by IDE when resolving calls because candidates carry more
information than just the targeting symbol.
2021-12-06 12:40:42 +01:00
Dmitriy Novozhilov
1f0b62b25f
[FIR] Add smartcasts from == if equals is from Any
...
^KT-49127 Fixed
2021-12-03 14:19:25 +03:00
Dmitriy Novozhilov
8c11ea266a
[FIR] Enable plugin phases if some extensions are registered
2021-12-03 14:17:39 +03:00
Ilya Kirillov
f722a54c78
Analysis API: separate constant values from annotation values
2021-12-02 20:09:16 +01:00
Anastasiya Shadrina
f427265739
[FE] Resolve overload conflict between contextual and non-contextual declarations
2021-12-02 20:24:03 +03:00
Sergej Jaskiewicz
599f705842
[stdlib] Make @LowPriorityInOverloadResolution applicable to ctors
2021-12-02 12:39:40 +00:00
Tianyu Geng
18f7a760bb
FIR checker: report unresolved reference in imports
...
Compared to FE1.0, instead of using UNRESOLVED_REFERENCE, a new
UNRESOLVED_IMPORT diagnostic is introduced. This is so that we can use a
different positioning strategy to highlight the last part of the import
if the entire import is passed.
Also, this change fixed some incorrectly rejected imports in FIR. Such
cases are covered the newly added test file staticFunAndPropertyImport.kt
2021-12-01 23:45:18 +03:00
Dmitriy Novozhilov
e7af50fe2b
[FIR] Allow all extensions register declaration predicates
2021-11-30 12:57:52 +03:00
Denis.Zharkov
7eb758fab1
FIR: Avoid propagation of @Exact annotation through elvis
2021-11-26 19:39:52 +03:00
Denis.Zharkov
0d9ad62d4a
Fix inference for lambdas with with extension function expected type
...
^KT-49832 Fixed
^KT-49836 Fixed
2021-11-26 19:39:51 +03:00
Denis.Zharkov
61fe70b600
Minor. Rename isAnonymousFunction to isFunctionExpression
2021-11-26 19:39:50 +03:00
Denis.Zharkov
c0a46eaefd
FIR: Fix inference of nullable unit lambda at RHS of elvis
2021-11-26 19:39:49 +03:00
Denis.Zharkov
07440ee4a1
FIR: Fix incorrect inference errors for <expr>::class
...
Do not use outer expect type for <expr>
2021-11-26 19:39:46 +03:00
Denis.Zharkov
3ec7866ead
FIR: Fix inference for case of non-nullable RHS of elvis
...
Some existing tests start failing after previous commits adding @Exact
attribute to `?:`
They have a form:
var x: String? = nullable()
if (x == null) {
x = nullable() ?: "" // considering @Exact the whole elvis is inferred to nullable from expect type
}
x.length // should be smart cast
2021-11-26 19:39:46 +03:00
Denis.Zharkov
c0b6a593e0
FIR: Fix incorrect type of block generated for inc operator
...
Previously, it was obtained from expected type of a variable being assigned,
but it's better to use the type of resulting expression
Initially this part was brought in 4ab0897d7d ,
but as we see in commit message and tests it was all about unit-coercion
2021-11-26 19:39:38 +03:00
pyos
a1be855d17
FIR: thread control flow through anonymous object init blocks
...
^KT-39646 Fixed
2021-11-26 14:21:29 +03:00
Dmitriy Novozhilov
2b84e8e68f
[FIR] Pass proper containing classes from context to type resolution for local classes
2021-11-26 11:26:24 +03:00
Dmitriy Novozhilov
330574cab6
[FIR] Properly support smartcasts on stable when subjects in when conditions
...
^KT-49860 Fixed
2021-11-26 11:26:21 +03:00
Dmitriy Novozhilov
8707be51c9
[FIR] Report errors about invisible types from type resolution
2021-11-26 11:26:17 +03:00
Dmitriy Novozhilov
f2c319c4ae
[FIR] Add ability to safe proper ConeKotlinType in FirErrorTypeRef
...
This is needed for cases when some type ref is resolved to proper type
but has some diagnostic (e.g. this type is invisible)
2021-11-26 11:26:16 +03:00
Ivan Kochurkin
3beb447e85
[FIR] Consider anonymous object declarations in classDeclarationsStack in transformers
2021-11-24 23:13:38 +03:00
Nikolay Lunyak
8d647fa016
[FIR] KT-49265: Fix implicit visibility checks
2021-11-24 14:44:50 +03:00