[LL FIR] KT-50732 Add support for LL FIR-specific tests (.ll.kt)
- `.ll.kt` test data can be added in cases where LL FIR resolution
legally diverges from K2 compiler results.
- Each `.ll.kt` test is prefixed with an `LL_FIR_DIVERGENCE` directive
which must explain why the test may diverge from K2 compiler results.
- `LLFirDivergenceCommentChecker` ensures that each `.ll.kt` file
contains an `LL_FIR_DIVERGENCE` directive.
- `LLFirIdenticalChecker` results in an assertion error if the `.ll.kt`
test and its base test are completely identical, including in their
meta info (but ignoring `LL_FIR_DIVERGENCE`).
- The checker additionally ensures that the base source file and the
`.ll.kt` source file have identical Kotlin source code (ignoring
meta info and `LL_FIR_DIVERGENCE`). This ensures that both tests
test the exact same thing.
- `.ll.kt` files are ignored by select test generators, in addition to
`.fir.kt` files.
This commit is contained in:
committed by
teamcity
parent
b0db0f59b4
commit
88ac5727cc
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// LL_FIR_DIVERGENCE
|
||||
// The compiler reports `PACKAGE_OR_CLASSIFIER_REDECLARATION` on both `A`s, but the LL FIR APIs output is also workable. The underlying
|
||||
// issue is already reported: KTIJ-23371.
|
||||
// LL_FIR_DIVERGENCE
|
||||
|
||||
// FIR_IDENTICAL
|
||||
// FILE: f1.kt
|
||||
package test
|
||||
|
||||
class A
|
||||
class F1
|
||||
|
||||
// FILE: f2.kt
|
||||
package test
|
||||
|
||||
class <!PACKAGE_OR_CLASSIFIER_REDECLARATION!>A<!>
|
||||
class F2
|
||||
Reference in New Issue
Block a user