[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`
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
@file:Suppress("EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE")
|
||||
|
||||
package test.collections.js
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
@file:Suppress("EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE")
|
||||
|
||||
package test
|
||||
|
||||
@@ -33,4 +34,4 @@ public expect object BackReferenceHandling {
|
||||
val nonExistentGroup: HandlingOption
|
||||
val nonExistentNamedGroup: HandlingOption
|
||||
val groupZero: HandlingOption
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
@file:Suppress("EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE")
|
||||
|
||||
package test.collections.js
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
@file:Suppress("EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE")
|
||||
|
||||
package test
|
||||
|
||||
@@ -38,4 +39,4 @@ public actual object BackReferenceHandling {
|
||||
actual val nonExistentGroup: HandlingOption = HandlingOption.MATCH_NOTHING
|
||||
actual val nonExistentNamedGroup: HandlingOption = HandlingOption.THROW
|
||||
actual val groupZero: HandlingOption = HandlingOption.THROW
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user