Commit Graph

29 Commits

Author SHA1 Message Date
Ilya Kirillov 5c3ce67648 Analysis API: introduce KtIntegerLiteralType 2021-09-30 01:46:00 +03:00
Tianyu Geng 43257f7688 FIR IDE: rename SymbolKind: MEMBER -> CLASS_MEMBER 2021-09-29 22:24:27 +02:00
Tianyu Geng 954926e0de FIR IDE: get containing symbol of KtTypeParameterSymbol
As part of this change, we now also allow HL API to get containing
symbol for any KtSymbols.
2021-09-29 22:24:26 +02:00
Tianyu Geng 7c3754f516 FIR IDE: output substitutor from checkExtensionIsSuitable 2021-09-29 22:24:26 +02:00
Tianyu Geng 18a23f26f5 FIR IDE: allow getting overridden symbols on any callable symbols
This way caller don't need to first check if the symbol is allowed to
override. The current API throws for cases like Java field, or enum
entry, which is not very user-friendly.
2021-09-29 22:24:26 +02:00
Tianyu Geng 54b32f6911 FIR IDE: allow get overriding symbols of members in anonymous object 2021-09-29 22:24:26 +02:00
Tianyu Geng 50166c776c FIR IDE: add KtClassInitializerSymbol 2021-09-29 22:24:26 +02:00
Tianyu Geng 3b48103cd2 FIR IDE: Add API to get implicit receiver types at a position
This will be used in completion contribution.
2021-09-29 22:24:25 +02:00
Mark Punzalan 7425986bf0 Analysis API: Don't resolve references to @Deprecated(HIDDEN)
declarations.
2021-09-29 19:39:16 +03:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Jinseong Jeon d9424fa092 FIR IDE/LC: rename origin of constant values 2021-09-23 00:11:26 +02:00
Jinseong Jeon 414881403b FIR IDE: handle annotation array values properly 2021-09-23 00:11:26 +02:00
Jinseong Jeon ffd0a5ed14 FIR IDE: make constant values symbol-free 2021-09-23 00:11:26 +02:00
Jinseong Jeon 0f16a2cb92 FIR IDE: rename some of constant values for consistency 2021-09-23 00:11:25 +02:00
Jinseong Jeon 4c8d975ae5 FIR LC: handle more kinds of annotation values 2021-09-23 00:11:25 +02:00
Jinseong Jeon 6ef2dad895 FIR IDE: more comprehensive abstractions of annotation values 2021-09-23 00:11:25 +02:00
Jinseong Jeon 744961bd00 FIR IDE: test resolution of various annotation values 2021-09-23 00:11:25 +02:00
Tianyu Geng 9ca8d39240 FIR IDE: use KtVariableWithInvokeFunctionCall for extension invoke 2021-09-17 17:27:53 +02:00
Tianyu Geng d2ed203528 FIR IDE: Add substitutor to KtCall 2021-09-17 17:27:52 +02:00
Tianyu Geng 9f0f1781c9 FIR IDE: add validity token to KtCall 2021-09-17 17:27:52 +02:00
Tianyu Geng 245c4082cd FIR IDE: add KtSubstitutor 2021-09-17 17:27:52 +02:00
Tianyu Geng 765cad8448 FIR checker: substitute type parameters in dispatch receiver type
Consider the following code:

```
fun test(a: List<String>) {
  a.first()
}
```

The dispatch receiver type of `first` in this case is `List<T>` before
this change. After this change, it's `List<String>`.

In addition, this change also replace the dispatch receiver type with
the more specific type if available. For example, consider the following

```
class MyList: ArrayList<String>()

fun test(a: MyList) {
  a.get(0)
}
```
The dispatch receiver type of `get` is `MyList`, instead of
`ArrayList<String>`. That is, a fake override is created in this case.
2021-09-17 01:59:06 +03:00
Tianyu Geng d77db2cda6 FIR checker: expose API to check if two types are compatible
This is useful for quickfixes offering casts. We don't want to offer
user to cast incompatible types.

Also, explicitly allow compare to `Nothing` and handle `Nothing` from intersection
2021-09-17 01:59:05 +03:00
Tianyu Geng 951812f130 FIR checker: record whether type mismatch is due to nullability
This is useful for downstream quickfixes.
2021-09-17 01:59:01 +03:00
Jinseong Jeon 35409fdb8d FIR IDE: resolve arrayOf calls in annotations 2021-09-15 22:33:20 +02:00
Jinseong Jeon 068e81570d FIR IDE: type-aware constant conversion 2021-09-15 22:32:12 +02:00
Ilya Kirillov 42f0536904 FIR IDE: move analysis api fir testdata to the analysis directory 2021-09-15 11:32:43 +02:00
Ilya Kirillov b70f4f581e FIR IDE: move low level api main sources to the analysis directory 2021-09-15 11:32:22 +02:00
Ilya Kirillov 0c04ff98c3 FIR IDE: move analysis api to the analysis directory 2021-09-15 11:31:30 +02:00