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
e1e149a062
FIR: Support coercion-to-unit semantics for callable references
2020-05-18 11:17:45 +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
simon.ogorodnik
86683e94fc
[FIR] Fix cfg crash with multiple postponed arguments
2020-05-13 19:20:02 +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
Jinseong Jeon
30e5748fec
FIR: set proper visibility of property accessors.
2020-05-12 19:47:37 +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
Alexander Podkhalyuzin
6372c01e49
Added missing specificity comparator to FIR
...
This is required to correctly resolve overloading in cases when we
need to find most specific alternative in Java between int and Integer.
2020-04-28 17:34:42 +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
Ilya Kirillov
fdfb544730
FIR: use Kotlin String constructors instead of java.lang ones
...
#KT-38437 fixed
2020-04-23 10:37: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
477e8bbcd4
FIR: Add test case for qualifier-based call resolution
2020-04-21 09:52:52 +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
6d63de01ac
[FIR] Fix effective visibility calculation & relevant test data
2020-04-20 17:25:26 +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
rapturemain
4e577caa99
[FIR] Support for EXPOSED_FUNCTION_RETURN_TYPE
2020-04-20 17:25:25 +03:00
rapturemain
15d4891c92
[FIR} Test data for EXPOSED_PROPERTY_TYPE
2020-04-20 17:25:24 +03:00
rapturemain
cc86767a23
[FIR] Support for EXPOSED_TYPEALIAS_EXPANDED_TYPE
2020-04-20 17:25:24 +03:00
Mikhail Glukhikh
fe02c2bab3
FIR: return Unit from empty lambda
2020-04-20 17:05:34 +03:00
Dmitriy Novozhilov
f489e4044f
[FIR-TEST] Update testdata after removal bodies of synthetic data class funs
2020-04-17 13:22:19 +03:00
Dmitriy Novozhilov
7f02d57d88
[FIR] Correctly detect super type in delegated constructor call
2020-04-17 12:37:29 +03:00
Juan Chen
a1e0e8b0e7
[FIR] Handle receiver types of extension methods when computing maximally specific types.
...
Test case (from testPrimitiveReceiver):
fun Short.foo() = 3
fun Int.foo() = 4
1::foo
2020-04-15 11:16:33 +03:00
Dmitriy Novozhilov
f7dc06a772
[FIR] Approximate integer constants in lhs of callable reference
2020-04-15 11:13:01 +03:00
Dmitriy Novozhilov
c71f9d9640
[FIR] Use argument mapping from resolved call for contract argument mapping
2020-04-15 11:13:01 +03:00
Dmitriy Novozhilov
a01bbbb0a0
[FIR] Add processing conditional contracts on property accessors
2020-04-15 11:13:00 +03:00
Dmitriy Novozhilov
1074e4bf29
[FIR] Add contracts resolve for property accessors
2020-04-15 11:13:00 +03:00
Dmitriy Novozhilov
d808f3e4fb
[FIR-TEST] Add tests for contracts resolve
2020-04-15 11:12:59 +03:00