Report missed INLINE_FROM_HIGHER_PLATFORM diagnostic for derived class
Inline function descriptor in derived class represented as FAKE_OVERRIDE. So we should find it in base class declaration (not interface cause inline function can't be virtual, but always final) and then check class version. #KT-29402 Fixed
This commit is contained in:
+16
-1
@@ -449,7 +449,22 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
|
||||
|
||||
fun testWrongInlineTarget() {
|
||||
val library = compileLibrary("library", additionalOptions = listOf("-jvm-target", "1.8"))
|
||||
compileKotlin("source.kt", tmpdir, listOf(library))
|
||||
compileKotlin(
|
||||
"source.kt", tmpdir, listOf(library),
|
||||
/*all warning here are erased by compiler cause or error presence, see next test for warnings*/
|
||||
expectedFileName = "errorsAndErasedWarnings.txt"
|
||||
)
|
||||
|
||||
compileKotlin(
|
||||
"warningsOnly.kt", tmpdir, listOf(library),
|
||||
expectedFileName = "warningsOnly.txt"
|
||||
)
|
||||
|
||||
compileKotlin(
|
||||
"source.kt", tmpdir, listOf(library),
|
||||
additionalOptions = listOf("-XXLanguage:+ProperInlineFromHigherPlatformDiagnostic"),
|
||||
expectedFileName = "properError.txt"
|
||||
)
|
||||
}
|
||||
|
||||
fun testObsoleteInlineSuspend() {
|
||||
|
||||
Reference in New Issue
Block a user