Mikhail Glukhikh
0804c6a0f3
[FIR] Introduce TYPE_ARGUMENTS_NOT_ALLOWED & some other type errors
...
This commit introduces several different things, in particular:
- check type arguments in expressions
- new TypeArgumentList node to deal with diagnostic source
- ConeDiagnostic was moved to fir:cones
- ConeIntermediateDiagnostic to use in inference (?) without reporting
- detailed diagnostics on error type
2020-08-02 18:19:44 +03:00
Ivan Kylchik
8b9fb6a6cd
[FIR] Remove FirOperatorCall node from fir tree
2020-07-21 13:54:19 +03:00
Ivan Kylchik
d23e9940ec
[FIR] Change fir builder to use newly created nodes
2020-07-21 13:54:15 +03:00
Dmitriy Novozhilov
236dfe60f1
[FIR] Correctly build scopes for resolve of different parts of constructors
...
#KT-40409 Fixed
2020-07-20 14:38:17 +03:00
Denis Zharkov
fea1fb0fc3
FIR: Rename FirSourceElement::withKind to fakeElement
...
And reinforce its contract
2020-07-20 12:24:27 +03:00
Jinseong Jeon
f3475fd098
FIR2IR: store and convert annotations on enum entry
2020-07-17 09:48:45 +03:00
Dmitriy Novozhilov
86791f1fef
[FIR] Fix parsing fun modifier for interfaces in light-tree2fir
2020-07-08 12:13:32 +03:00
Juan Chen
d163853c97
[FIR] add support for implementation by delgation
...
This commit handles "subclass: super-interface by delegate-expression".
During Psi2Fir, for each delegate, we add to the subclass a synthetic
field (which has type super-interface), and an assignment of the
delegate-expression to the synthetic field in the primary constructor,
so that the delegate-expression can be resolved and transformed along
the way.
During Fir2Ir, we look up delegatable members from the super-interface
and generate corresponding functions/properties for the subclass.
TODO: support for generic delegatable members and generic
super-interface.
2020-07-08 09:42:24 +03:00
Dmitriy Novozhilov
59bedaaa55
[FIR] Rename FirElvisCall to FirElvisExpression
...
FirElvisCall is not a FirCall, so FirElvisExpression is more
convenient name
2020-07-03 17:09:29 +03:00
Ivan Kylchik
92a51b9794
[FIR] Add illegal underscore check in BaseFirBuilder
2020-07-03 12:06:49 +03:00
Ivan Kylchik
d0f6997e6d
[FIR] Fix some of fir spec tests for real-literals
...
#KT-38336 Fixed
2020-07-03 12:06:44 +03:00
Dmitriy Novozhilov
102c9c08d0
[FIR] Resolve elvis call as special synthetic call
...
Before that commit we desugared `a ?: b` as
when (val elvis = a) {
null -> b
else -> elvis
}
It was incorrect, because `a` should be resolved in dependent mode,
but when it was `elvis` initializer it was resolved in independent
mode, so we can't infer type for `a` in some complex cases
2020-07-02 15:10:51 +03:00
Mikhail Glukhikh
d846a22e33
[FIR] Introduce & use FirTypeRef.coneType
2020-06-30 18:49:06 +03:00
Ilya Kirillov
5acdad29ec
FIR: change source of existing type refs in DataClassMembersGenerator to avoid sources clash
2020-06-30 11:55:57 +03:00
Ilya Kirillov
94967bcd00
FIR: introduce element kind for source elements
...
It is needed for FIR IDE to determine if FIR element was built by PSI
or it is generated one
2020-06-30 11:55:53 +03:00
Mikhail Glukhikh
c1609ed490
[FIR] Make expect class members also expect
2020-06-29 16:07:50 +03:00
Dmitriy Novozhilov
3a4f53682f
[FIR] Don't convert non-local functions without name as FirAnonymousFunction
2020-06-19 15:52:56 +03:00
Jinseong Jeon
f64f9c2144
FIR: inherit property accessor modifiers from property and vice versa
2020-06-16 19:17:27 +03:00
Mikhail Glukhikh
ca15c33a62
[FIR] Make light tree consistent with raw FIR for empty init case
2020-06-16 15:07:01 +03:00
Mikhail Glukhikh
d9b4e24b29
Exclude JS API dumps from FIR consistency tests
2020-06-16 12:39:26 +03:00
simon.ogorodnik
1a7b30c13a
[FIR] Fix incorrect name in anonymous object class id
2020-06-16 00:01:06 +03:00
simon.ogorodnik
2f89ba9499
[FIR] Fix incorrect referential equals on Name instance
2020-06-16 00:01:06 +03:00
Denis Zharkov
0bd2a74542
FIR: Add FirTypeScope
...
^KT-35495 Relates
2020-06-11 11:31:29 +03:00
Ilya Kirillov
30eab6c8a3
FIR IDE: Implement search of psi elements for deserialized Kotlin declarations
...
Fix "FIR IDE: Implement search of psi elements for deserialized Kotlin declarations"
2020-06-09 16:19:29 +03:00
Ilya Kirillov
507fc34c22
FIR: fix incorrect psi for named & spread arguments in FIR builder
2020-06-09 16:19:26 +03:00
Mikhail Glukhikh
3567880303
[FIR] Consider enum entry nested classes as local
2020-06-08 12:11:33 +03:00
Jinseong Jeon
0d2552b0b6
FIR: record and serialize the modifier "fun" for functional interface
2020-06-08 09:42:32 +03:00
Denis Zharkov
7a22827af4
FIR: Unify all references to FIR nodes from non-parents
2020-06-03 10:43:37 +03:00
Denis Zharkov
4a4dce1766
FIR: Use more refined names instead of "safe"
...
^KT-38444 Fixed
2020-06-03 10:43:37 +03:00
Denis Zharkov
291afd8448
FIR: Remove FirQualifiedAcces.safe in non-generated code
...
^KT-38444 In Progress
2020-06-03 10:43:37 +03:00
Denis Zharkov
9f793f1486
FIR: Support safe-calls new format in FIR builders
...
^KT-38444 In Progress
2020-06-03 10:43:37 +03:00
Dmitriy Novozhilov
fec3e4faf1
[FIR] Move initialization of common services to FirSessionBase
2020-05-29 10:22:04 +03:00
Dmitriy Novozhilov
6d37776267
[FIR] Rename FirClassImpl to FirRegularClassImpl
...
Also rename `buildClassImpl` to `buildRegularClass` and get rid
of intermediate `AbstractFirRegularClassBuilder`
2020-05-29 10:22:03 +03:00
Dmitriy Novozhilov
60fd505a9c
[FIR] Get rid of FirSealedClass node
...
Now list of inheritors is hold in attributes of `FirRegularClass`
2020-05-29 10:22:00 +03:00
Jinseong Jeon
ff509bdcd3
FIR2IR: fix inverted types for array/element in arrayOf call.
2020-05-27 11:38:32 +03:00
Juan Chen
adba0a03a6
[FIR] Create builtin primitive array types for properties
...
If the primary constructor has a vararg parameter, the corresponding
property has an array type. This commit creates the builtin array
types for such properties if the vararg element type is primitive,
e.g., CharArray instead of Array.
2020-05-26 14:08:47 +03:00
Jinseong Jeon
7a947e8008
FIR: fix default constructor visibility for enum entry.
2020-05-21 08:40:03 +03:00
Jinseong Jeon
0d3301b695
FIR: resolve local class in anonymous initializer.
2020-05-21 08:36:49 +03:00
Jinseong Jeon
30e5748fec
FIR: set proper visibility of property accessors.
2020-05-12 19:47:37 +03:00
Jinseong Jeon
7b01cf7b04
FIR: handle labeled super reference properly
2020-05-07 12:02:56 +03:00
Dmitriy Novozhilov
41545cd2b4
[FIR] Initialize origin in all places with creating of declarations
2020-05-07 09:42:20 +03:00
Mikhail Glukhikh
3d60fdfed1
Raw FIR: don't check class kind for data / inline modifiers
2020-04-30 13:15:24 +03:00
Jinseong Jeon
9a561f4a7c
FIR2IR: generate synthetic members for inline class
2020-04-30 13:09:53 +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
Mikhail Glukhikh
42de83c21a
FIR: fix lambda labeling in light tree builder
2020-04-20 17:05:39 +03:00
Mikhail Glukhikh
fe02c2bab3
FIR: return Unit from empty lambda
2020-04-20 17:05:34 +03:00
Jinseong Jeon
88f81b9b71
FIR: record 'suspend' function modifier in type references
2020-04-20 17:05:28 +03:00
Jinseong Jeon
9f1ecadd65
IR: more consolidation of synthetic member generation for data class.
2020-04-17 12:38:38 +03:00
Dmitriy Novozhilov
a446aa2266
[FIR] Set implicit type for delegated constructor calls in fir builder
2020-04-17 12:37:28 +03:00