Fix raw FIR building with parenthesized expression as selector

This commit is contained in:
Mikhail Glukhikh
2019-12-24 13:30:04 +03:00
parent a18fecb05f
commit a8a50fa657
21 changed files with 115 additions and 34 deletions
@@ -0,0 +1,14 @@
// FIR_IGNORE
fun test(e: Int.() -> String) {
// String
// │ Int
// │ │ fun Int.invoke(): String
// │ │ │
val s = 3.e()
// String
// │ Int
// │ │ fun Int.invoke(): String
// │ │ │test.e: Int.() -> String
// │ │ ││
val ss = 3.(e)()
}
@@ -213,6 +213,11 @@ public class FirVisualizerForRawFirDataGenerated extends AbstractFirVisualizer {
runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/in.kt");
}
@TestMetadata("inBrackets.kt")
public void testInBrackets() throws Exception {
runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt");
}
@TestMetadata("init.kt")
public void testInit() throws Exception {
runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/init.kt");
@@ -213,6 +213,11 @@ public class PsiVisualizerForRawFirDataGenerated extends AbstractPsiVisualizer {
runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/in.kt");
}
@TestMetadata("inBrackets.kt")
public void testInBrackets() throws Exception {
runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt");
}
@TestMetadata("init.kt")
public void testInit() throws Exception {
runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/init.kt");