[FIR] Implement capturing of cone types same as for kotlin types

This commit is contained in:
Dmitriy Novozhilov
2021-02-03 11:44:55 +03:00
parent 5ce36a528e
commit 373bc578fb
9 changed files with 243 additions and 73 deletions
@@ -14,10 +14,12 @@ object StandardClassIds {
val BASE_KOTLIN_PACKAGE = FqName("kotlin")
val BASE_REFLECT_PACKAGE = BASE_KOTLIN_PACKAGE.child(Name.identifier("reflect"))
val BASE_COLLECTIONS_PACKAGE = BASE_KOTLIN_PACKAGE.child(Name.identifier("collections"))
private fun String.baseId() = ClassId(BASE_KOTLIN_PACKAGE, Name.identifier(this))
private fun ClassId.unsignedId() = ClassId(BASE_KOTLIN_PACKAGE, Name.identifier("U" + shortClassName.identifier))
private fun String.reflectId() = ClassId(BASE_REFLECT_PACKAGE, Name.identifier(this))
private fun Name.primitiveArrayId() = ClassId(Array.packageFqName, Name.identifier(identifier + Array.shortClassName.identifier))
private fun String.collectionsId() = ClassId(BASE_COLLECTIONS_PACKAGE, Name.identifier(this))
val Nothing = "Nothing".baseId()
val Unit = "Unit".baseId()
@@ -85,6 +87,25 @@ object StandardClassIds {
return "Function$n".baseId()
}
val Iterator = "Iterator".collectionsId()
val Iterable = "Iterable".collectionsId()
val Collection = "Collection".collectionsId()
val List = "List".collectionsId()
val ListIterator = "ListIterator".collectionsId()
val Set = "Set".collectionsId()
val Map = "Map".collectionsId()
val MutableIterator = "MutableIterator".collectionsId()
val MutableIterable = "MutableIterable".collectionsId()
val MutableCollection = "MutableCollection".collectionsId()
val MutableList = "MutableList".collectionsId()
val MutableListIterator = "MutableListIterator".collectionsId()
val MutableSet = "MutableSet".collectionsId()
val MutableMap = "MutableMap".collectionsId()
val MapEntry = Map.createNestedClassId(Name.identifier("Entry"))
val MutableMapEntry = MutableMap.createNestedClassId(Name.identifier("MutableEntry"))
val Suppress = "Suppress".baseId()
}