Forbid @Synchronized annotation on suspend functions

and lambdas. With warning for now.
 #KT-27333
This commit is contained in:
Ilmir Usmanov
2021-08-25 17:53:48 +02:00
parent 97176b5d60
commit 92fac304e7
13 changed files with 127 additions and 31 deletions
@@ -36134,6 +36134,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
public void testSynchronizedOnInline() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inline/synchronizedOnInline.kt");
}
@Test
@TestMetadata("synchronizedOnSuspend.kt")
public void testSynchronizedOnSuspend() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inline/synchronizedOnSuspend.kt");
}
}
@Nested
@@ -36134,6 +36134,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
public void testSynchronizedOnInline() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inline/synchronizedOnInline.kt");
}
@Test
@TestMetadata("synchronizedOnSuspend.kt")
public void testSynchronizedOnSuspend() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inline/synchronizedOnSuspend.kt");
}
}
@Nested