[FIR] Support for EXPOSED_PARAMETER_TYPE

This commit is contained in:
rapturemain
2020-03-21 17:26:15 +03:00
committed by Mikhail Glukhikh
parent 216eea6a20
commit d811f6f4a6
7 changed files with 68 additions and 10 deletions
@@ -0,0 +1,9 @@
class A {
private class AInner
}
class B {
fun foo(<!EXPOSED_PARAMETER_TYPE!>value: A.AInner<!>) {
}
}
@@ -0,0 +1,23 @@
FILE: exposedFunctionParameterType.kt
public final class A : R|kotlin/Any| {
public constructor(): R|A| {
super<R|kotlin/Any|>()
}
private final class AInner : R|kotlin/Any| {
public[private] constructor(): R|A.AInner| {
super<R|kotlin/Any|>()
}
}
}
public final class B : R|kotlin/Any| {
public constructor(): R|B| {
super<R|kotlin/Any|>()
}
public final fun foo(value: R|A.AInner|): R|kotlin/Unit| {
}
}
@@ -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("exposedFunctionParameterType.kt")
public void testExposedFunctionParameterType() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/visibility/exposedFunctionParameterType.kt");
}
@TestMetadata("exposedFunctionReturnType.kt")
public void testExposedFunctionReturnType() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/visibility/exposedFunctionReturnType.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("exposedFunctionParameterType.kt")
public void testExposedFunctionParameterType() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/visibility/exposedFunctionParameterType.kt");
}
@TestMetadata("exposedFunctionReturnType.kt")
public void testExposedFunctionReturnType() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/visibility/exposedFunctionReturnType.kt");