Improved error message for 'nested class should be qualified'
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
// !DIAGNOSTICS_NUMBER: 5
|
||||
// !DIAGNOSTICS: NESTED_CLASS_SHOULD_BE_QUALIFIED
|
||||
|
||||
package p
|
||||
|
||||
class A {
|
||||
class B {
|
||||
class Nested
|
||||
}
|
||||
}
|
||||
|
||||
fun A.B.test() {
|
||||
Nested()
|
||||
::Nested
|
||||
}
|
||||
|
||||
class C {
|
||||
class object {
|
||||
class D {
|
||||
class Nested
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun C.D.text() {
|
||||
Nested()
|
||||
::Nested
|
||||
}
|
||||
|
||||
class E {
|
||||
class F {
|
||||
class object
|
||||
}
|
||||
}
|
||||
|
||||
fun E.test() {
|
||||
F
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- nestedClassShouldBeQualified1 -->
|
||||
Nested class 'Nested' should be qualified as 'A.B.Nested'
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- nestedClassShouldBeQualified2 -->
|
||||
Nested class 'Nested' should be qualified as 'A.B::Nested'
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- nestedClassShouldBeQualified3 -->
|
||||
Nested class 'Nested' should be qualified as 'C.D.Nested'
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- nestedClassShouldBeQualified4 -->
|
||||
Nested class 'Nested' should be qualified as 'C.D::Nested'
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- nestedClassShouldBeQualified5 -->
|
||||
Nested class object of 'F' should be qualified as 'E.F'
|
||||
Reference in New Issue
Block a user