Commit Graph

11 Commits

Author SHA1 Message Date
Dmitriy Novozhilov d7ee168dff [FIR] Create error candidate for completion instead of simple error reference 2020-06-15 15:32:25 +03:00
Denis Zharkov 5ab05e6e47 FIR: Fix incorrect resolution to synthetic property by implicit receiver
When there's an explicit one

^KT-39028 Fixed
2020-06-11 11:31:39 +03:00
Denis Zharkov 293f78efe8 FIR: Correct capturing for type-alias bases arguments
NB: The test data change at testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.fir.kt
is correct: see the relevant non-fir test, the call shouldn't be applicable

^KT-39008 Fixed
2020-06-11 11:31:38 +03:00
Denis Zharkov 7ba1371466 FIR: Support safe-calls new format in body resolution
^KT-38444 In Progress
2020-06-03 10:43:37 +03:00
Denis Zharkov 0ef1628751 FIR: Refactor scope structure on body resolve stage
Before this change:
- Local scopes, implicit receivers and type parameter scopes were separated.
- Static scopes for super classes were not present as a concept.
Instead of them, all-inherited-static for the current class has been used.
- During call resolution we were processing implicit receivers first and then non-local scopes,
while we should process them in the order of their syntax appearance from the closest
to the most distant

All these facts affect semantics (see test data changed here and the following commits)

The architecture changes are the following:
- FirTowerDataElement introduced as tower level that is used in resolution
  (effectively it's a union type between scope and implicit receiver + isLocal flag)
- FirTowerDataContext introduced for sake of encapsulation of tower data elements' list
  (it also has redundant implicitReceiverStack and localScopes)
- For each regular class we collect relevant tower data elements and add them to the current context
- Also, we preserve a special tower data context for static entities of the class
  (it doesn't have class' dispatch receiver and generic parameters)
2020-05-15 16:04:44 +03:00
Denis Zharkov 65e444a39c FIR: Properly support local functions in DEBUG_INFO_CALL 2020-04-21 09:48:03 +03:00
Denis Zharkov 27b860682b FIR: Support DEBUG_INFO_EXPRESSION_TYPE 2020-04-21 09:48:03 +03:00
Denis Zharkov b62400124a FIR: Support DEBUG_INFO_CALL calls in tests 2020-04-21 09:48:03 +03:00
Mikhail Glukhikh fe02c2bab3 FIR: return Unit from empty lambda 2020-04-20 17:05:34 +03:00
Denis Zharkov 6cc6b9efcb FIR: Fix overload resolution for some invoke cases
Namely, it's about the cases when there are multiple variable candidates
with the same priority and all of them should be collected and compared
2020-04-02 12:10:50 +03:00
Denis Zharkov 9abe669443 FIR: Fix resolution for invokes on class qualifiers 2020-04-02 12:10:50 +03:00