Prohibit synchronized methods on interface members

#KT-9310 Fixed
This commit is contained in:
Alexander Udalov
2019-08-13 10:05:11 +02:00
parent 815ff3c860
commit 312205f376
11 changed files with 88 additions and 16 deletions
@@ -0,0 +1,23 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
// !LANGUAGE: +JvmStaticInInterface
// !JVM_TARGET: 1.8
interface I {
companion object {
@Synchronized fun syncFun() {}
<!SYNCHRONIZED_IN_INTERFACE!>@Synchronized<!> @JvmStatic fun syncFunJvmStatic() {}
var syncProp: String
@Synchronized get() = ""
@Synchronized set(value) {}
@JvmStatic var syncPropJvmStatic: String
<!SYNCHRONIZED_IN_INTERFACE!>@Synchronized<!> get() = ""
<!SYNCHRONIZED_IN_INTERFACE!>@Synchronized<!> set(value) {}
var syncPropJvmStaticAccessors: String
<!SYNCHRONIZED_IN_INTERFACE!>@Synchronized<!> @JvmStatic get() = ""
<!SYNCHRONIZED_IN_INTERFACE!>@Synchronized<!> @JvmStatic set(value) {}
}
}