93958ec73d
For an example of an object with an implicit primary constructor, see `FirPsiOldFrontendDiagnosticsTestGenerated.testSingletonAndFunctionSameName`. ^KT-62005 Fixed Merge-request: KT-MR-12242 Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
28 lines
538 B
Kotlin
Vendored
28 lines
538 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// !DIAGNOSTICS: -DUPLICATE_CLASS_NAMES
|
|
//KT-2438 Prohibit inner classes with the same name
|
|
|
|
package kt2438
|
|
|
|
class B {
|
|
class <!REDECLARATION!>C<!>
|
|
class <!REDECLARATION!>C<!>
|
|
|
|
class <!CONFLICTING_OVERLOADS, REDECLARATION!>D<!>
|
|
class <!CONFLICTING_OVERLOADS, REDECLARATION!>D<!>
|
|
<!CONFLICTING_OVERLOADS!>fun D()<!> {}
|
|
}
|
|
|
|
|
|
|
|
class A {
|
|
class <!REDECLARATION!>B<!>
|
|
|
|
companion object {
|
|
class <!REDECLARATION!>B<!>
|
|
class <!REDECLARATION!>B<!>
|
|
}
|
|
|
|
class <!REDECLARATION!>B<!>
|
|
}
|