5f2ff06296
In the vast majority of tests, diagnostics are reported at a slightly different location in LT vs PSI. This is because in the light tree mode, backend errors are reported basically on the start of the IR element, which is for example the keyword "class" for a class and not its name as in K1 or in K2+PSI. Similarly, the end of the diagnostic is at the ending offset of the IR element. Normally it would be a bit user-unfriendly to highlight the whole class as red, starting from the keyword "class" and ending with the closing brace "}". But remember that these are backend diagnostics in the K2+LT mode, which is only possible in the compiler scenario, not in the IDE. And in this case, the ending offset doesn't matter at all because it's not presented to the user, and minor change in the starting offset is not a problem as well. There are some tests which legitimately fail in the LT mode because the corresponding diagnostics haven't been supported. They will be dealt with in subsequent commits: testPropertyInlineCycle testInlineCycle MultifileClasses.testJvmSynthetic testSuspendInlineCycle testIndirectInlineCycle #KT-59586
8 lines
189 B
Kotlin
Vendored
8 lines
189 B
Kotlin
Vendored
// COMPARE_WITH_LIGHT_TREE
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
|
|
class C {
|
|
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(x: Any)<!> {}
|
|
<!CONFLICTING_JVM_DECLARATIONS!>fun Any.foo()<!> {}
|
|
}
|