Skip to content

Commit

Permalink
force unsafe operation
Browse files Browse the repository at this point in the history
  • Loading branch information
neetopia committed Nov 12, 2021
1 parent efce890 commit d8f50e8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,15 +445,15 @@ class ResolverImpl(
return expression?.let {
if (it is KtClassLiteralExpression && it.receiverExpression != null) {
val parent = KtStubbedPsiUtil.getPsiOrStubParent(it, KtPrimaryConstructor::class.java, false)
val scope = resolveSession.declarationScopeProvider.getResolutionScopeForDeclaration(parent)
val scope = resolveSession.declarationScopeProvider.getResolutionScopeForDeclaration(parent!!)
val result = qualifiedExpressionResolver
.resolveDescriptorForDoubleColonLHS(it.receiverExpression!!, scope, bindingTrace, false)
val classifier = result.classifierDescriptor ?: return null
val typeResolutionContext = TypeResolutionContext(scope, bindingTrace, true, true, false)
val possiblyBareType = resolveSession.typeResolver
.resolveTypeForClassifier(typeResolutionContext, classifier, result, it, Annotations.EMPTY)
var actualType = if (possiblyBareType.isBare)
possiblyBareType.bareTypeConstructor.declarationDescriptor.defaultType
possiblyBareType.bareTypeConstructor.declarationDescriptor!!.defaultType
else possiblyBareType.actualType
var arrayDimension = 0
while (KotlinBuiltIns.isArray(actualType)) {
Expand Down

0 comments on commit d8f50e8

Please sign in to comment.