Add test (recursive resolve in property declaration) to JetPsiChecker

This commit is contained in:
Stanislav Erokhin
2014-12-01 21:40:04 +03:00
parent 1664a55dcf
commit db457a612c
3 changed files with 38 additions and 0 deletions
@@ -0,0 +1,14 @@
class Test(foo: Any?, bar: Any?) {
val foo = foo ?: this
private val bar = bar ?: this
private val bas = bas()
val bas2 = bas2()
private fun bas(): Int = null!!
private fun bas2(): Int = null!!
fun bar() = bar(1)
fun bar(<!UNUSED_PARAMETER!>i<!>: Int) = 2
private fun bar2() = bar2(1)
private fun bar2(<!UNUSED_PARAMETER!>i<!>: Int) = 2
}
@@ -0,0 +1,18 @@
package
internal final class Test {
public constructor Test(/*0*/ foo: kotlin.Any?, /*1*/ bar: kotlin.Any?)
private final val bar: kotlin.Any
private final val bas: kotlin.Int
internal final val bas2: kotlin.Int
internal final val foo: kotlin.Any
internal final fun bar(): kotlin.Int
internal final fun bar(/*0*/ i: kotlin.Int): kotlin.Int
private final fun bar2(): kotlin.Int
private final fun bar2(/*0*/ i: kotlin.Int): kotlin.Int
private final fun bas(): kotlin.Int
private final fun bas2(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -382,6 +382,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("RecursiveResolve.kt")
public void testRecursiveResolve() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/RecursiveResolve.kt");
doTest(fileName);
}
@TestMetadata("RecursiveTypeInference.kt")
public void testRecursiveTypeInference() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/RecursiveTypeInference.kt");