KtExpression.analyzeInContext uses correct context when analyzing return's

This commit is contained in:
Valentin Kipyatkov
2016-04-19 18:23:44 +03:00
parent 340fe82fa0
commit c50cf13611
13 changed files with 157 additions and 57 deletions
@@ -40,7 +40,7 @@ import org.jetbrains.kotlin.types.expressions.PreliminaryDeclarationVisitor
): KotlinTypeInfo {
PreliminaryDeclarationVisitor.createForExpression(this, trace)
return contextExpression.getResolutionFacade().frontendService<ExpressionTypingServices>()
.getTypeInfo(scope, this, expectedType, dataFlowInfo, trace, isStatement)
.getTypeInfo(scope, this, expectedType, dataFlowInfo, trace, isStatement, contextExpression)
}
@JvmOverloads fun KtExpression.analyzeInContext(