Fix type parameters indexes of MockClassDescriptor

Exception was thrown during mapping of arguments to parameters in `computeSupertypeProjections`

 #KT-18522 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2018-02-09 19:12:45 +03:00
parent 310ee67c35
commit 9e22761262
6 changed files with 39 additions and 14 deletions
@@ -50,7 +50,7 @@ class NotFoundClasses(private val storageManager: StorageManager, private val mo
private val isInner: Boolean,
numberOfDeclaredTypeParameters: Int
) : ClassDescriptorBase(storageManager, container, name, SourceElement.NO_SOURCE, /* isExternal = */ false) {
private val typeParameters = (1..numberOfDeclaredTypeParameters).map { index ->
private val typeParameters = (0 until numberOfDeclaredTypeParameters).map { index ->
TypeParameterDescriptorImpl.createWithDefaultBound(
this, Annotations.EMPTY, false, Variance.INVARIANT, Name.identifier("T$index"), index
)