Don't suggest making interface member final
(which was possible in leaking this inspection) So #KT-14443 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
a73cf0e1fe
commit
17869abfaf
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.inspections.LeakingThisInspection
|
||||
@@ -0,0 +1,14 @@
|
||||
// PROBLEM: Calling non-final function foo in constructor
|
||||
|
||||
interface My {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
open class Your : My {
|
||||
|
||||
init {
|
||||
// exactly one fix action should be here (make 'Your' final)
|
||||
// making 'foo' final will provoke an error
|
||||
<caret>foo()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// PROBLEM: Calling non-final function foo in constructor
|
||||
|
||||
interface My {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
class Your : My {
|
||||
|
||||
init {
|
||||
// exactly one fix action should be here (make 'Your' final)
|
||||
// making 'foo' final will provoke an error
|
||||
<caret>foo()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user