Add substitution concept into JetType

In most cases it's just a map { Parameter_i => Argument_i }
Will be used when loading Raw types from Java.

Also add ClassDescriptor.getMemberScope by substitution.
This commit is contained in:
Denis Zharkov
2015-07-22 18:40:13 +03:00
parent 557450677f
commit 37420527f2
12 changed files with 87 additions and 2 deletions
@@ -28,6 +28,7 @@ import org.jetbrains.kotlin.resolve.scopes.JetScopeImpl
import org.jetbrains.kotlin.resolve.scopes.UsageLocation
import org.jetbrains.kotlin.types.ErrorUtils.createErrorType
import org.jetbrains.kotlin.types.TypeProjection
import org.jetbrains.kotlin.types.TypeSubstitution
import org.jetbrains.kotlin.types.TypeSubstitutor
import org.jetbrains.kotlin.types.error.MissingDependencyErrorClass
import org.jetbrains.kotlin.utils.Printer
@@ -81,4 +82,5 @@ private class MissingDependencyErrorClassDescriptor(
override fun getUnsubstitutedMemberScope() = scope
override fun getMemberScope(typeArguments: List<TypeProjection?>) = scope
override fun getMemberScope(typeSubstitution: TypeSubstitution) = scope
}