Commit Graph

17 Commits

Author SHA1 Message Date
Tianyu Geng 43257f7688 FIR IDE: rename SymbolKind: MEMBER -> CLASS_MEMBER 2021-09-29 22:24:27 +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
Mark Punzalan 7425986bf0 Analysis API: Don't resolve references to @Deprecated(HIDDEN)
declarations.
2021-09-29 19:39:16 +03: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 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 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
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