diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/ModifiersChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/ModifiersChecker.kt index 1a0c74d547c..e463ab20053 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/ModifiersChecker.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/ModifiersChecker.kt @@ -79,7 +79,7 @@ object ModifierCheckerCore { COMPANION_KEYWORD to EnumSet.of(OBJECT), LATEINIT_KEYWORD to EnumSet.of(MEMBER_PROPERTY), DATA_KEYWORD to EnumSet.of(CLASS_ONLY, INNER_CLASS, LOCAL_CLASS), - INLINE_KEYWORD to EnumSet.of(FUNCTION), + INLINE_KEYWORD to EnumSet.of(FUNCTION, PROPERTY, PROPERTY_GETTER, PROPERTY_SETTER), NOINLINE_KEYWORD to EnumSet.of(VALUE_PARAMETER), COROUTINE_KEYWORD to EnumSet.of(VALUE_PARAMETER), TAILREC_KEYWORD to EnumSet.of(FUNCTION), diff --git a/compiler/testData/diagnostics/tests/extensions/kt819ExtensionProperties.kt b/compiler/testData/diagnostics/tests/extensions/kt819ExtensionProperties.kt index 83a43ec2657..76884c762d4 100644 --- a/compiler/testData/diagnostics/tests/extensions/kt819ExtensionProperties.kt +++ b/compiler/testData/diagnostics/tests/extensions/kt819ExtensionProperties.kt @@ -2,10 +2,10 @@ import java.io.* -inline val InputStream.buffered : BufferedInputStream +val InputStream.buffered : BufferedInputStream get() = if(this is BufferedInputStream) this else BufferedInputStream(this) -inline val Reader.buffered : BufferedReader +val Reader.buffered : BufferedReader get() = if(this is BufferedReader) this else BufferedReader(this) diff --git a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt index f058005e11f..9a959f70f51 100644 --- a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt +++ b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt @@ -15,12 +15,9 @@ abstract class A() { class FinalClass() { open fun foo() {} val i: Int = 1 - open inline get(): Int = field + open get(): Int = field var j: Int = 1 - open inline set(v: Int) {} - - inline val f: ()->Unit - get() = {} + open set(v: Int) {} } private public class C diff --git a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.txt b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.txt index 5ca81f2ca69..103c0a4fbd8 100644 --- a/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.txt +++ b/compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.txt @@ -29,7 +29,6 @@ package illegal_modifiers { public final class FinalClass { public constructor FinalClass() - public final val f: () -> kotlin.Unit public final val i: kotlin.Int = 1 public final var j: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean