[NI] Fix updated type for lambda, use original type for substitution

#KT-24367 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2018-05-21 15:25:43 +03:00
parent 005bdc46eb
commit 1b809413d2
5 changed files with 33 additions and 5 deletions
@@ -0,0 +1,7 @@
fun foo() {
myMap {<caret> it: Int -> it }
}
fun <T> myMap(transform: (T) -> T): T = TODO()
// TYPE: { it: Int -> it } -> <html>(Int) &rarr; Int</html>
@@ -109,6 +109,11 @@ public class ExpressionTypeTestGenerated extends AbstractExpressionTypeTest {
runTest("idea/testData/codeInsight/expressionType/ThisInLambda.kt");
}
@TestMetadata("typeOfLambda.kt")
public void testTypeOfLambda() throws Exception {
runTest("idea/testData/codeInsight/expressionType/typeOfLambda.kt");
}
@TestMetadata("VariableDeclaration.kt")
public void testVariableDeclaration() throws Exception {
runTest("idea/testData/codeInsight/expressionType/VariableDeclaration.kt");