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
@@ -0,0 +1,3 @@
package a
interface A<T>
@@ -0,0 +1,8 @@
package b
import a.A
interface B {
fun foo(): A<Int>
fun bar(): A<String>
}
@@ -0,0 +1,10 @@
compiler/testData/compileKotlinAgainstCustomBinaries/computeSupertypeWithMissingDependency/source.kt:6:5: error: cannot access class 'a.A'. Check your module classpath for missing or conflicting dependencies
if (true) {
^
compiler/testData/compileKotlinAgainstCustomBinaries/computeSupertypeWithMissingDependency/source.kt:7:11: error: cannot access class 'a.A'. Check your module classpath for missing or conflicting dependencies
b.foo()
^
compiler/testData/compileKotlinAgainstCustomBinaries/computeSupertypeWithMissingDependency/source.kt:9:11: error: cannot access class 'a.A'. Check your module classpath for missing or conflicting dependencies
b.bar()
^
COMPILATION_ERROR
@@ -0,0 +1,11 @@
package c
import b.B
fun bar(b: B) {
if (true) {
b.foo()
} else {
b.bar()
}
}