[FIR] Support for EXPOSED_FUNCTION_RETURN_TYPE

This commit is contained in:
rapturemain
2020-03-21 05:20:15 +03:00
committed by Mikhail Glukhikh
parent 0f16c88dd2
commit 4e577caa99
7 changed files with 62 additions and 0 deletions
@@ -0,0 +1,9 @@
class A {
private class InnerA {
}
}
abstract class B {
<!FIR_EXPOSED_FUNCTION_RETURN_TYPE!>fun foo(str: String): A.InnerA<!>
}
@@ -0,0 +1,23 @@
FILE: exposedFunctionReturnType.kt
public final class A : R|kotlin/Any| {
public constructor(): R|A| {
super<R|kotlin/Any|>()
}
private final class InnerA : R|kotlin/Any| {
public[private] constructor(): R|A.InnerA| {
super<R|kotlin/Any|>()
}
}
}
public abstract class B : R|kotlin/Any| {
public constructor(): R|B| {
super<R|kotlin/Any|>()
}
public final fun foo(str: R|kotlin/String|): R|A.InnerA|
}
@@ -2138,6 +2138,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/visibility"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
}
@TestMetadata("exposedFunctionReturnType.kt")
public void testExposedFunctionReturnType() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/visibility/exposedFunctionReturnType.kt");
}
@TestMetadata("exposedPropertyType.kt")
public void testExposedPropertyType() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/visibility/exposedPropertyType.kt");
@@ -2138,6 +2138,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/visibility"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
}
@TestMetadata("exposedFunctionReturnType.kt")
public void testExposedFunctionReturnType() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/visibility/exposedFunctionReturnType.kt");
}
@TestMetadata("exposedPropertyType.kt")
public void testExposedPropertyType() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/visibility/exposedPropertyType.kt");