[FIR] Implement WRONG_MODIFIER_CONTAINING_DECLARATION, DEPRECATED_MODIFIER_CONTAINING_DECLARATION
This commit is contained in:
committed by
TeamCityServer
parent
cd6384eb20
commit
2c1c24c042
@@ -1,17 +0,0 @@
|
||||
//KT-2397 Prohibit final methods in traits with no implementation
|
||||
package a
|
||||
|
||||
interface T {
|
||||
final fun foo()
|
||||
final val b : Int
|
||||
|
||||
final fun bar() {}
|
||||
final val c : Int
|
||||
get() = 42
|
||||
|
||||
final val d = <!PROPERTY_INITIALIZER_IN_INTERFACE!>1<!>
|
||||
}
|
||||
|
||||
class A {
|
||||
<!NON_ABSTRACT_FUNCTION_WITH_NO_BODY!>final fun foo()<!>
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
//KT-2397 Prohibit final methods in traits with no implementation
|
||||
package a
|
||||
|
||||
|
||||
compiler/testData/diagnostics/tests/declarationChecks/propertyInPackageHasNoInheritVisibility.fir.kt
Vendored
-10
@@ -1,10 +0,0 @@
|
||||
package d
|
||||
|
||||
<!WRONG_MODIFIER_TARGET!>override<!> val f : ()-> Int = { 12 }
|
||||
|
||||
fun test() {
|
||||
f()
|
||||
}
|
||||
|
||||
var g: Int = 1
|
||||
protected set(i: Int) {}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
package d
|
||||
|
||||
<!WRONG_MODIFIER_TARGET!>override<!> val f : ()-> Int = { 12 }
|
||||
|
||||
Reference in New Issue
Block a user