Add test on rewrite at slice FUNCTOR

This commit is contained in:
Dmitry Savvinov
2018-12-20 12:41:13 +03:00
parent 0b1ff1a457
commit 594a6588f9
4 changed files with 31 additions and 0 deletions
@@ -0,0 +1,10 @@
// See KT-28847
class Foo(val str: String?) {
val first = run {
str.isNullOrEmpty()
second
}
val second = str.isNullOrEmpty()
}
@@ -0,0 +1,11 @@
package
public final class Foo {
public constructor Foo()
private final val foo: Foo.foo.<no name provided>
public final var property: kotlin.String?
public final inline fun </*0*/ T> equalVetoingObservable(/*0*/ initialValue: T, /*1*/ crossinline onChange: (newValue: T) -> kotlin.Unit): kotlin.properties.ObservableProperty<T>
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
}
@@ -1137,6 +1137,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/callUsualContractFunction.kt");
}
@TestMetadata("rewriteAtSliceFunctor.kt")
public void testRewriteAtSliceFunctor() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/rewriteAtSliceFunctor.kt");
}
@TestMetadata("useBeforeDeclaration.kt")
public void testUseBeforeDeclaration() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.kt");
@@ -1137,6 +1137,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/callUsualContractFunction.kt");
}
@TestMetadata("rewriteAtSliceFunctor.kt")
public void testRewriteAtSliceFunctor() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/rewriteAtSliceFunctor.kt");
}
@TestMetadata("useBeforeDeclaration.kt")
public void testUseBeforeDeclaration() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.kt");