Files
kotlin-fork/compiler/testData/diagnostics/tests/IncDecOperatorsInExpectClass.kt
T
Nikita Bobko 9a865e4c55 [FE 1.0] Issue a warning if expect and actual are declared in the same module
The commit is based on b09561c3c3
Co-authored-by: Dmitriy Novozhilov <dmitriy.novozhilov@jetbrains.com>

^KT-40904 Fixed
^KT-55177 Fixed
Review: https://jetbrains.team/p/kt/reviews/8731

True negative test already exist:
`compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/intermediateWithActualAndExpect.kt`
2023-02-21 14:45:46 +01:00

14 lines
556 B
Kotlin
Vendored

// In FIR, declaring the same `expect` and `actual` classes in one compiler module is not possible (see KT-55177). Hence the `.fir.kt` test
// expects a diagnostic here. The multi-module test corresponding to this test is called: `multiplatform/incDecOperatorsInExpectClass.kt`.
// !LANGUAGE: +MultiPlatformProjects
// SKIP_TXT
// Issue: KT-49714
expect <!EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE!>class Counter<!> {
operator fun inc(): Counter
operator fun dec(): Counter
}
actual typealias <!EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE!>Counter<!> = Int