K2: report JvmMultifileClass+JvmSynthetic error in JVM backend
Specifically, the case when not all parts of a multifile class are annotated with `@JvmSynthetic`. Report the error on the `@JvmMultifileClass` annotation instead of the package directive, because the latter is difficult to find via IR. This fixes the test FirLightTreeDiagnosticsTestWithJvmIrBackendGenerated.MultifileClasses.testJvmSynthetic. #KT-59586
This commit is contained in:
+4
-4
@@ -3,8 +3,8 @@
|
||||
// FILE: f.kt
|
||||
|
||||
@file:JvmName("Foo")
|
||||
@file:JvmMultifileClass
|
||||
<!NOT_ALL_MULTIFILE_CLASS_PARTS_ARE_JVM_SYNTHETIC!>package test<!>
|
||||
<!NOT_ALL_MULTIFILE_CLASS_PARTS_ARE_JVM_SYNTHETIC!>@file:JvmMultifileClass<!>
|
||||
package test
|
||||
|
||||
fun f() {}
|
||||
|
||||
@@ -20,8 +20,8 @@ val g = ""
|
||||
// FILE: h.kt
|
||||
|
||||
@file:JvmName("Foo")
|
||||
@file:JvmMultifileClass
|
||||
<!NOT_ALL_MULTIFILE_CLASS_PARTS_ARE_JVM_SYNTHETIC!>package test<!>
|
||||
<!NOT_ALL_MULTIFILE_CLASS_PARTS_ARE_JVM_SYNTHETIC!>@file:JvmMultifileClass<!>
|
||||
package test
|
||||
|
||||
fun h() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user