Commit Graph

18 Commits

Author SHA1 Message Date
Igor Yakovlev 966743c704 [FIR IDE] Enable passing completion tests 2021-05-14 23:05:49 +03:00
Roman Golyshev 0d7eb971ca Fix test data 2021-04-13 11:40:24 +00:00
Roman Golyshev 28d8d2d903 FIR IDE: Search for the first non-local declaration in EnclosingDeclarationContext::detect
Local declarations do not have a stable `ClassId`, which is used in
`declarationUtils.collectDesignation`. Local classes will always have
`outerClassId.isLocal = true`, even when it is not true (see
`org.jetbrains.kotlin.fir.builder.Context.currentClassId` for why this
happens)
2021-04-13 11:40:20 +00:00
Roman Golyshev f641466f70 FIR IDE: Fix searching for the closest function to re-resolve
If the function is local, there would be errors related to its
unresolved body and receiver type
2021-03-19 12:37:39 +03:00
Roman Golyshev dcc22d3e5d FIR IDE: Fix completion in property setters
Property consists of getter and setter (both optional). The setter
have a single `value` parameter with type

Because of it, we have to make a separate 'frankenstein setter' with
original resolved header, but with the body of the fake one

It seems that getters does not have such issues
2020-09-12 11:49:35 +00:00
Roman Golyshev 7bd9c52732 FIR Completion: Fix completion in function calls (foo.bar<caret>())
In such expressions, `KtCallExpression` wraps `KtSimpleNameExpression`,
so `getQualifiedExpressionForSelector()` returns `null`

Also, enable tests that are fixed by this
2020-09-09 13:14:08 +03:00
Pavel Kirpichenkov 8b28e54584 [FIR-IDE] Update tests 2020-09-03 16:44:57 +03:00
Ilya Kirillov 106d8e74d4 FIR IDE: unmute passing completion tests 2020-09-02 11:16:20 +03:00
Ilya Kirillov 8714ad575f FIR IDE: move FIR IDE completion tests to idea-fir module 2020-09-02 11:16:16 +03:00
Roman Golyshev 64187b40c9 FIR Completion: Prevent immediate completion in number literals
- This is copied from the original KotlinCompletionContributor
2020-08-10 18:25:32 +03:00
Roman Golyshev 1b3a1a662f Add simple completion of class-like symbols 2020-08-09 12:02:34 +03:00
Ilya Kirillov 902b42ae1d FIR IDE: fix typo in completion testdata
Co-authored-by: Roman Golyshev <roman.golyshev@jetbrains.com>
2020-08-09 12:01:59 +03:00
Roman Golyshev a2cf01162e Fix bug with member extensions with explicit receiver
Co-authored-by: Ilya Kirillov <ilya.kirillov@jetbrains.com>
2020-08-09 12:01:48 +03:00
Roman Golyshev 2eb439899e Use index to get symbols from importing scopes 2020-08-09 12:01:25 +03:00
Roman Golyshev e7f5594ffe Use more correct check for the constructor symbol
- add test for extension function receiver
2020-08-09 12:01:23 +03:00
Roman Golyshev a3da1ea1a0 Iterate on symbols, not on scopes
- This way it is easier to get the correct results
2020-08-09 12:01:15 +03:00
Roman Golyshev 81f60bf252 Add test for smartcast 2020-08-09 12:01:07 +03:00
Roman Golyshev ffb907150a Use information about receivers in completion
- Found few problems during resolving a single functon; disabled
assertions and marked them with TODO
- Add simple completion tests to simplify development
2020-08-09 12:01:00 +03:00