Fix "cannot override invisible member" diagnostic message
Fix "cannot has", delete "in class ..." as it's already present in the message (function ... defined in class ...)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// !DIAGNOSTICS_NUMBER: 1
|
||||
// !DIAGNOSTICS: CANNOT_OVERRIDE_INVISIBLE_MEMBER
|
||||
|
||||
open class A {
|
||||
private open fun foo() {}
|
||||
}
|
||||
|
||||
class B : A() {
|
||||
override fun foo() {}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- cannotOverrideInvisibleMember1 -->
|
||||
'internal open fun foo(): kotlin.Unit defined in B' has no access to 'private open fun foo(): kotlin.Unit defined in A', so it cannot override it
|
||||
@@ -41,6 +41,11 @@ public class DiagnosticMessageTestGenerated extends AbstractDiagnosticMessageTes
|
||||
doTest("idea/testData/diagnosticMessage/assignedButNeverAccessedVariable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("cannotOverrideInvisibleMember.kt")
|
||||
public void testCannotOverrideInvisibleMember() throws Exception {
|
||||
doTest("idea/testData/diagnosticMessage/cannotOverrideInvisibleMember.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("conflictingOverloadsClass.kt")
|
||||
public void testConflictingOverloadsClass() throws Exception {
|
||||
doTest("idea/testData/diagnosticMessage/conflictingOverloadsClass.kt");
|
||||
|
||||
Reference in New Issue
Block a user