Simplify TypeConstructorImpl, extend it from AbstractClassTypeConstructor

This commit is contained in:
Alexander Udalov
2016-03-16 13:08:31 +03:00
parent b95e27fd87
commit 13ae3d96ab
10 changed files with 64 additions and 121 deletions
@@ -151,14 +151,13 @@ class LazyJavaAnnotationDescriptor(
}
private fun createTypeForMissingDependencies(fqName: FqName) =
ErrorUtils.createErrorTypeWithCustomConstructor(
"[Missing annotation class: $fqName]",
ClassDescriptorImpl(
EmptyPackageFragmentDescriptor(c.module, fqName.parent()), fqName.shortName(), Modality.FINAL,
ClassKind.ANNOTATION_CLASS, listOf(c.module.builtIns.anyType), SourceElement.NO_SOURCE,
"[Missing annotation class: $fqName]"
).apply {
initialize(MemberScope.Empty, emptySet(), null)
}.typeConstructor
)
ErrorUtils.createErrorTypeWithCustomConstructor(
"[Missing annotation class: $fqName]",
ClassDescriptorImpl(
EmptyPackageFragmentDescriptor(c.module, fqName.parent()), fqName.shortName(), Modality.FINAL,
ClassKind.ANNOTATION_CLASS, listOf(c.module.builtIns.anyType), SourceElement.NO_SOURCE
).apply {
initialize(MemberScope.Empty, emptySet(), null)
}.typeConstructor
)
}