Commit Graph

46888 Commits

Author SHA1 Message Date
Dmitry Petrov 2d9ae6e93e IrTypes: approximate only non-denotable Kotlin types 2018-06-29 11:24:46 +03:00
Dmitry Petrov 93f4a4da10 IrTypes: star projections
Initial implementation, mostly to avoid infinite recursion in cases such
as 'Enum<*>'.
2018-06-29 11:24:46 +03:00
Dmitry Petrov 5b3947da11 IrTypes: Fix type arguments mapping for properties 2018-06-29 11:24:46 +03:00
Dmitry Petrov 7497372f65 IrTypes: IrProperty has no type of its own
Within the current scheme, type parameters for IrProperty become type
parameters for getter and setter (and, since only extension properties
can have type parameters, backing field's type can't depend on type
parameters; see also KT-24643). Either properties themselves can have
type parameters of their own (for the sake of representing the property
type), or properties don't have types and don't have type parameters.
2018-06-29 11:24:46 +03:00
Dmitry Petrov ad65fa8c45 IrTypes: IrTypeParameter.superTypes can depend on type parameters
IrTypeParameter.superTypes can depend on type parameters and thus should
be initialized with type parameters in scope.
2018-06-29 11:24:46 +03:00
Dmitry Petrov eb6f652763 IrTypes: IrClass.superTypes can depend on type parameters
IrClass.superTypes can depend on type parameters of a class and thus
should be initialized after type parameters are in put in scope.
2018-06-29 11:24:46 +03:00
Dmitry Petrov 8ae17ecbcb IrTypes: IrFunction.returnType can depend on type parameters
Function return type can depend on function type parameters and should
be initialized with type parameters in scope.
2018-06-29 11:24:46 +03:00
Dmitry Petrov 847223683e Minor: IrTypes: fix after rebase 2018-06-29 11:24:46 +03:00
Dmitry Petrov 0ffef64428 IrTypes: IrClass.superTypes, IrTypeParameter.superTypes 2018-06-29 11:24:46 +03:00
Dmitry Petrov 353076f596 compiler/ir/backend.common is NOT a part of compiler/backend-common 2018-06-29 11:24:46 +03:00
Dmitry Petrov 25a66916a6 IrTypes: minor: pass generator context where required 2018-06-29 11:24:46 +03:00
Dmitry Petrov 6649ef2740 IrTypes required to declare symbol 2018-06-29 11:24:46 +03:00
Dmitry Petrov 609a6ca9bb IrTypes: dummy implementation of IrType.render 2018-06-29 11:24:46 +03:00
Dmitry Petrov 4eb2fc66d0 IrTypes: deep copy with symbols
Preliminary implementation of type remapper (does nothing).
2018-06-29 11:24:46 +03:00
Dmitry Petrov 062c4bf41d IrTypes: make old DeepCopy compile
Lots of TODOs, should figure out proper type mapping strategy
(or simply drop this frankenstein code, finally).
2018-06-29 11:24:46 +03:00
Dmitry Petrov 62a42130c8 Add dependency: ir.tree -> intellij
AnnotationGenerator looks into PsiElement
2018-06-29 11:24:46 +03:00
Dmitry Petrov c22f6dee4a IrTypes: update minor utilities 2018-06-29 11:24:46 +03:00
Dmitry Petrov e8fe788df6 IrTypes: Implicit casts, take 1
Keep KotlinType along with IrTypes created by psi2ir.
2018-06-29 11:24:46 +03:00
Dmitry Petrov 54e9a2bb7b IrTypes in psi2ir: generators (seem to be) complete 2018-06-29 11:24:46 +03:00
Dmitry Petrov 5f4f6ef863 IrTypes in psi2ir (work in progress) 2018-06-29 11:24:46 +03:00
Dmitry Petrov 0774ca415c Rebase + reformat 2018-06-29 11:24:46 +03:00
Dmitry Petrov 0f718ec2d8 IrTypes: Fix up some back-end code 2018-06-29 11:24:46 +03:00
Dmitry Petrov 326e4a160f IrTypes in psi2ir (work in progress) 2018-06-29 11:24:46 +03:00
Dmitry Petrov 0e34ee5270 IrTypes: basic built-in types 2018-06-29 11:24:46 +03:00
Dmitry Petrov c97697d7a9 psi2ir: translate types in StatementGenerator
TODO: DI
2018-06-29 11:24:46 +03:00
Dmitry Petrov 372f280578 DeclarationStubGenerator uses IrTypes 2018-06-29 11:24:46 +03:00
Dmitry Petrov 1353cf879c IR: Drop obsolete builders (should be rewritten) 2018-06-29 11:24:46 +03:00
Dmitry Petrov f66f3c1fed psi2ir: cleanup TypeTranslator 2018-06-29 11:24:46 +03:00
Dmitry Petrov 4bd2504367 IR declarations: KotlinType -> IrType 2018-06-29 11:24:46 +03:00
Dmitry Petrov 4992ca9179 IR expressions: KotlinType -> IrType 2018-06-29 11:24:46 +03:00
Dmitry Petrov c28877d23c psi2ir: approximate types in TypeTranslator 2018-06-29 11:24:46 +03:00
Dmitry Petrov 1be28d6032 IrType -> IrDynamicType, IrErrorType, IrSimpleType 2018-06-29 11:24:46 +03:00
Mikhail Glukhikh fdc0335b4a Add actual: handle (incorrect) case with expect function with body
So #KT-23326 Fixed
2018-06-29 10:54:37 +03:00
Mikhail Glukhikh 0fb183e302 Add actual: handle parameters with val/var as compatible with property
So #KT-23762 Fixed
2018-06-29 10:54:36 +03:00
Mikhail Glukhikh dd0b267531 Add actual: handle primary & secondary constructors as compatible
So #KT-23686 Fixed
2018-06-29 10:54:35 +03:00
Mikhail Glukhikh 082c3e6767 Reformat: AddActualFix 2018-06-29 10:54:33 +03:00
Mikhail Glukhikh 16c6d63b10 Create actual: do not generate default parameter values
So #KT-23105 Fixed
2018-06-29 10:54:32 +03:00
Mikhail Glukhikh b13e4535f5 Safe delete: add dialog asking about expect / actual declarations
Related to KT-15666
2018-06-29 10:54:30 +03:00
Mikhail Glukhikh aac71bf904 Safe delete: when invoking on actual, delete expect & actual neighbors
So #KT-15666 Fixed
2018-06-29 10:54:24 +03:00
Mikhail Glukhikh 50e70e4638 Safe delete: when invoking on expect, delete also relevant actual
Partial fix of KT-15666
2018-06-29 10:53:43 +03:00
Mikhail Glukhikh 465d5c077e Safe delete: search for actual declarations more accurately 2018-06-29 10:53:42 +03:00
Mikhail Glukhikh 5bdaef4983 Cleanup: KotlinSafeDeleteProcessor 2018-06-29 10:53:42 +03:00
Alexey Tsvetkov 8848d7a043 Remove groovy plugin from kotlin-gradle-plugin build script 2018-06-28 22:03:11 +03:00
Alexey Tsvetkov 22c1907167 Track project version in ":kotlin-gradle-plugin:processResources"
Before the change consecutive incremental builds with different project versions
produced kotlin-gradle-plugin with the same project.version in project.properties file
2018-06-28 22:03:11 +03:00
Alexey Tsvetkov 3a7c674957 Fix test dependencies in jps-plugin
Otherwise tests fail on clean checkout
2018-06-28 22:03:10 +03:00
Alexey Sedunov a63aa5b7ca Misc: Restore utility functions misplaced in a previous commit 2018-06-28 20:39:16 +03:00
Alexey Sedunov 76ac65f723 Configuration: Use soft references to keep library kind cache
#KT-24943 Fixed
2018-06-28 18:22:28 +03:00
Alexey Sedunov 60583e557f PSI: Do not delete package directive for file in default package
#KT-24968 Fixed
2018-06-28 18:22:28 +03:00
Alexey Sedunov e2a632e326 Misc: Add "refactoring exit" message
This allows executing mandatory code at the end of particular refactoring.
Also this fixes memory leak due to listener not being disposed

 #KT-17235 Fixed
2018-06-28 18:22:28 +03:00
Alexey Sedunov ba2f28720f Introduce Parameter: Fix exceptions caused by write actions in dialogs
#KT-24992 Fixed
2018-06-28 18:22:27 +03:00