Commit Graph

95 Commits

Author SHA1 Message Date
simon.ogorodnik 1a7b30c13a [FIR] Fix incorrect name in anonymous object class id 2020-06-16 00:01:06 +03:00
Dmitriy Novozhilov d7ee168dff [FIR] Create error candidate for completion instead of simple error reference 2020-06-15 15:32:25 +03:00
Denis Zharkov 7b61bf9178 FIR: Add nullability smartcast after !is check
^KT-39072 Fixed
2020-06-15 11:33:42 +03:00
Denis Zharkov 24948a8b3f FIR: Fix incorrect handling bare types when subject is type alias
^KT-39043 Fixed
2020-06-15 11:33:42 +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 bea37569e6 FIR: Fix processOverriddenFunctions implementations 2020-06-11 11:31:36 +03:00
Denis Zharkov 38922a84f1 FIR: Do not create synthetic properties for non-Java accessors
^KT-35495 Fixed
2020-06-11 11:01:43 +03:00
simon.ogorodnik ab02381a83 [FIR] Make overriding generic callables independent of TP bounds order 2020-06-05 17:46:35 +03:00
simon.ogorodnik 2287435740 [FIR] KT-39033: Fix generic property override detection
#KT-39033 Fixed
2020-06-05 17:46:35 +03:00
Mikhail Glukhikh 1ea72ec378 Fix test data in FIR diagnostic test (merge with local eff. visibility) 2020-06-04 10:35:01 +03:00
Denis Zharkov 55a4c40970 FIR: Fix diagnostics test data after safe-call refactoring
^KT-38444 In Progress
2020-06-03 10:43:37 +03:00
Denis Zharkov 723b275d99 FIR: Fix rendered fir and DFA graph test data after safe-calls refactoring
^KT-38444 In Progress
2020-06-03 10:43:37 +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 be4d3783a4 FIR: Fix type resolution for anonymous objects
^KT-39050 Fixed
2020-06-03 10:43:37 +03:00
Denis Zharkov 4d484dd971 FIR: Support java array in type argument
^KT-37321 Fixed
2020-06-03 10:43:37 +03:00
Mikhail Glukhikh 0ffa0b2bd7 [FIR] Fix effective visibility handling for local members
In future 'Local' effective visibility could be used
as a flag of local declaration
2020-06-02 18:47:58 +03:00
Mikhail Glukhikh 72dd2ef448 [FIR] Fix CFG building for secondary constructor with delegation 2020-06-02 16:12:32 +03:00
Mikhail Glukhikh 718f0240a1 [FIR TEST] Add problematic CFG test 2020-06-02 16:12:21 +03:00
Mikhail Likholetov 80cd26c9df [FIR] Support several annotation class diagnostics 2020-05-21 18:01:36 +03:00
Kevin Most 4f26ac9a04 Fix "Koltin" typos throughout codebase (#3383)
* Fix "Koltin" typos throughout codebase

* Update K2MetadataKlibSerializer.kt
2020-05-20 15:12:32 +03:00
Denis Zharkov b691b13d8e FIR: Add separate local scopes for blocks 2020-05-15 16:04:44 +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
Mikhail Glukhikh 41f241f608 FIR CFG: merge DFA + CFA edge in Simple edge 2020-05-13 10:37:08 +03:00
Mikhail Glukhikh 32cfee50e0 FIR CFG: remove duplicating lambda enter -> exit connection 2020-05-13 10:37:08 +03:00
Mikhail Glukhikh 22e7264460 [FIR] Use all implicit receivers for del. constructors, not just one 2020-05-12 16:57:08 +03:00
Mikhail Glukhikh 535b4434a8 [FIR TEST] Add extra test for inner classes inside hierarchy 2020-05-12 16:57:08 +03:00
Mikhail Glukhikh 3aca40538b [FIR TEST] Fix error in exposedSupertype test 2020-05-12 16:57:07 +03:00
Mikhail Glukhikh 457fb09e3a [FIR] Use tower to resolve delegated constructors, set dispatch receiver 2020-05-12 16:57:07 +03:00
Mikhail Glukhikh 38fc4d0f1f FIR: set & use dispatch receiver for q. access with super reference 2020-05-07 12:02:57 +03:00
Jinseong Jeon 7b01cf7b04 FIR: handle labeled super reference properly 2020-05-07 12:02:56 +03:00
Likholetov Mikhail aa706d322d [FIR] Support several annotation class diagnostics 2020-05-06 10:32:01 +03:00
rapturemain 02aa11a0a0 [FIR] Support for EXPOSED_TYPE_PARAMETER_BOUND 2020-04-30 12:08:43 +03:00
Mikhail Glukhikh 07e9b9517a [FIR] Extract interface FirEffectiveVisibility 2020-04-29 17:25:12 +03:00
Mikhail Glukhikh b0b198119d FIR resolve completion: transform receivers for variable accesses 2020-04-28 16:32:06 +03:00
rapturemain 49593d308c [FIR] Add EXPOSED_SUPER_(CLASS/INTERFACE) checker 2020-04-27 13:00:49 +03:00
Nick 96238cbe1f [FIR] Support diagnostic QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE 2020-04-24 16:48:28 +03:00
Mikhail Glukhikh 57b4a54766 [FIR] Calculate effective visibility inside anonymous object properly
#KT-38432 Fixed
2020-04-23 13:57:27 +03:00
Ilya Kirillov 1a90866ce1 FIR: handle member scope for anonymous objects
#KT-37120 fixed
2020-04-23 10:38:41 +03:00
Denis Zharkov 706ccb2cf9 FIR: Adjust testData for spec tests: invoke on nullable receiver
It's a design problem, see related issue

^KT-30415
2020-04-21 10:16:34 +03:00
Denis Zharkov 6fdbc38cf1 FIR: Fix label/receiver for lambda within infix calls
While this fix only changes label name, it's important for proper
lambda resolution because receiver is set for a lambda
only in presence of a label

This commit fixes a lot of checkType calls in diagnostic tests
2020-04-21 09:52:52 +03:00
Denis Zharkov 65e444a39c FIR: Properly support local functions in DEBUG_INFO_CALL 2020-04-21 09:48:03 +03:00
Denis Zharkov fa3b3e7a9a FIR: Fix false positive INAPPLICABLE_INFIX_MODIFIER 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 7612f37c85 FIR: Prohibit calling singletons' constructors 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
Nick c4b7ac994b [FIR] Support diagnostic ABSTRACT_SUPER_CALL 2020-04-20 18:33:40 +03:00
rapturemain 8960829c01 [FIR] Cast error on the element name instead of the whole body 2020-04-20 17:27:16 +03:00
rapturemain d811f6f4a6 [FIR] Support for EXPOSED_PARAMETER_TYPE 2020-04-20 17:25:25 +03:00
rapturemain 2e8f73adba [FIR] Change errors location from Errors.java to FirErrors.kt 2020-04-20 17:25:25 +03:00