Dmitry Petrov
08de82db85
Added tests for KT-29833
2019-02-15 16:25:16 +03:00
Dmitry Petrov
360bfcaf6a
KT-29340 Provide effective modality for enum class in IR
...
* if enum class has abstract members, then it is ABSTRACT
* otherwise, if enum class has entries with members, then it is OPEN
* otherwise, it is FINAL.
2019-01-22 10:52:54 +03:00
Georgy Bronnikov
2b0ec8abe3
Update tests
2018-12-10 17:26:55 +03:00
Dmitry Petrov
6f97db81c8
Update testData after IR type rendering changes
2018-12-07 10:51:55 +03:00
Igor Chevdar
2ff87ab1ce
Fixed tests on IR copier
2018-11-15 19:13:06 +03:00
Dmitry Petrov
bd1491ac8a
psi2ir: Merge constant entries in string template expressions
...
This is required to handle UCNs properly, see KT-28006.
#KT-28006
2018-11-08 12:29:15 +03:00
Alexander Udalov
266a8dae3f
Fix KClassValue behavior for reified type parameter literals
...
#KT-27799 Open
2018-10-25 16:27:23 +02:00
Dmitry Petrov
8891733074
Generate const val initializers as IrConst expressions
2018-10-02 13:46:37 +03:00
Mikhael Bogdanov
4fb434c0de
Move out jvm-specific part from ir-common
...
#KT-27005 Fixed
2018-10-02 11:12:21 +02:00
Ilmir Usmanov
14818a4fc1
Minor. Remove tests with suspend delegates
2018-09-18 14:56:11 +03:00
Alexander Udalov
0e5544a491
Use AnnotationSplitter for annotations on extension receiver
...
Instead of using `@receiver:`-targeted annotations on the receiver type,
use normal annotations of the ReceiverParameterDescriptor instance
everywhere
2018-09-06 19:13:10 +03:00
Georgy Bronnikov
50e8f7efc7
Track fake overrides for IrField
2018-08-24 13:41:52 +03:00
Mikhael Bogdanov
1a1bb53381
Update IR text test
...
Additional implicit coercions to unit was added
2018-08-15 14:18:15 +03:00
Dmitry Petrov
6dfcf15a39
IR: IrField.isStatic
2018-07-31 13:39:54 +03:00
Dmitry Petrov
65fe1101fd
Object references in object field initializers are 'GET_VAR this@Object'
2018-07-23 18:16:32 +03:00
Dmitry Petrov
ae0704af9c
Generate singleton references as GET_OBJECT in nested classes
2018-07-20 16:46:18 +03:00
Svyatoslav Scherbina
226f16b44e
ir.tree: fix .originalKotlinType for transformed IR types
2018-07-03 09:55:12 +03:00
Dmitry Petrov
b1d0a5e807
Fix delegated function body generation
2018-06-29 11:24:46 +03:00
Dmitry Petrov
799fcc2606
Fix IrType rendering, update testData
2018-06-29 11:24:46 +03:00
Roman Artemev
960fba3c4e
Fix test failures
2018-06-15 16:23:06 +03:00
Dmitry Petrov
7b1b557250
psi2ir: Java annotations have no primary constructor
2018-05-31 10:09:31 +03:00
Dmitry Petrov
cb301763f3
psi2ir: Fix implicit casts generation
...
Implicit cast from T to S is not required if
T <: S.makeNullable()
2018-05-30 12:02:34 +03:00
Dmitry Petrov
ab455d6572
IR: IrSimpleFunction.correspondingProperty: IrProperty?
...
Non-null for a property accessor, points to a corresponding property.
2018-05-25 09:40:51 +03:00
Dmitry Petrov
8dbfd85d26
psi2ir: Support class literals in annotations
2018-05-22 15:29:01 +03:00
Dmitry Petrov
0feb50021c
IrClass.isInner
2018-05-14 10:37:27 +03:00
Dmitry Petrov
93f5fe2451
IrField is 'final' if corresponding property is 'val'
2018-05-11 11:24:46 +03:00
Dmitry Petrov
729efaf912
IR: IrConstructor.isPrimary
...
NB this is required for Kotlin/JS.
2018-05-11 11:24:46 +03:00
Dmitry Petrov
a6057fb499
IR: {IrClass, IrFunction, IrProperty, IrField}.isExternal
2018-05-11 11:24:46 +03:00
Dmitry Petrov
9717345e3b
IR: IrField.isFinal
2018-05-11 11:24:46 +03:00
Dmitry Petrov
e6baf0296d
More annotation generation for declarations with test cases
2018-04-09 11:24:37 +03:00
Dmitry Petrov
57077a5eb8
Generate annotations for declarations in psi2ir
2018-04-09 11:24:37 +03:00
Dmitry Petrov
135d3ab57a
Fix type arguments mapping
2018-03-23 11:43:44 +03:00
Svyatoslav Scherbina
f3bc8d179c
Add one more IR text test case
2018-03-16 14:47:20 +03:00
Svyatoslav Scherbina
aac940415f
Fix psi2ir when type parameter bound goes after the type parameter
2018-03-16 14:47:18 +03:00
Svyatoslav Scherbina
7a2d761a7d
Add minor improvements to psi2ir and IR utilities:
...
* Generate missing IR parameter declarations in external stubs
* Use origin = FAKE_OVERRIDE in external IR stubs for fake overrides
* Set .parent in external IR stubs
* Set .parent in IR generated by some utility methods
2018-03-02 15:41:48 +03:00
Dmitry Petrov
13a7270129
Generate type parameter declarations for property accessors
...
This requires "scoped" type parameter symbols, because in the ugly world
of descriptors property accessors have no type parameters of their own.
2018-03-02 14:35:35 +03:00
Dmitry Petrov
ae7f60a96e
Update IR testData after rebase on master
2018-02-28 10:35:13 +03:00
Dmitry Petrov
b206bf199f
Add type operand symbol for type operator expression
2018-02-28 10:35:13 +03:00
Dmitry Petrov
e89047d2cc
Generate super classes and overridden functions in proper scope
...
Such references require proper scope so that local symbols are bound.
Example:
```
fun <T> outer() {
abstract class ALocal<S : T> {
abstract fun bar()
}
class Local<S : T> : ALocal<S>() {
override fun bar() {}
}
}
```
Here local classes have type parameters with upper bounds depending on
function type parameters, and members overriding members in other local
classes.
2018-02-28 10:35:13 +03:00
Dmitry Petrov
02f01efaac
Update testData
2018-02-28 10:35:13 +03:00
Dmitry Petrov
e5295d0f78
Generate references to overridden declarations as a separate pass
...
NB currently it relies on overriddenDescriptors in a FunctionDescriptor,
thus maybe incorrect for transformed declarations.
2018-02-28 10:35:13 +03:00
Dmitry Petrov
4bb6c61a5a
Don't generate enum entry initializers for 'expect enum class'
2018-02-27 10:08:12 +03:00
Dmitry Petrov
36128ba66f
Don't generate primary constructor body for expect classes
2018-02-13 10:09:28 +03:00
Dmitry Petrov
6cb68531ae
Minor: add missing "'"
2018-01-17 12:31:07 +03:00
Dmitry Petrov
bba8168150
Add test for extension properties declaration in IR
2018-01-17 12:31:07 +03:00
Dmitry Petrov
fdd000c94f
Update testData to new format
2018-01-17 12:31:07 +03:00
Kirill Rakhman
8bc020f31b
Fix modifier order in generated overriden functions
...
Fixes #KT-21600
2018-01-16 15:42:02 +01:00
Ilya Gorbunov
7efaa7cabc
Allow delegating val properties to out-projected MutableMap
...
Change generic signature of MutableMap.getValue, use 'out @Exact V' and `V1: V` types instead of single `in V`.
Fix affected IR generation tests.
#KT-18789 Fixed
2017-12-07 20:26:53 +03:00
Dmitry Petrov
bd5b984da9
Return type of local delegated property setter should be Unit
...
#KT-17950 Fixed
2017-05-22 11:47:09 +03:00
Dmitry Petrov
f5fde2c24f
Dump absent type arguments
2017-05-05 09:59:30 +03:00