Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/inline/synchronizedOnInline.kt
T
Alexander Udalov f9be21c935 Report warning on @Synchronized on inline methods
Until KT-27310 is supported, we warn users that this has no effect.

 #KT-29884 Fixed
2019-03-11 18:32:44 +01:00

17 lines
430 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
<!SYNCHRONIZED_ON_INLINE!>@Synchronized<!>
inline fun foo(f: () -> Unit): Unit = f()
var bar: String
<!SYNCHRONIZED_ON_INLINE!>@Synchronized<!>
inline get() = ""
<!SYNCHRONIZED_ON_INLINE!>@Synchronized<!>
inline set(value) {}
inline var baz: String
<!SYNCHRONIZED_ON_INLINE!>@Synchronized<!>
get() = ""
<!SYNCHRONIZED_ON_INLINE!>@Synchronized<!>
set(value) {}