Render the descriptor in "cannot infer visibility" message
Otherwise it's unclear what member is problematic if it's a fake override (because the diagnostic in that case is reported on the whole class)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// !DIAGNOSTICS_NUMBER: 1
|
||||
// !DIAGNOSTICS: CANNOT_INFER_VISIBILITY
|
||||
|
||||
trait T {
|
||||
internal val foo: String
|
||||
}
|
||||
|
||||
trait U {
|
||||
protected val foo: String
|
||||
}
|
||||
|
||||
trait V : T, U
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- cannotInferVisibility1 -->
|
||||
Cannot infer visibility for 'val foo: kotlin.String'. Please specify it explicitly
|
||||
@@ -41,6 +41,11 @@ public class DiagnosticMessageTestGenerated extends AbstractDiagnosticMessageTes
|
||||
doTest("idea/testData/diagnosticMessage/assignedButNeverAccessedVariable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("cannotInferVisibility.kt")
|
||||
public void testCannotInferVisibility() throws Exception {
|
||||
doTest("idea/testData/diagnosticMessage/cannotInferVisibility.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("cannotOverrideInvisibleMember.kt")
|
||||
public void testCannotOverrideInvisibleMember() throws Exception {
|
||||
doTest("idea/testData/diagnosticMessage/cannotOverrideInvisibleMember.kt");
|
||||
|
||||
Reference in New Issue
Block a user